如果我跑步aws --profile dev rds describe-events
,
我得到如下输出:
{
"Events": [
{
"SourceIdentifier": "dev-important-data",
"SourceType": "db-instance",
"Message": "CloudWatch Logs Export enabled for logs [audit, error, general, slowquery]",
"EventCategories": [],
"Date": "2019-06-27T05:26:02.469Z",
"SourceArn": "arn:aws:rds:us-east-1:141888792464:db:dev-important-data"
}
}
是否可以对输出应用过滤器,以便我只能看到来自某个特定来源的事件SourceIdentifier
?
我试过
aws --profile dev rds describe-events --duration 1000 --filters "Name=SourceIdentifier,Values=dev-important-data"
但我收到了错误:
Unrecognized filter name: SourceIdentifier
然后我尝试使用该值Events.SourceIdentifier
,但仍然出现同样的错误:Unrecognized filter name: Events.SourceIdentifier
构建过滤器的正确方法是什么?
答案1
我应该使用-source-identifier
和 --source-type=db-instance
参数