

文档 AWS SDK 示例 GitHub 存储库中还有更多 [S AWS DK 示例](https://github.com/awsdocs/aws-doc-sdk-examples)。

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

# 将 `StopAutomationExecution` 与 CLI 配合使用
<a name="ssm_example_ssm_StopAutomationExecution_section"></a>

以下代码示例演示如何使用 `StopAutomationExecution`。

------
#### [ CLI ]

**AWS CLI**  
**停止自动化执行**  
以下 `stop-automation-execution` 示例停止自动化文档。  

```
aws ssm stop-automation-execution
    --automation-execution-id "4105a4fc-f944-11e6-9d32-0a1b2EXAMPLE"
```
此命令不生成任何输出。  
有关更多信息，请参阅《AWS Systems Manager 用户指南》**中的[手动运行自动化工作流](https://docs.aws.amazon.com/systems-manager/latest/userguide/automation-working-executing-manually.html)。  
+  有关 API 的详细信息，请参阅*AWS CLI 命令参考[StopAutomationExecution](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/ssm/stop-automation-execution.html)*中的。

------
#### [ PowerShell ]

**适用于 PowerShell V4 的工具**  
**示例 1：此示例停止自动化执行。如果此命令成功，则无任何输出。**  

```
Stop-SSMAutomationExecution -AutomationExecutionId "4105a4fc-f944-11e6-9d32-8fb2db27a909"
```
+  有关 API 的详细信息，请参阅 *AWS Tools for PowerShell Cmdlet 参考 (V* 4) [StopAutomationExecution](https://docs.aws.amazon.com/powershell/v4/reference)中的。

**适用于 PowerShell V5 的工具**  
**示例 1：此示例停止自动化执行。如果此命令成功，则无任何输出。**  

```
Stop-SSMAutomationExecution -AutomationExecutionId "4105a4fc-f944-11e6-9d32-8fb2db27a909"
```
+  有关 API 的详细信息，请参阅 *AWS Tools for PowerShell Cmdlet 参考 (V* 5) [StopAutomationExecution](https://docs.aws.amazon.com/powershell/v5/reference)中的。

------