Struct aws_sdk_lookoutvision::operation::detect_anomalies::builders::DetectAnomaliesFluentBuilder
source · pub struct DetectAnomaliesFluentBuilder { /* private fields */ }Expand description
Fluent builder constructing a request to DetectAnomalies.
Detects anomalies in an image that you supply.
The response from DetectAnomalies includes a boolean prediction that the image contains one or more anomalies and a confidence value for the prediction. If the model is an image segmentation model, the response also includes segmentation information for each type of anomaly found in the image.
Before calling DetectAnomalies, you must first start your model with the StartModel operation. You are charged for the amount of time, in minutes, that a model runs and for the number of anomaly detection units that your model uses. If you are not using a model, use the StopModel operation to stop your model.
For more information, see Detecting anomalies in an image in the Amazon Lookout for Vision developer guide.
This operation requires permissions to perform the lookoutvision:DetectAnomalies operation.
Implementations§
source§impl DetectAnomaliesFluentBuilder
impl DetectAnomaliesFluentBuilder
sourcepub fn as_input(&self) -> &DetectAnomaliesInputBuilder
pub fn as_input(&self) -> &DetectAnomaliesInputBuilder
Access the DetectAnomalies as a reference.
sourcepub async fn send(
self
) -> Result<DetectAnomaliesOutput, SdkError<DetectAnomaliesError, HttpResponse>>
pub async fn send( self ) -> Result<DetectAnomaliesOutput, SdkError<DetectAnomaliesError, HttpResponse>>
Sends the request and returns the response.
If an error occurs, an SdkError will be returned with additional details that
can be matched against.
By default, any retryable failures will be retried twice. Retry behavior is configurable with the RetryConfig, which can be set when configuring the client.
sourcepub fn customize(
self
) -> CustomizableOperation<DetectAnomaliesOutput, DetectAnomaliesError, Self>
pub fn customize( self ) -> CustomizableOperation<DetectAnomaliesOutput, DetectAnomaliesError, Self>
Consumes this builder, creating a customizable operation that can be modified before being sent.
sourcepub fn project_name(self, input: impl Into<String>) -> Self
pub fn project_name(self, input: impl Into<String>) -> Self
The name of the project that contains the model version that you want to use.
sourcepub fn set_project_name(self, input: Option<String>) -> Self
pub fn set_project_name(self, input: Option<String>) -> Self
The name of the project that contains the model version that you want to use.
sourcepub fn get_project_name(&self) -> &Option<String>
pub fn get_project_name(&self) -> &Option<String>
The name of the project that contains the model version that you want to use.
sourcepub fn model_version(self, input: impl Into<String>) -> Self
pub fn model_version(self, input: impl Into<String>) -> Self
The version of the model that you want to use.
sourcepub fn set_model_version(self, input: Option<String>) -> Self
pub fn set_model_version(self, input: Option<String>) -> Self
The version of the model that you want to use.
sourcepub fn get_model_version(&self) -> &Option<String>
pub fn get_model_version(&self) -> &Option<String>
The version of the model that you want to use.
sourcepub fn body(self, input: ByteStream) -> Self
pub fn body(self, input: ByteStream) -> Self
The unencrypted image bytes that you want to analyze.
sourcepub fn set_body(self, input: Option<ByteStream>) -> Self
pub fn set_body(self, input: Option<ByteStream>) -> Self
The unencrypted image bytes that you want to analyze.
sourcepub fn get_body(&self) -> &Option<ByteStream>
pub fn get_body(&self) -> &Option<ByteStream>
The unencrypted image bytes that you want to analyze.
sourcepub fn content_type(self, input: impl Into<String>) -> Self
pub fn content_type(self, input: impl Into<String>) -> Self
The type of the image passed in Body. Valid values are image/png (PNG format images) and image/jpeg (JPG format images).
sourcepub fn set_content_type(self, input: Option<String>) -> Self
pub fn set_content_type(self, input: Option<String>) -> Self
The type of the image passed in Body. Valid values are image/png (PNG format images) and image/jpeg (JPG format images).
sourcepub fn get_content_type(&self) -> &Option<String>
pub fn get_content_type(&self) -> &Option<String>
The type of the image passed in Body. Valid values are image/png (PNG format images) and image/jpeg (JPG format images).