

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

# 使用 CLI 在 Amazon SNS 中建立資料保護政策
<a name="sns-message-data-protection-configure-cli"></a>

**重要**  
Amazon SNS 訊息資料保護不再提供給新客戶。如需替代方案的詳細資訊和指引，請參閱 [Amazon SNS 訊息資料保護可用性變更](https://docs.aws.amazon.com/sns/latest/dg/sns-message-data-protection-availability-change.html)。

 AWS 帳戶中 Amazon SNS 資源的數量和大小有限。如需詳細資訊，請參閱 [Amazon Simple Notification Service 端點和配額](https://docs.aws.amazon.com/general/latest/gr/sns.html)。

## 使用 建立資料保護政策 AWS CLI
<a name="create-policies-cli"></a>

使用 建立 Amazon SNS 資料保護政策 AWS Command Line Interface。

**若要與 Amazon SNS 主題一起建立資料保護政策 (AWS CLI)**  
使用此選項，與標準 Amazon SNS 主題一起建立新的資料保護政策：
+ [create-topic](https://docs.aws.amazon.com/cli/latest/reference/sns/create-topic.html)

**若要建立或擷取現有 Amazon SNS 主題的資料保護政策 (AWS CLI)**  
呼叫以下其中一項操作：
+ [get-data-protection-policy](https://docs.aws.amazon.com/cli/latest/reference/sns/get-data-protection-policy.html)
+ [put-data-protection-policy](https://docs.aws.amazon.com/cli/latest/reference/sns/put-data-protection-policy.html)