

• AWS Systems Manager CloudWatch 대시보드는 2026년 4월 30일 이후에는 더 이상 사용할 수 없습니다. 고객은 Amazon CloudWatch 콘솔을 계속 사용하여 현재와 마찬가지로 Amazon CloudWatch 대시보드를 보고, 생성하고, 관리할 수 있습니다. 자세한 내용은 [Amazon CloudWatch 대시보드 설명서](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch_Dashboards.html)를 참조하세요.

# CLI로 `CancelCommand` 사용
<a name="example_ssm_CancelCommand_section"></a>

다음 코드 예시는 `CancelCommand`의 사용 방법을 보여 줍니다.

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

**AWS CLI**  
**예제 1: 모든 인스턴스에 대한 명령을 취소하는 방법**  
다음 `cancel-command` 예제에서는 모든 인스턴스에 대해 이미 실행 중인 지정된 명령을 취소하려고 시도합니다.  

```
aws ssm cancel-command \
    --command-id "662add3d-5831-4a10-b64a-f2ff3EXAMPLE"
```
이 명령은 출력을 생성하지 않습니다.  
**예제 2: 특정 인스턴스의 명령을 취소하는 방법**  
다음 `cancel-command` 예제에서는 지정된 인스턴스에 대한 명령만 취소하려고 시도합니다.  

```
aws ssm cancel-command \
    --command-id "662add3d-5831-4a10-b64a-f2ff3EXAMPLE"
    --instance-ids "i-02573cafcfEXAMPLE"
```
이 명령은 출력을 생성하지 않습니다.  
자세한 내용은 **AWS Systems Manager 사용 설명서의 [Systems Manager 파라미터 태그 지정](https://docs.aws.amazon.com/systems-manager/latest/userguide/sysman-paramstore-su-tag.html)을 참조하세요.  
+  API 세부 정보는 **AWS CLI 명령 참조의 [CancelCommand](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/ssm/cancel-command.html)를 참조하세요.

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

**Tools for PowerShell V4**  
**예제 1: 이 예제에서는 명령 취소를 시도합니다. 작업이 성공해도 출력은 없습니다.**  

```
Stop-SSMCommand -CommandId "9ded293e-e792-4440-8e3e-7b8ec5feaa38"
```
+  API 세부 정보는 *AWS Tools for PowerShell Cmdlet 참조(V4)*의 [CancelCommand](https://docs.aws.amazon.com/powershell/v4/reference)를 참조하세요.

**Tools for PowerShell V5**  
**예제 1: 이 예제에서는 명령 취소를 시도합니다. 작업이 성공해도 출력은 없습니다.**  

```
Stop-SSMCommand -CommandId "9ded293e-e792-4440-8e3e-7b8ec5feaa38"
```
+  API 세부 정보는 *AWS Tools for PowerShell Cmdlet 참조(V5)*의 [CancelCommand](https://docs.aws.amazon.com/powershell/v5/reference)를 참조하세요.

------

AWS SDK 개발자 가이드 및 코드 예제의 전체 목록은 [AWS SDK와 함께 이 서비스 사용](sdk-general-information-section.md)을 참조하세요. 이 주제에는 시작하기에 대한 정보와 이전 SDK 버전에 대한 세부 정보도 포함되어 있습니다.