aws_sdk_sagemakerruntime/client/
invoke_endpoint_async.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 [`InvokeEndpointAsync`](crate::operation::invoke_endpoint_async::builders::InvokeEndpointAsyncFluentBuilder) operation.
4    ///
5    /// - The fluent builder is configurable:
6    ///   - [`endpoint_name(impl Into<String>)`](crate::operation::invoke_endpoint_async::builders::InvokeEndpointAsyncFluentBuilder::endpoint_name) / [`set_endpoint_name(Option<String>)`](crate::operation::invoke_endpoint_async::builders::InvokeEndpointAsyncFluentBuilder::set_endpoint_name):<br>required: **true**<br><p>The name of the endpoint that you specified when you created the endpoint using the <a href="https://docs.aws.amazon.com/sagemaker/latest/dg/API_CreateEndpoint.html">CreateEndpoint</a> API.</p><br>
7    ///   - [`content_type(impl Into<String>)`](crate::operation::invoke_endpoint_async::builders::InvokeEndpointAsyncFluentBuilder::content_type) / [`set_content_type(Option<String>)`](crate::operation::invoke_endpoint_async::builders::InvokeEndpointAsyncFluentBuilder::set_content_type):<br>required: **false**<br><p>The MIME type of the input data in the request body.</p><br>
8    ///   - [`accept(impl Into<String>)`](crate::operation::invoke_endpoint_async::builders::InvokeEndpointAsyncFluentBuilder::accept) / [`set_accept(Option<String>)`](crate::operation::invoke_endpoint_async::builders::InvokeEndpointAsyncFluentBuilder::set_accept):<br>required: **false**<br><p>The desired MIME type of the inference response from the model container.</p><br>
9    ///   - [`custom_attributes(impl Into<String>)`](crate::operation::invoke_endpoint_async::builders::InvokeEndpointAsyncFluentBuilder::custom_attributes) / [`set_custom_attributes(Option<String>)`](crate::operation::invoke_endpoint_async::builders::InvokeEndpointAsyncFluentBuilder::set_custom_attributes):<br>required: **false**<br><p>Provides additional information about a request for an inference submitted to a model hosted at an Amazon SageMaker endpoint. The information is an opaque value that is forwarded verbatim. You could use this value, for example, to provide an ID that you can use to track a request or to provide other metadata that a service endpoint was programmed to process. The value must consist of no more than 1024 visible US-ASCII characters as specified in <a href="https://datatracker.ietf.org/doc/html/rfc7230#section-3.2.6">Section 3.3.6. Field Value Components</a> of the Hypertext Transfer Protocol (HTTP/1.1).</p> <p>The code in your model is responsible for setting or updating any custom attributes in the response. If your code does not set this value in the response, an empty value is returned. For example, if a custom attribute represents the trace ID, your model can prepend the custom attribute with <code>Trace ID:</code> in your post-processing function.</p> <p>This feature is currently supported in the Amazon Web Services SDKs but not in the Amazon SageMaker Python SDK.</p><br>
10    ///   - [`inference_id(impl Into<String>)`](crate::operation::invoke_endpoint_async::builders::InvokeEndpointAsyncFluentBuilder::inference_id) / [`set_inference_id(Option<String>)`](crate::operation::invoke_endpoint_async::builders::InvokeEndpointAsyncFluentBuilder::set_inference_id):<br>required: **false**<br><p>The identifier for the inference request. Amazon SageMaker will generate an identifier for you if none is specified.</p><br>
11    ///   - [`input_location(impl Into<String>)`](crate::operation::invoke_endpoint_async::builders::InvokeEndpointAsyncFluentBuilder::input_location) / [`set_input_location(Option<String>)`](crate::operation::invoke_endpoint_async::builders::InvokeEndpointAsyncFluentBuilder::set_input_location):<br>required: **true**<br><p>The Amazon S3 URI where the inference request payload is stored.</p><br>
12    ///   - [`request_ttl_seconds(i32)`](crate::operation::invoke_endpoint_async::builders::InvokeEndpointAsyncFluentBuilder::request_ttl_seconds) / [`set_request_ttl_seconds(Option<i32>)`](crate::operation::invoke_endpoint_async::builders::InvokeEndpointAsyncFluentBuilder::set_request_ttl_seconds):<br>required: **false**<br><p>Maximum age in seconds a request can be in the queue before it is marked as expired. The default is 6 hours, or 21,600 seconds.</p><br>
13    ///   - [`invocation_timeout_seconds(i32)`](crate::operation::invoke_endpoint_async::builders::InvokeEndpointAsyncFluentBuilder::invocation_timeout_seconds) / [`set_invocation_timeout_seconds(Option<i32>)`](crate::operation::invoke_endpoint_async::builders::InvokeEndpointAsyncFluentBuilder::set_invocation_timeout_seconds):<br>required: **false**<br><p>Maximum amount of time in seconds a request can be processed before it is marked as expired. The default is 15 minutes, or 900 seconds.</p><br>
14    /// - On success, responds with [`InvokeEndpointAsyncOutput`](crate::operation::invoke_endpoint_async::InvokeEndpointAsyncOutput) with field(s):
15    ///   - [`inference_id(Option<String>)`](crate::operation::invoke_endpoint_async::InvokeEndpointAsyncOutput::inference_id): <p>Identifier for an inference request. This will be the same as the <code>InferenceId</code> specified in the input. Amazon SageMaker will generate an identifier for you if you do not specify one.</p>
16    ///   - [`output_location(Option<String>)`](crate::operation::invoke_endpoint_async::InvokeEndpointAsyncOutput::output_location): <p>The Amazon S3 URI where the inference response payload is stored.</p>
17    ///   - [`failure_location(Option<String>)`](crate::operation::invoke_endpoint_async::InvokeEndpointAsyncOutput::failure_location): <p>The Amazon S3 URI where the inference failure response payload is stored.</p>
18    /// - On failure, responds with [`SdkError<InvokeEndpointAsyncError>`](crate::operation::invoke_endpoint_async::InvokeEndpointAsyncError)
19    pub fn invoke_endpoint_async(&self) -> crate::operation::invoke_endpoint_async::builders::InvokeEndpointAsyncFluentBuilder {
20        crate::operation::invoke_endpoint_async::builders::InvokeEndpointAsyncFluentBuilder::new(self.handle.clone())
21    }
22}