Skip to content

Commit 7cb9ed5

Browse files
committed
[Add] - Add function for cloudtrail
1 parent 4a68fa4 commit 7cb9ed5

File tree

1 file changed

+30
-0
lines changed

1 file changed

+30
-0
lines changed

services/cloudtrail.sh

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
#!/bin/bash
2+
#
3+
# @version 1.0
4+
# @script cloudtrail.sh
5+
# @description TODO : List functions for cloudtrail
6+
#
7+
##
8+
9+
aws_cloudtrail_get_aws_config_set_recorder_event_instruction() {
10+
cat <<-__EOF__
11+
fields @timestamp, @message
12+
| sort @timestamp desc
13+
| limit 20
14+
| filter eventSource = 'config.amazonaws.com'
15+
| stats count() as count by eventName
16+
17+
fields @timestamp, @message
18+
| filter eventSource = 'config.amazonaws.com' and eventName = 'StartConfigurationRecorder'
19+
20+
__EOF__
21+
}
22+
23+
aws_cloudtrail_list_event_names() {
24+
local_aws_cloudtrail_list_event_name_peco_menu() {
25+
local aws_cloudtrail_event_name="https://gist.githubusercontent.com/vltlhson/da04f0c3b2a114f952bac215d3808223/raw/255a9435d2b71fdb900739355699b3ddffa414c2/cloudTrailEventNames.list"
26+
curl --silent -q --request GET ${aws_cloudtrail_event_name}
27+
}
28+
29+
local_aws_cloudtrail_list_event_name_peco_menu | peco
30+
}

0 commit comments

Comments
 (0)