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

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

CLI로 DeleteFlowLogs 사용

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

CLI
AWS CLI

흐름 로그 삭제

다음 delete-flow-logs 예시에서는 지정된 흐름 로그를 삭제합니다.

aws ec2 delete-flow-logs --flow-log-id fl-11223344556677889

출력:

{ "Unsuccessful": [] }
  • API 세부 정보는 AWS CLI 명령 참조DeleteFlowLogs 섹션을 참조하세요.

PowerShell
Tools for PowerShell V4

예제 1: 이 예제에서는 지정된 FlowLogId fl-01a2b3456a789c01을 제거합니다.

Remove-EC2FlowLog -FlowLogId fl-01a2b3456a789c01

출력:

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

Tools for PowerShell V5

예제 1: 이 예제에서는 지정된 FlowLogId fl-01a2b3456a789c01을 제거합니다.

Remove-EC2FlowLog -FlowLogId fl-01a2b3456a789c01

출력:

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