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

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

CLI로 DeleteCustomerGateway 사용

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

CLI
AWS CLI

고객 게이트웨이 삭제

이 예시에서는 지정된 고객 게이트웨이를 삭제합니다. 이 명령이 성공하면 출력이 반환되지 않습니다.

명령:

aws ec2 delete-customer-gateway --customer-gateway-id cgw-0e11f167
PowerShell
Tools for PowerShell V4

예제 1: 이 예제에서는 지정된 고객 게이트웨이를 삭제합니다. Force 파라미터를 함께 지정하지 않는 한 작업이 진행되기 전에 확인 프롬프트가 표시됩니다.

Remove-EC2CustomerGateway -CustomerGatewayId cgw-1a2b3c4d

출력:

Confirm Are you sure you want to perform this action? Performing operation "Remove-EC2CustomerGateway (DeleteCustomerGateway)" on Target "cgw-1a2b3c4d". [Y] Yes [A] Yes to All [N] No [L] No to All [S] Suspend [?] Help (default is "Y"):
  • API 세부 정보는 AWS Tools for PowerShell Cmdlet 참조(V4)DeleteCustomerGateway를 참조하세요.

Tools for PowerShell V5

예제 1: 이 예제에서는 지정된 고객 게이트웨이를 삭제합니다. Force 파라미터를 함께 지정하지 않는 한 작업이 진행되기 전에 확인 프롬프트가 표시됩니다.

Remove-EC2CustomerGateway -CustomerGatewayId cgw-1a2b3c4d

출력:

Confirm Are you sure you want to perform this action? Performing operation "Remove-EC2CustomerGateway (DeleteCustomerGateway)" on Target "cgw-1a2b3c4d". [Y] Yes [A] Yes to All [N] No [L] No to All [S] Suspend [?] Help (default is "Y"):
  • API 세부 정보는 AWS Tools for PowerShell Cmdlet 참조(V5)DeleteCustomerGateway를 참조하세요.