CLI로 StopDeployment 사용 - AWS SDK 코드 예제

AWS SDK 예제 GitHub 리포지토리에 더 많은 AWS문서 SDK 예제가 있습니다.

CLI로 StopDeployment 사용

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

CLI
AWS CLI

배포 중지를 시도하는 방법

다음 stop-deployment 예시에서는 사용자의 AWS 계정과 연결된 진행 중인 배포를 중지하려고 시도합니다.

aws deploy stop-deployment --deployment-id d-A1B2C3111

출력:

{ "status": "Succeeded", "statusMessage": "No more commands will be scheduled for execution in the deployment instances" }
  • API 세부 정보는 AWS CLI 명령 참조StopDeployment 섹션을 참조하세요.

PowerShell
Tools for PowerShell V4

예제 1: 이 예제에서는 지정된 배포 ID로 배포 중지를 시도합니다.

Stop-CDDeployment -DeploymentId d-LJQNREYEX

출력:

Status StatusMessage ------ ------------- Pending Stopping Pending. Stopping to schedule commands in the deployment instances
  • API 세부 정보는 AWS Tools for PowerShell Cmdlet 참조(V4)StopDeployment를 참조하세요.

Tools for PowerShell V5

예제 1: 이 예제에서는 지정된 배포 ID로 배포 중지를 시도합니다.

Stop-CDDeployment -DeploymentId d-LJQNREYEX

출력:

Status StatusMessage ------ ------------- Pending Stopping Pending. Stopping to schedule commands in the deployment instances
  • API 세부 정보는 AWS Tools for PowerShell Cmdlet 참조(V5)StopDeployment를 참조하세요.