#[non_exhaustive]pub struct InvokeEndpointOutput {
pub body: Option<Blob>,
pub content_type: Option<String>,
pub invoked_production_variant: Option<String>,
pub custom_attributes: Option<String>,
/* private fields */
}
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. }
syntax; cannot be matched against without a wildcard ..
; and struct update syntax will not work.body: Option<Blob>
Includes the inference provided by the model.
For information about the format of the response body, see Common Data Formats-Inference.
If the explainer is activated, the body includes the explanations provided by the model. For more information, see the Response section under Invoke the Endpoint in the Developer Guide.
content_type: Option<String>
The MIME type of the inference returned from the model container.
invoked_production_variant: Option<String>
Identifies the production variant that was invoked.
custom_attributes: Option<String>
Provides additional information in the response about the inference returned by 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 return an ID received in the CustomAttributes
header of a request or other metadata that a service endpoint was programmed to produce. 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). If the customer wants the custom attribute returned, the model must set the custom attribute to be included on the way back.
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.
Implementations§
source§impl InvokeEndpointOutput
impl InvokeEndpointOutput
sourcepub fn body(&self) -> Option<&Blob>
pub fn body(&self) -> Option<&Blob>
Includes the inference provided by the model.
For information about the format of the response body, see Common Data Formats-Inference.
If the explainer is activated, the body includes the explanations provided by the model. For more information, see the Response section under Invoke the Endpoint in the Developer Guide.
sourcepub fn content_type(&self) -> Option<&str>
pub fn content_type(&self) -> Option<&str>
The MIME type of the inference returned from the model container.
sourcepub fn invoked_production_variant(&self) -> Option<&str>
pub fn invoked_production_variant(&self) -> Option<&str>
Identifies the production variant that was invoked.
sourcepub fn custom_attributes(&self) -> Option<&str>
pub fn custom_attributes(&self) -> Option<&str>
Provides additional information in the response about the inference returned by 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 return an ID received in the CustomAttributes
header of a request or other metadata that a service endpoint was programmed to produce. 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). If the customer wants the custom attribute returned, the model must set the custom attribute to be included on the way back.
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.
source§impl InvokeEndpointOutput
impl InvokeEndpointOutput
sourcepub fn builder() -> InvokeEndpointOutputBuilder
pub fn builder() -> InvokeEndpointOutputBuilder
Creates a new builder-style object to manufacture InvokeEndpointOutput
.
Trait Implementations§
source§impl Clone for InvokeEndpointOutput
impl Clone for InvokeEndpointOutput
source§fn clone(&self) -> InvokeEndpointOutput
fn clone(&self) -> InvokeEndpointOutput
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for InvokeEndpointOutput
impl Debug for InvokeEndpointOutput
source§impl PartialEq for InvokeEndpointOutput
impl PartialEq for InvokeEndpointOutput
source§fn eq(&self, other: &InvokeEndpointOutput) -> bool
fn eq(&self, other: &InvokeEndpointOutput) -> bool
self
and other
values to be equal, and is used
by ==
.source§impl RequestId for InvokeEndpointOutput
impl RequestId for InvokeEndpointOutput
source§fn request_id(&self) -> Option<&str>
fn request_id(&self) -> Option<&str>
None
if the service could not be reached.