

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

# `AWS-EnableCloudFormationSNSNotification`
<a name="AWS-EnableCloudFormationStackSNSNotification"></a>

 **描述** 

 `AWS-EnableCloudFormationSNSNotification`运行手册为您指定的 () 堆栈启用亚马逊简单通知服务 (Amazon SNS) Simple Notification Service 通知。 AWS CloudFormation CloudFormation

 [运行此自动化（控制台）](https://console.aws.amazon.com/systems-manager/automation/execute/AWS-EnableCloudFormationStackSNSNotification) 

**文档类型**

自动化

**所有者**

Amazon

**平台**

Linux，macOS, Windows

**参数**
+ AutomationAssumeRole

  类型：字符串

  描述：（可选）允许 Systems Manager Automation 代表您执行操作 AWS Identity and Access Management (IAM) 角色的 Amazon 资源名称（ARN）。如果未指定角色，Systems Manager Automation 将使用启动此运行手册的用户的权限。
+ StackArn

  类型：字符串

  描述：（必填）您要为其启用 Amazon SNS 通知的 CloudFormation 堆栈的 ARN 或名称。
+ NotificationArn

  类型：字符串

  描述：（必填）您要与堆栈关联的 Amazon SNS 主题的 ARN。 CloudFormation 

**所需的 IAM 权限**

`AutomationAssumeRole` 参数需要执行以下操作才能成功使用运行手册。
+ ssm：GetAutomationExecution
+ ssm：StartAutomationExecution
+ 云层：DescribeStacks
+ 云层：UpdateStack
+ kms:Decrypt
+ kms: GenerateDataKey
+ sns:Publish
+ sqs: GetQueueAttributes

 **文档步骤** 
+ CheckCfnSnsLimits (`aws:executeScript`)-验证尚未与您指定的堆栈关联的 Amazon SNS 主题的最大数量。 CloudFormation 
+ EnableCfnSnsNotification (`aws:executeAwsApi`)-为堆栈启用 Amazon SNS 通知。 CloudFormation 
+ VerificationCfnSnsNotification (`aws:executeScript`)-验证是否已为堆栈启用 Amazon SNS 通知。 CloudFormation 

 **输出** 

CheckCfnSnsLimits。 NotificationArnList -接收堆栈 ARNs 的 Amazon SNS 通知的 CloudFormation 人员名单。

VerificationCfnSnsNotification。 VerifySnsTopicsResponse -来自 API 操作的响应，确认已为堆栈启用 Amazon SNS 通知。 CloudFormation 