Struct aws_sdk_sagemakerruntime::operation::invoke_endpoint_with_response_stream::builders::InvokeEndpointWithResponseStreamInputBuilder
source · #[non_exhaustive]pub struct InvokeEndpointWithResponseStreamInputBuilder { /* private fields */ }
Expand description
A builder for InvokeEndpointWithResponseStreamInput
.
Implementations§
source§impl InvokeEndpointWithResponseStreamInputBuilder
impl InvokeEndpointWithResponseStreamInputBuilder
sourcepub fn endpoint_name(self, input: impl Into<String>) -> Self
pub fn endpoint_name(self, input: impl Into<String>) -> Self
The name of the endpoint that you specified when you created the endpoint using the CreateEndpoint API.
This field is required.sourcepub fn set_endpoint_name(self, input: Option<String>) -> Self
pub fn set_endpoint_name(self, input: Option<String>) -> Self
The name of the endpoint that you specified when you created the endpoint using the CreateEndpoint API.
sourcepub fn get_endpoint_name(&self) -> &Option<String>
pub fn get_endpoint_name(&self) -> &Option<String>
The name of the endpoint that you specified when you created the endpoint using the CreateEndpoint API.
sourcepub fn body(self, input: Blob) -> Self
pub fn body(self, input: Blob) -> Self
Provides input data, in the format specified in the ContentType
request header. Amazon SageMaker passes all of the data in the body to the model.
For information about the format of the request body, see Common Data Formats-Inference.
This field is required.sourcepub fn set_body(self, input: Option<Blob>) -> Self
pub fn set_body(self, input: Option<Blob>) -> Self
Provides input data, in the format specified in the ContentType
request header. Amazon SageMaker passes all of the data in the body to the model.
For information about the format of the request body, see Common Data Formats-Inference.
sourcepub fn get_body(&self) -> &Option<Blob>
pub fn get_body(&self) -> &Option<Blob>
Provides input data, in the format specified in the ContentType
request header. Amazon SageMaker passes all of the data in the body to the model.
For information about the format of the request body, see Common Data Formats-Inference.
sourcepub fn content_type(self, input: impl Into<String>) -> Self
pub fn content_type(self, input: impl Into<String>) -> Self
The MIME type of the input data in the request body.
sourcepub fn set_content_type(self, input: Option<String>) -> Self
pub fn set_content_type(self, input: Option<String>) -> Self
The MIME type of the input data in the request body.
sourcepub fn get_content_type(&self) -> &Option<String>
pub fn get_content_type(&self) -> &Option<String>
The MIME type of the input data in the request body.
sourcepub fn accept(self, input: impl Into<String>) -> Self
pub fn accept(self, input: impl Into<String>) -> Self
The desired MIME type of the inference response from the model container.
sourcepub fn set_accept(self, input: Option<String>) -> Self
pub fn set_accept(self, input: Option<String>) -> Self
The desired MIME type of the inference response from the model container.
sourcepub fn get_accept(&self) -> &Option<String>
pub fn get_accept(&self) -> &Option<String>
The desired MIME type of the inference response from the model container.
sourcepub fn custom_attributes(self, input: impl Into<String>) -> Self
pub fn custom_attributes(self, input: impl Into<String>) -> Self
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 Section 3.3.6. Field Value Components of the Hypertext Transfer Protocol (HTTP/1.1).
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 Trace ID:
in your post-processing function.
This feature is currently supported in the Amazon Web Services SDKs but not in the Amazon SageMaker Python SDK.
sourcepub fn set_custom_attributes(self, input: Option<String>) -> Self
pub fn set_custom_attributes(self, input: Option<String>) -> Self
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 Section 3.3.6. Field Value Components of the Hypertext Transfer Protocol (HTTP/1.1).
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 Trace ID:
in your post-processing function.
This feature is currently supported in the Amazon Web Services SDKs but not in the Amazon SageMaker Python SDK.
sourcepub fn get_custom_attributes(&self) -> &Option<String>
pub fn get_custom_attributes(&self) -> &Option<String>
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 Section 3.3.6. Field Value Components of the Hypertext Transfer Protocol (HTTP/1.1).
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 Trace ID:
in your post-processing function.
This feature is currently supported in the Amazon Web Services SDKs but not in the Amazon SageMaker Python SDK.
sourcepub fn target_variant(self, input: impl Into<String>) -> Self
pub fn target_variant(self, input: impl Into<String>) -> Self
Specify the production variant to send the inference request to when invoking an endpoint that is running two or more variants. Note that this parameter overrides the default behavior for the endpoint, which is to distribute the invocation traffic based on the variant weights.
For information about how to use variant targeting to perform a/b testing, see Test models in production
sourcepub fn set_target_variant(self, input: Option<String>) -> Self
pub fn set_target_variant(self, input: Option<String>) -> Self
Specify the production variant to send the inference request to when invoking an endpoint that is running two or more variants. Note that this parameter overrides the default behavior for the endpoint, which is to distribute the invocation traffic based on the variant weights.
For information about how to use variant targeting to perform a/b testing, see Test models in production
sourcepub fn get_target_variant(&self) -> &Option<String>
pub fn get_target_variant(&self) -> &Option<String>
Specify the production variant to send the inference request to when invoking an endpoint that is running two or more variants. Note that this parameter overrides the default behavior for the endpoint, which is to distribute the invocation traffic based on the variant weights.
For information about how to use variant targeting to perform a/b testing, see Test models in production
sourcepub fn target_container_hostname(self, input: impl Into<String>) -> Self
pub fn target_container_hostname(self, input: impl Into<String>) -> Self
If the endpoint hosts multiple containers and is configured to use direct invocation, this parameter specifies the host name of the container to invoke.
sourcepub fn set_target_container_hostname(self, input: Option<String>) -> Self
pub fn set_target_container_hostname(self, input: Option<String>) -> Self
If the endpoint hosts multiple containers and is configured to use direct invocation, this parameter specifies the host name of the container to invoke.
sourcepub fn get_target_container_hostname(&self) -> &Option<String>
pub fn get_target_container_hostname(&self) -> &Option<String>
If the endpoint hosts multiple containers and is configured to use direct invocation, this parameter specifies the host name of the container to invoke.
sourcepub fn inference_id(self, input: impl Into<String>) -> Self
pub fn inference_id(self, input: impl Into<String>) -> Self
An identifier that you assign to your request.
sourcepub fn set_inference_id(self, input: Option<String>) -> Self
pub fn set_inference_id(self, input: Option<String>) -> Self
An identifier that you assign to your request.
sourcepub fn get_inference_id(&self) -> &Option<String>
pub fn get_inference_id(&self) -> &Option<String>
An identifier that you assign to your request.
sourcepub fn inference_component_name(self, input: impl Into<String>) -> Self
pub fn inference_component_name(self, input: impl Into<String>) -> Self
If the endpoint hosts one or more inference components, this parameter specifies the name of inference component to invoke for a streaming response.
sourcepub fn set_inference_component_name(self, input: Option<String>) -> Self
pub fn set_inference_component_name(self, input: Option<String>) -> Self
If the endpoint hosts one or more inference components, this parameter specifies the name of inference component to invoke for a streaming response.
sourcepub fn get_inference_component_name(&self) -> &Option<String>
pub fn get_inference_component_name(&self) -> &Option<String>
If the endpoint hosts one or more inference components, this parameter specifies the name of inference component to invoke for a streaming response.
sourcepub fn build(self) -> Result<InvokeEndpointWithResponseStreamInput, BuildError>
pub fn build(self) -> Result<InvokeEndpointWithResponseStreamInput, BuildError>
Consumes the builder and constructs a InvokeEndpointWithResponseStreamInput
.
source§impl InvokeEndpointWithResponseStreamInputBuilder
impl InvokeEndpointWithResponseStreamInputBuilder
sourcepub async fn send_with(
self,
client: &Client
) -> Result<InvokeEndpointWithResponseStreamOutput, SdkError<InvokeEndpointWithResponseStreamError, HttpResponse>>
pub async fn send_with( self, client: &Client ) -> Result<InvokeEndpointWithResponseStreamOutput, SdkError<InvokeEndpointWithResponseStreamError, HttpResponse>>
Sends a request with this input using the given client.
Trait Implementations§
source§impl Clone for InvokeEndpointWithResponseStreamInputBuilder
impl Clone for InvokeEndpointWithResponseStreamInputBuilder
source§fn clone(&self) -> InvokeEndpointWithResponseStreamInputBuilder
fn clone(&self) -> InvokeEndpointWithResponseStreamInputBuilder
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Default for InvokeEndpointWithResponseStreamInputBuilder
impl Default for InvokeEndpointWithResponseStreamInputBuilder
source§fn default() -> InvokeEndpointWithResponseStreamInputBuilder
fn default() -> InvokeEndpointWithResponseStreamInputBuilder
source§impl PartialEq for InvokeEndpointWithResponseStreamInputBuilder
impl PartialEq for InvokeEndpointWithResponseStreamInputBuilder
source§fn eq(&self, other: &InvokeEndpointWithResponseStreamInputBuilder) -> bool
fn eq(&self, other: &InvokeEndpointWithResponseStreamInputBuilder) -> bool
self
and other
values to be equal, and is used
by ==
.impl StructuralPartialEq for InvokeEndpointWithResponseStreamInputBuilder
Auto Trait Implementations§
impl Freeze for InvokeEndpointWithResponseStreamInputBuilder
impl RefUnwindSafe for InvokeEndpointWithResponseStreamInputBuilder
impl Send for InvokeEndpointWithResponseStreamInputBuilder
impl Sync for InvokeEndpointWithResponseStreamInputBuilder
impl Unpin for InvokeEndpointWithResponseStreamInputBuilder
impl UnwindSafe for InvokeEndpointWithResponseStreamInputBuilder
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more