

截至 2025 年 11 月 7 日，亚马逊 Fraud Detector 不再向新客户开放。要获得与 Amazon Fraud Detector 类似的功能 SageMaker，请浏览亚马逊 AutoGluon、和 AWS WAF。

本文属于机器翻译版本。若本译文内容与英语原文存在差异，则一律以英文原文为准。

# 活动编排
<a name="event-orchestration"></a>

通过事件编排，您可以轻松地使用 [Amazon EventBridge](https://docs.aws.amazon.com//eventbridge/latest/userguide/eb-what-is.html) 将事件发送到 AWS 服务 下游处理。Amazon Fraud Detector 为您提供了一些简单的规则，您可以在检测到欺诈后使用这些规则自动处理事件。通过事件编排，您可以自动执行下游事件流程，例如将事件发送到仪表板以从事件数据中获取见解，根据欺诈检测结果生成通知，以及根据从欺诈检测中吸取的经验使用标签更新事件。

通过事件编排，您可以通过 Amazon EventBridge 轻松访问 AWS 环境中的服务。您可以将 Amazon 配置 EventBridge 为直接向 AWS 服务 或使用 [API 目的地](https://docs.aws.amazon.com//eventbridge/latest/userguide/eb-api-destinations.html)间接发送事件。用于协调下游流程的也称为*目标*。 AWS 服务 您可以用来协调下游处理的一些目标如下：
+ 用于监控和分析 — [亚马逊 QuickSight](https://docs.aws.amazon.com//quicksight/latest/user/welcome.html)、[亚马逊 CloudWatch](https://docs.aws.amazon.com//AmazonCloudWatch/latest/monitoring/WhatIsCloudWatch.html)
+ 用于存储 — [亚马逊 S3、亚马逊](https://docs.aws.amazon.com//AmazonS3/latest/userguide/Welcome.html) [RDS、亚马逊 D](https://docs.aws.amazon.com//AmazonRDS/latest/UserGuide/Welcome.html) [ynamo](https://docs.aws.amazon.com//amazondynamodb/latest/developerguide/Introduction.html) DB
+ [用于发送通知 — [亚马逊 SNS、亚马逊 SES](https://docs.aws.amazon.com//sns/latest/dg/welcome.html)](https://docs.aws.amazon.com//ses/latest/dg/Welcome.html)
+ 用于自定义处理 — [AWS Lambda、AWS](https://docs.aws.amazon.com//lambda/latest/dg/welcome.html) Step Functi [on](https://docs.aws.amazon.com//step-functions/latest/dg/welcome.html) s

有关 Amazon 支持的编排目标的更多信息 EventBridge，请参阅[亚马逊 EventBridge 目标](https://docs.aws.amazon.com//eventbridge/latest/userguide/eb-targets.html)。

下图提供了事件编排工作原理的高级视图。



![\[事件编排流程的图像。\]](http://docs.aws.amazon.com/zh_cn/frauddetector/latest/ug/images/event-orchestration-high-level.png)


# 设置事件编排
<a name="setting-up-event-orchestration"></a>

为事件设置事件编排需要您在目标服务中设置流程，将 Amazon 配置 EventBridge 为接收和发送事件数据，并在 Amazon EventBridge 中创建规则来指定启动下游流程的条件。完成以下步骤来设置事件编排：

**设置事件编排**

1. 前往[亚马逊 EventBridge 用户指南](https://docs.aws.amazon.com//eventbridge/latest/userguide/eb-what-is.html)并学习如何使用亚马逊 EventBridge。请务必学习如何在 Amazon 中 EventBridge 为您的用例创建[规则](https://docs.aws.amazon.com//eventbridge/latest/userguide/eb-rules.html)。

1. 按照说明进行操作[在 Amazon Fraud Detector 中启用事件编排](enable-event-orchestration.md)。
**注意**  
默认情况下，您的活动的活动编排处于*禁用状态*。

1. 将目标服务设置为接收和处理事件数据。例如，如果您的下游流程涉及发送通知，而您想使用 Amazon SNS，请前往 Amazon SNS 控制台，创建 SNS 主题，然后通过终端节点订阅该主题。

1. 按照说明[创建 Amazon EventBridge 规则](https://docs.aws.amazon.com//eventbridge/latest/userguide/eb-create-rule.html)。
**重要**  
在 Amazon 中构建事件模式时 EventBridge，请务必`aws.frauddetector`提供*来源*字段和`Event Prediction Result Returned`*详情类型*字段。

# 在 Amazon Fraud Detector 中启用事件编排
<a name="enable-event-orchestration"></a>

您可以在创建事件类型时或在创建事件类型之后为事件启用事件编排。可以在 Amazon Fraud Detector 控制台中启用事件编排，使用`put-event-type`命令、`PutEventType` API 或使用。 适用于 Python (Boto3) 的 AWS SDK

## 在 Amazon Fraud Detector 控制台中启用事件编排
<a name="enable-event-orchestration-console"></a>

此示例为已创建的事件类型启用事件编排。如果您要创建新的事件类型并希望启用编排，请按照说明进行操作。[创建事件类型](create-event-type.md)

**启用事件编排**

1. 打开 [AWS 管理控制台](https://console.aws.amazon.com/)，登录您的账户。导航到亚马逊 Fraud Detector。

1. 在左侧导航窗格中，选择**事件**。

1. 在**事件类型**页面中，选择您的事件类型。

1. 开启 “通过 **Amazon EventBridge 启用事件编排**”。

1. 继续执行步骤 3 的说明[设置事件编排](setting-up-event-orchestration.md)。

## 使用启用事件编排 适用于 Python (Boto3) 的 AWS SDK
<a name="enable-event-orchestration-using-the-aws-python-sdk"></a>

以下示例显示了更新事件类型`sample_registration`以启用事件编排的示例请求。该示例使用 `PutEventType` API，并假设您已经创建了变量`ip_address``legit`和`email_address``fraud`、标签和以及实体类型`sample_customer`。有关如何创建这些资源的信息，请参阅[资源](https://docs.aws.amazon.com//frauddetector/latest/ug/create-resources.html)。

```
import boto3
fraudDetector = boto3.client('frauddetector')
fraud_detector.put_event_type( 
  name = 'sample_registration',
  eventVariables = ['ip_address', 'email_address'],
  eventOrchestration = {'eventBridgeEnabled': True},
  labels = ['legit', 'fraud'],
  entityTypes = ['sample_customer'])
```

# 在 Amazon Fraud Detector 中禁用事件编排
<a name="disable-event-orchestration"></a>

您可以随时在 Amazon Fraud Detector 控制台中禁用事件的事件编排，使用`put-event-type`命令、`PutEventType` API 或使用。 适用于 Python (Boto3) 的 AWS SDK

## 在 Amazon Fraud Detector 控制台中禁用事件编排
<a name="disable-event-orchestration-console"></a>

**禁用事件编排**

1. 打开 [AWS 管理控制台](https://console.aws.amazon.com/)，登录您的账户。导航到亚马逊 Fraud Detector。

1. 在左侧导航窗格中，选择**事件**。

1. 在**事件类型**页面中，选择您的事件类型。

1. 关闭 **“通过 Amazon EventBridge 启用事件编排**”。

## 使用禁用事件编排 适用于 Python (Boto3) 的 AWS SDK
<a name="disable-event-orchestration-using-the-aws-python-sdk"></a>

以下示例显示了使用 `PutEventType` API 更新事件类型`sample_registration`以禁用事件编排的示例请求。

```
import boto3
fraudDetector = boto3.client('frauddetector')
fraud_detector.put_event_type( 
  name = 'sample_registration',
  eventVariables = ['ip_address', 'email_address'],
  eventOrchestration = {'eventBridgeEnabled': False},  
  entityTypes = ['sample_customer'])
```