Как задать несколько атрибутов поиска при запросе событий cloudtrail

Можно ли запросить cloudtrail с несколькими атрибутами поиска

Когда я выполняю следующее

aws cloudtrail lookup-events --lookup-attributes AttributeKey=EventName,AttributeValue=CreateTopic 

Это дает мне список событий типа 'CreateTopic'

Когда я выполняю следующее

aws cloudtrail lookup-events --lookup-attributes AttributeKey=AttributeKey=Username,AttributeValue=MyUserName 

Это дает мне список событий, связанных с пользователем 'MyUserName'

Тем не менее, я хочу, чтобы запросить все события типа "CreateTopic" и связанные с пользователем "MyUserName"

Я пытался следовать, но ни один из них не работает

aws cloudtrail lookup-events --lookup-attributes AttributeKey=EventName,AttributeValue=CreateTopic,AttributeKey=Username,AttributeValue=MyUserName 
aws cloudtrail lookup-events --lookup-attributes AttributeKey=EventName,AttributeValue=CreateTopic AttributeKey=Username,AttributeValue=MyUserName 
aws cloudtrail lookup-events --lookup-attributes AttributeKey=EventName,AttributeValue=CreateTopic --lookup-attributes AttributeKey=Username,AttributeValue=MyUserName 

1 ответ

Решение

Из документации, --lookup-attributes поддерживает только один элемент списка.

--lookup-attributes (list)

    Contains a list of lookup attributes. Currently the list can contain only one item.

https://docs.aws.amazon.com/cli/latest/reference/cloudtrail/lookup-events.html

Другие вопросы по тегам