

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

# `AWS-EnableStepFunctionsStateMachineLogging`
<a name="aws-enablestepfunctionsstatemachinelogging"></a>

 **描述** 

`AWS-EnableStepFunctionsStateMachineLogging`运行手册启用或更新您指定的 AWS Step Functions 状态机上的日志记录。最低日志级别必须设置为`ALL``ERROR`、或`FATAL`。

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

**文档类型**

自动化

**所有者**

Amazon

**平台**

Linux，macOS, Windows

**参数**
+ AutomationAssumeRole

  类型：字符串

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

  类型：字符串

  有效值：全部 \$1 错误 \$1 致命

  描述：（必填）您要启用加密的 Amazon SQS 队列的 URL。
+ LogGroupArn

  类型：字符串

  描述：（必填）您要向其发送状态机 CloudWatch 日志的 Amazon 日志组的 ARN。
+ StateMachineArn

  类型：字符串

  描述：（必填）要启用登录功能的状态机的 ARN。
+ IncludeExecutionData

  类型：布尔值

  默认值：False

  描述：（可选）确定日志中是否包含执行数据。
+ TracingConfiguration

  类型：布尔值

  默认值：False

  描述：（可选）确定是否启用 AWS X-Ray 跟踪。

**所需的 IAM 权限**

`AutomationAssumeRole` 参数需要执行以下操作才能成功使用运行手册。
+ `ssm:GetAutomationExecution`
+ `ssm:StartAutomationExecution`
+ `states:DescribeStateMachine`
+ `states:UpdateStateMachine`

 **文档步骤** 
+  `EnableStepFunctionsStateMachineLogging (aws:executeAwsApi)`-使用指定的日志配置更新指定的状态机。
+  `VerifyStepFunctionsStateMachineLoggingEnabled (aws:assertAwsResourceProperty)`-验证是否已为指定状态机启用日志记录。

 **输出** 
+ EnableStepFunctionsStateMachineLogging.Response-来自 UpdateStateMachine API 调用的响应。