

自 2025 年 11 月 7 日起，Amazon Fraud Detector 不再向新客戶開放。對於類似 Amazon Fraud Detector 的功能，請探索 Amazon 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 服務 您用來協調下游程序的 也稱為*目標*。您可以使用的一些目標來協調下游處理，如下所示：
+ 用於監控和分析 — [Amazon QuickSight](https://docs.aws.amazon.com//quicksight/latest/user/welcome.html)、[Amazon CloudWatch](https://docs.aws.amazon.com//AmazonCloudWatch/latest/monitoring/WhatIsCloudWatch.html)
+ 儲存：[Amazon S3](https://docs.aws.amazon.com//AmazonS3/latest/userguide/Welcome.html)、[Amazon RDS](https://docs.aws.amazon.com//AmazonRDS/latest/UserGuide/Welcome.html)、[Amazon DynamoDB](https://docs.aws.amazon.com//amazondynamodb/latest/developerguide/Introduction.html)
+ 用於傳送通知 — [Amazon SNS](https://docs.aws.amazon.com//sns/latest/dg/welcome.html)、[Amazon SES](https://docs.aws.amazon.com//ses/latest/dg/Welcome.html)
+ 用於自訂處理 — [AWS Lambda](https://docs.aws.amazon.com//lambda/latest/dg/welcome.html)、[AWS Step Functions](https://docs.aws.amazon.com//step-functions/latest/dg/welcome.html)

如需 Amazon EventBridge 支援之協同運作目標的詳細資訊，請參閱 [Amazon EventBridge 目標](https://docs.aws.amazon.com//eventbridge/latest/userguide/eb-targets.html)。

下圖提供事件協同運作運作方式的高階檢視。



![\[事件協調流程的影像。\]](http://docs.aws.amazon.com/zh_tw/frauddetector/latest/ug/images/event-orchestration-high-level.png)


# 設定事件協同運作
<a name="setting-up-event-orchestration"></a>

為您的事件設定事件協調需要您在目標服務中設定程序、設定 Amazon EventBridge 以接收和傳送事件資料，以及在 Amazon EventBridge 中建立規則，以指定啟動下游程序的條件。完成下列步驟以設定事件協同運作：

**設定事件協同運作**

1. 前往 [Amazon EventBridge 使用者指南](https://docs.aws.amazon.com//eventbridge/latest/userguide/eb-what-is.html)，了解如何使用 Amazon 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>

您可以在建立事件類型時或建立事件類型之後，為事件啟用事件協調。您可以使用 `put-event-type`命令、 `PutEventType` API 或使用 ，在 Amazon Fraud Detector 主控台中啟用事件協同運作 適用於 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/)並登入您的帳戶。導覽至 Amazon 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`和 `email_address`、標籤 `legit`和 `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/)並登入您的帳戶。導覽至 Amazon 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'])
```