将 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 参考(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。
-
有关 AWS SDK 开发人员指南和代码示例的完整列表,请参阅 使用 AWS SDK 创建 Amazon EC2 资源。本主题还包括有关入门的信息以及有关先前的 SDK 版本的详细信息。
DeleteDhcpOptions
DeleteInternetGateway