

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

# 使用 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 endpoints and quotas](https://docs.aws.amazon.com/general/latest/gr/sns.html)。

## 使用创建数据保护策略 AWS CLI
<a name="create-policies-cli"></a>

使用 AWS Command Line Interface创建 Amazon SNS 数据保护策略。

**与 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)