powershell 使用具有多个查找属性的Find-CTEvent获取AWS Cloud Trail事件

rslzwgfq  于 2023-04-30  发布在  Shell
关注(0)|答案(1)|浏览(96)

我需要使用Find-CTEvent cmdlet从AWS Cloud Trail检索CreateImage和CreateSnapshot事件。所以我尝试以下方法:

Find-CTEvent -LookupAttribute @(@{ AttributeKey="EventName"; AttributeValue="CreateSnapshot"},@{ AttributeKey="EventName"; AttributeValue="CreateImage"})

我只获取列表中第一个元素的事件。我哪里错了?我很感激任何帮助。谢谢大家。

mspsb9vt

mspsb9vt1#

到2023年4月5日为止,这不起作用。根据文档,只能提供一个LookupAttribute值(https://docs.aws.amazon.com/powershell/latest/reference/items/Find-CTEvent.html

-LookupAttribute <LookupAttribute[]>
Contains a list of lookup attributes. Currently the list can contain only one item.

相关问题