Struct aws_sdk_sagemakerruntime::operation::invoke_endpoint::builders::InvokeEndpointInputBuilder
source · #[non_exhaustive]pub struct InvokeEndpointInputBuilder { /* private fields */ }
Expand description
A builder for InvokeEndpointInput
.
Implementations§
source§impl InvokeEndpointInputBuilder
impl InvokeEndpointInputBuilder
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_model(self, input: impl Into<String>) -> Self
pub fn target_model(self, input: impl Into<String>) -> Self
The model to request for inference when invoking a multi-model endpoint.
sourcepub fn set_target_model(self, input: Option<String>) -> Self
pub fn set_target_model(self, input: Option<String>) -> Self
The model to request for inference when invoking a multi-model endpoint.
sourcepub fn get_target_model(&self) -> &Option<String>
pub fn get_target_model(&self) -> &Option<String>
The model to request for inference when invoking a multi-model endpoint.
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
If you provide a value, it is added to the captured data when you enable data capture on the endpoint. For information about data capture, see Capture Data.
sourcepub fn set_inference_id(self, input: Option<String>) -> Self
pub fn set_inference_id(self, input: Option<String>) -> Self
If you provide a value, it is added to the captured data when you enable data capture on the endpoint. For information about data capture, see Capture Data.
sourcepub fn get_inference_id(&self) -> &Option<String>
pub fn get_inference_id(&self) -> &Option<String>
If you provide a value, it is added to the captured data when you enable data capture on the endpoint. For information about data capture, see Capture Data.
sourcepub fn enable_explanations(self, input: impl Into<String>) -> Self
pub fn enable_explanations(self, input: impl Into<String>) -> Self
An optional JMESPath expression used to override the EnableExplanations
parameter of the ClarifyExplainerConfig
API. See the EnableExplanations section in the developer guide for more information.
sourcepub fn set_enable_explanations(self, input: Option<String>) -> Self
pub fn set_enable_explanations(self, input: Option<String>) -> Self
An optional JMESPath expression used to override the EnableExplanations
parameter of the ClarifyExplainerConfig
API. See the EnableExplanations section in the developer guide for more information.
sourcepub fn get_enable_explanations(&self) -> &Option<String>
pub fn get_enable_explanations(&self) -> &Option<String>
An optional JMESPath expression used to override the EnableExplanations
parameter of the ClarifyExplainerConfig
API. See the EnableExplanations section in the developer guide for more information.
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.
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.
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.
sourcepub fn build(self) -> Result<InvokeEndpointInput, BuildError>
pub fn build(self) -> Result<InvokeEndpointInput, BuildError>
Consumes the builder and constructs a InvokeEndpointInput
.
source§impl InvokeEndpointInputBuilder
impl InvokeEndpointInputBuilder
sourcepub async fn send_with(
self,
client: &Client
) -> Result<InvokeEndpointOutput, SdkError<InvokeEndpointError, HttpResponse>>
pub async fn send_with( self, client: &Client ) -> Result<InvokeEndpointOutput, SdkError<InvokeEndpointError, HttpResponse>>
Sends a request with this input using the given client.
Trait Implementations§
source§impl Clone for InvokeEndpointInputBuilder
impl Clone for InvokeEndpointInputBuilder
source§fn clone(&self) -> InvokeEndpointInputBuilder
fn clone(&self) -> InvokeEndpointInputBuilder
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for InvokeEndpointInputBuilder
impl Debug for InvokeEndpointInputBuilder
source§impl Default for InvokeEndpointInputBuilder
impl Default for InvokeEndpointInputBuilder
source§fn default() -> InvokeEndpointInputBuilder
fn default() -> InvokeEndpointInputBuilder
source§impl PartialEq for InvokeEndpointInputBuilder
impl PartialEq for InvokeEndpointInputBuilder
source§fn eq(&self, other: &InvokeEndpointInputBuilder) -> bool
fn eq(&self, other: &InvokeEndpointInputBuilder) -> bool
self
and other
values to be equal, and is used
by ==
.