

自 2025 年 11 月 7 日起，Amazon Fraud Detector 不再向新客戶開放。對於類似 Amazon Fraud Detector 的功能，請探索 Amazon SageMaker、AutoGluon 和 AWS WAF。

本文為英文版的機器翻譯版本，如內容有任何歧義或不一致之處，概以英文版為準。

# 刪除變數
<a name="delete-variable"></a>

當您刪除變數時，Amazon Fraud Detector 會永久刪除該變數，且資料不會再存放在 Amazon Fraud Detector 中。

您無法刪除包含在 Amazon Fraud Detector 事件類型中的變數。您必須先刪除變數相關聯的事件類型，然後刪除變數。

您無法手動刪除 Amazon Fraud Detector 模型輸出變數和 SageMaker AI 模型輸出變數。當您刪除模型時，Amazon Fraud Detector 會自動刪除模型輸出變數。

您可以在 Amazon Fraud Detector 主控台中使用 [delete-variable](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/frauddetector/delete-variable.html) CLI 命令、[DeleteVariable](https://docs.aws.amazon.com/frauddetector/latest/api/API_DeleteVariable.html) API 或使用 適用於 Python (Boto3) 的 AWS SDK

## 使用主控台刪除變數
<a name="delete-variable-console"></a>

**若要刪除變數，**

1. 登入 AWS 管理主控台 並開啟位於 https：//[https://console.aws.amazon.com/frauddetector](https://console.aws.amazon.com/frauddetector) 的 Amazon Fraud Detector 主控台。

1. 在 Amazon Fraud Detector 主控台的左側導覽窗格中，選擇**資源**，然後選擇**變數**。

1. 選擇您要刪除的變數。

1. 選擇**動作**，然後選擇**刪除**。

1. 輸入變數名稱，然後選擇**刪除變數**。

## 使用 刪除變數 適用於 Python (Boto3) 的 AWS SDK
<a name="delete-variable-using-the-aws-python-sdk"></a>

下列程式碼範例會使用 [DeleteVariable](https://docs.aws.amazon.com/frauddetector/latest/api/API_DeleteVariable.html) API 刪除變數 *customer\_name*。

```
import boto3
fraudDetector = boto3.client('frauddetector')

fraudDetector.delete_variable (

name = 'customer_name'

)
```