Label
The Label resource lets you manage AWS FraudDetector Labels for identifying and categorizing events for fraud detection.
Minimal Example
Section titled “Minimal Example”Create a basic label with just the required properties and a description.
import AWS from "alchemy/aws/control";
const fraudLabel = await AWS.FraudDetector.Label("fraud-label", { name: "SuspiciousTransaction", description: "Label for transactions flagged as suspicious"});
Advanced Configuration
Section titled “Advanced Configuration”Create a label with tags for better organization and management.
const taggedLabel = await AWS.FraudDetector.Label("tagged-fraud-label", { name: "HighRiskTransaction", description: "Label for transactions identified as high risk", tags: [ { key: "Environment", value: "Production" }, { key: "Team", value: "FraudDetection" } ]});
Update Existing Label
Section titled “Update Existing Label”Adopt an existing label instead of failing if it already exists.
const existingLabel = await AWS.FraudDetector.Label("existing-fraud-label", { name: "ReturningCustomer", description: "Label for transactions from returning customers", adopt: true // This will adopt if the label already exists});