AWS 文档 SDK 示例
将 DeleteFlowLogs 与 CLI 配合使用
以下代码示例演示如何使用 DeleteFlowLogs。
- CLI
-
- AWS CLI
-
删除流日志
以下
delete-flow-logs示例删除指定流日志。aws ec2 delete-flow-logs --flow-log-idfl-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 Reference (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 Reference (V5)》中的 DeleteFlowLogs。
-
DeleteDhcpOptions
DeleteInternetGateway