aws_sdk_frauddetector/client/
get_event_prediction.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 [`GetEventPrediction`](crate::operation::get_event_prediction::builders::GetEventPredictionFluentBuilder) operation.
4    ///
5    /// - The fluent builder is configurable:
6    ///   - [`detector_id(impl Into<String>)`](crate::operation::get_event_prediction::builders::GetEventPredictionFluentBuilder::detector_id) / [`set_detector_id(Option<String>)`](crate::operation::get_event_prediction::builders::GetEventPredictionFluentBuilder::set_detector_id):<br>required: **true**<br><p>The detector ID.</p><br>
7    ///   - [`detector_version_id(impl Into<String>)`](crate::operation::get_event_prediction::builders::GetEventPredictionFluentBuilder::detector_version_id) / [`set_detector_version_id(Option<String>)`](crate::operation::get_event_prediction::builders::GetEventPredictionFluentBuilder::set_detector_version_id):<br>required: **false**<br><p>The detector version ID.</p><br>
8    ///   - [`event_id(impl Into<String>)`](crate::operation::get_event_prediction::builders::GetEventPredictionFluentBuilder::event_id) / [`set_event_id(Option<String>)`](crate::operation::get_event_prediction::builders::GetEventPredictionFluentBuilder::set_event_id):<br>required: **true**<br><p>The unique ID used to identify the event.</p><br>
9    ///   - [`event_type_name(impl Into<String>)`](crate::operation::get_event_prediction::builders::GetEventPredictionFluentBuilder::event_type_name) / [`set_event_type_name(Option<String>)`](crate::operation::get_event_prediction::builders::GetEventPredictionFluentBuilder::set_event_type_name):<br>required: **true**<br><p>The event type associated with the detector specified for the prediction.</p><br>
10    ///   - [`entities(Entity)`](crate::operation::get_event_prediction::builders::GetEventPredictionFluentBuilder::entities) / [`set_entities(Option<Vec::<Entity>>)`](crate::operation::get_event_prediction::builders::GetEventPredictionFluentBuilder::set_entities):<br>required: **true**<br><p>The entity type (associated with the detector's event type) and specific entity ID representing who performed the event. If an entity id is not available, use "UNKNOWN."</p><br>
11    ///   - [`event_timestamp(impl Into<String>)`](crate::operation::get_event_prediction::builders::GetEventPredictionFluentBuilder::event_timestamp) / [`set_event_timestamp(Option<String>)`](crate::operation::get_event_prediction::builders::GetEventPredictionFluentBuilder::set_event_timestamp):<br>required: **true**<br><p>Timestamp that defines when the event under evaluation occurred. The timestamp must be specified using ISO 8601 standard in UTC.</p><br>
12    ///   - [`event_variables(impl Into<String>, impl Into<String>)`](crate::operation::get_event_prediction::builders::GetEventPredictionFluentBuilder::event_variables) / [`set_event_variables(Option<HashMap::<String, String>>)`](crate::operation::get_event_prediction::builders::GetEventPredictionFluentBuilder::set_event_variables):<br>required: **true**<br><p>Names of the event type's variables you defined in Amazon Fraud Detector to represent data elements and their corresponding values for the event you are sending for evaluation.</p><important>  <p>You must provide at least one eventVariable</p> </important> <p>To ensure most accurate fraud prediction and to simplify your data preparation, Amazon Fraud Detector will replace all missing variables or values as follows:</p> <p><b>For Amazon Fraud Detector trained models:</b></p> <p>If a null value is provided explicitly for a variable or if a variable is missing, model will replace the null value or the missing variable (no variable name in the eventVariables map) with calculated default mean/medians for numeric variables and with special values for categorical variables.</p> <p><b>For imported SageMaker models:</b></p> <p>If a null value is provided explicitly for a variable, the model and rules will use “null” as the value. If a variable is not provided (no variable name in the eventVariables map), model and rules will use the default value that is provided for the variable.</p><br>
13    ///   - [`external_model_endpoint_data_blobs(impl Into<String>, ModelEndpointDataBlob)`](crate::operation::get_event_prediction::builders::GetEventPredictionFluentBuilder::external_model_endpoint_data_blobs) / [`set_external_model_endpoint_data_blobs(Option<HashMap::<String, ModelEndpointDataBlob>>)`](crate::operation::get_event_prediction::builders::GetEventPredictionFluentBuilder::set_external_model_endpoint_data_blobs):<br>required: **false**<br><p>The Amazon SageMaker model endpoint input data blobs.</p><br>
14    /// - On success, responds with [`GetEventPredictionOutput`](crate::operation::get_event_prediction::GetEventPredictionOutput) with field(s):
15    ///   - [`model_scores(Option<Vec::<ModelScores>>)`](crate::operation::get_event_prediction::GetEventPredictionOutput::model_scores): <p>The model scores. Amazon Fraud Detector generates model scores between 0 and 1000, where 0 is low fraud risk and 1000 is high fraud risk. Model scores are directly related to the false positive rate (FPR). For example, a score of 600 corresponds to an estimated 10% false positive rate whereas a score of 900 corresponds to an estimated 2% false positive rate.</p>
16    ///   - [`rule_results(Option<Vec::<RuleResult>>)`](crate::operation::get_event_prediction::GetEventPredictionOutput::rule_results): <p>The results from the rules.</p>
17    ///   - [`external_model_outputs(Option<Vec::<ExternalModelOutputs>>)`](crate::operation::get_event_prediction::GetEventPredictionOutput::external_model_outputs): <p>The model scores for Amazon SageMaker models.</p>
18    /// - On failure, responds with [`SdkError<GetEventPredictionError>`](crate::operation::get_event_prediction::GetEventPredictionError)
19    pub fn get_event_prediction(&self) -> crate::operation::get_event_prediction::builders::GetEventPredictionFluentBuilder {
20        crate::operation::get_event_prediction::builders::GetEventPredictionFluentBuilder::new(self.handle.clone())
21    }
22}