使用多个查找属性使用Find-CTEvent获取AWS Cloud Trail事件。

huangapple go评论54阅读模式
英文:

Getting AWS Cloud Trail events using Find-CTEvent with multiple lookup attributes

问题

我需要使用 Find-CTEvent 命令从 AWS Cloud Trail 中检索 CreateImage 和 CreateSnapshot 事件。
因此,我尝试了以下操作:

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

我只获得了列表中第一个元素的事件。那么,我错在哪里?我会感激任何帮助。
谢谢。

英文:

I need to retrieve CreateImage and CreateSnapshot events from AWS Cloud Trail using Find-CTEvent cmdlet.
So I try the following:

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

And I get events only for the first element in the list.
So, where am I wrong? I'd appreciate any help.
Thank you.

答案1

得分: 1

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

-LookupAttribute <LookupAttribute[]>
包含查找属性的列表。目前,该列表只能包含一个项目。
英文:

As of 4/5/2023, this doesn't work. You can only provide a single LookupAttribute value per the documentation (https://docs.aws.amazon.com/powershell/latest/reference/items/Find-CTEvent.html)

-LookupAttribute &lt;LookupAttribute[]&gt;
Contains a list of lookup attributes. Currently the list can contain only one item.

huangapple
  • 本文由 发表于 2023年3月9日 14:31:32
  • 转载请务必保留本文链接:https://go.coder-hub.com/75681137.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定