- Navigation GuideYou are on a Command (operation) page with structural examples. Use the navigation breadcrumb if you would like to return to the Client landing page.
SendEventCommand
Stores events in Amazon Fraud Detector without generating fraud predictions for those events. For example, you can use SendEvent
to upload a historical dataset, which you can then later use to train a model.
Example Syntax
Use a bare-bones client and the command you need to make an API call.
import { FraudDetectorClient, SendEventCommand } from "@aws-sdk/client-frauddetector"; // ES Modules import
// const { FraudDetectorClient, SendEventCommand } = require("@aws-sdk/client-frauddetector"); // CommonJS import
const client = new FraudDetectorClient(config);
const input = { // SendEventRequest
eventId: "STRING_VALUE", // required
eventTypeName: "STRING_VALUE", // required
eventTimestamp: "STRING_VALUE", // required
eventVariables: { // EventVariableMap // required
"<keys>": "STRING_VALUE",
},
assignedLabel: "STRING_VALUE",
labelTimestamp: "STRING_VALUE",
entities: [ // listOfEntities // required
{ // Entity
entityType: "STRING_VALUE", // required
entityId: "STRING_VALUE", // required
},
],
};
const command = new SendEventCommand(input);
const response = await client.send(command);
// {};
SendEventCommand Input
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
entities Required | Entity[] | undefined | An array of entities. |
eventId Required | string | undefined | The event ID to upload. |
eventTimestamp Required | string | undefined | The timestamp that defines when the event under evaluation occurred. The timestamp must be specified using ISO 8601 standard in UTC. |
eventTypeName Required | string | undefined | The event type name of the event. |
eventVariables Required | Record<string, string> | undefined | 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. |
assignedLabel | string | undefined | The label to associate with the event. Required if specifying |
labelTimestamp | string | undefined | The timestamp associated with the label. Required if specifying |
SendEventCommand Output
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
$metadata Required | ResponseMetadata | Metadata pertaining to this request. |
Throws
Name | Fault | Details |
---|
Name | Fault | Details |
---|---|---|
AccessDeniedException | client | An exception indicating Amazon Fraud Detector does not have the needed permissions. This can occur if you submit a request, such as |
ConflictException | client | An exception indicating there was a conflict during a delete operation. |
InternalServerException | server | An exception indicating an internal server error. |
ResourceNotFoundException | client | An exception indicating the specified resource was not found. |
ThrottlingException | client | An exception indicating a throttling error. |
ValidationException | client | An exception indicating a specified value is not allowed. |
FraudDetectorServiceException | Base exception class for all service exceptions from FraudDetector service. |