EntityType
The EntityType resource lets you manage AWS FraudDetector EntityTypes which are essential for defining the types of entities that can be detected in your fraud detection models.
Minimal Example
Section titled “Minimal Example”Create a basic EntityType with required properties and an optional description.
import AWS from "alchemy/aws/control";
const basicEntityType = await AWS.FraudDetector.EntityType("basicEntityType", { Name: "Customer", Description: "Represents a customer in the fraud detection model"});
Advanced Configuration
Section titled “Advanced Configuration”Configure an EntityType with tags for better management and organization.
const taggedEntityType = await AWS.FraudDetector.EntityType("taggedEntityType", { Name: "Transaction", Description: "Represents a transaction entity for fraud detection", Tags: [ { Key: "Environment", Value: "Production" }, { Key: "Project", Value: "FraudDetection" } ]});
Using Adopt Option
Section titled “Using Adopt Option”Use the adopt option to ensure that the existing resource is used rather than creating a new one.
const adoptEntityType = await AWS.FraudDetector.EntityType("adoptEntityType", { Name: "User", Description: "Represents a user entity for tracking", adopt: true});
Viewing EntityType Properties
Section titled “Viewing EntityType Properties”Create an EntityType and inspect its properties like ARN and creation time.
const entityTypeWithProperties = await AWS.FraudDetector.EntityType("propertiesEntityType", { Name: "Device", Description: "Represents a device entity for fraud detection"});
console.log(`EntityType ARN: ${entityTypeWithProperties.Arn}`);console.log(`Created at: ${entityTypeWithProperties.CreationTime}`);