aws_recon 0.2.29 → 0.2.34

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a607b768fb5220d5db2fb904b74a06669ac5f3b966260bd401cc63eed5fc0c66
4
- data.tar.gz: 4798d7b5d6ee9ec3353a2cb0d5a00d284102030b46b2a0a66637d0741a439f9f
3
+ metadata.gz: 9097aec2d8a54e8604fd3859277dddfb4c124d4ff5e2637896f07300e8453a69
4
+ data.tar.gz: af2804e4ef46dce207506e3bae4123b4a6fe5279e5ede5751427e0b3cd12db64
5
5
  SHA512:
6
- metadata.gz: 4846c6ec9026d462b18a9ccecd0efa628d61b06431568c80d11c6b845fba94b964f564fb3ad018cfc2c3786ba57a7faf6080aba6617905d6fb3003b53ad21034
7
- data.tar.gz: 4de17a7300f269790a9406788943c8260617022914a3b0c9e84e2f3a1b8557552a7ada8b4f0681442a9cba70784f2309c4a395b4fc4e4e4755dc73fdbaa52cb0
6
+ metadata.gz: 51d6793e2bf680f0915f4edec1b9741c147d6e393a3ecb08b3bc8b01e0a664bd6a4bfb55644f7bff94b83cca8c1315bccbeffa417a392bd958e93000135ffda7
7
+ data.tar.gz: e8df00ba291a752e0573892e6aaf513ec72176416fdef2fb4553e09fa13af6f12684034b3198e5a9529f8a2baf06ea658b4bb92961eadd6163aef46390b9d344
@@ -24,7 +24,7 @@ class CloudTrail < Mapper
24
24
  end
25
25
 
26
26
  struct = OpenStruct.new(trail.to_h)
27
- struct.tags = client.list_tags({ resource_id_list: [trail.trail_arn] }).resource_tag_list.first.tags_list
27
+ struct.tags = client.list_tags({ resource_id_list: [trail.trail_arn] }).resource_tag_list.first.tags_list.map(&:to_h)
28
28
  struct.type = 'cloud_trail'
29
29
  struct.event_selectors = client.get_event_selectors({ trail_name: trail.name }).to_h
30
30
  struct.status = client.get_trail_status({ name: trail.name }).to_h
@@ -28,6 +28,7 @@ class CloudWatch < Mapper
28
28
  struct = OpenStruct.new(alarm.to_h)
29
29
  struct.type = 'metric_alarm'
30
30
  struct.arn = alarm.alarm_arn
31
+ struct.state_reason_data = alarm.state_reason_data&.parse_policy
31
32
 
32
33
  resources.push(struct.to_h)
33
34
  end
@@ -43,7 +43,7 @@ class ConfigService < Mapper
43
43
  response.configuration_recorders.each do |recorder|
44
44
  struct = OpenStruct.new(recorder.to_h)
45
45
  struct.type = 'configuration_recorder'
46
- struct.arn = "arn:aws:config:#{@region}:configuration_recorder/#{recorder.name}"
46
+ struct.arn = "arn:aws:config:#{@region}:#{@account}:configuration_recorder/#{recorder.name}"
47
47
 
48
48
  # describe_configuration_recorder_status (only accepts one recorder)
49
49
  @client.describe_configuration_recorder_status({ configuration_recorder_names: [recorder.name] }).each do |response|
@@ -55,8 +55,8 @@ class EC2 < Mapper
55
55
  log(response.context.operation_name, page)
56
56
 
57
57
  # reservations
58
- response.reservations.each_with_index do |reservation, page|
59
- log(response.context.operation_name, 'reservations', page)
58
+ response.reservations.each_with_index do |reservation, rpage|
59
+ log(response.context.operation_name, 'reservations', rpage)
60
60
 
61
61
  # instances
62
62
  reservation.instances.each do |instance|
@@ -20,6 +20,7 @@ class ElasticLoadBalancing < Mapper
20
20
  struct = OpenStruct.new(elb.to_h)
21
21
  struct.type = 'load_balancer'
22
22
  struct.arn = elb.dns_name
23
+ struct.load_balancer_version = 'v1'
23
24
 
24
25
  # describe_load_balancer_policies
25
26
  struct.policies = @client
@@ -20,6 +20,8 @@ class ElasticLoadBalancingV2 < Mapper
20
20
  struct = OpenStruct.new(elb.to_h)
21
21
  struct.type = 'load_balancer'
22
22
  struct.arn = elb.load_balancer_arn
23
+ struct.load_balancer_version = 'v2'
24
+ struct.load_balancer_type = elb.type
23
25
  struct.listeners = []
24
26
  struct.target_groups = []
25
27
 
@@ -22,6 +22,7 @@ class ElasticsearchService < Mapper
22
22
  # describe_elasticsearch_domains
23
23
  struct = OpenStruct.new(@client.describe_elasticsearch_domain({ domain_name: domain.domain_name }).domain_status.to_h)
24
24
  struct.type = 'domain'
25
+ struct.access_policies = struct.access_policies&.parse_policy
25
26
 
26
27
  resources.push(struct.to_h)
27
28
  end
@@ -22,7 +22,7 @@ class GuardDuty < Mapper
22
22
  # get_detector
23
23
  struct = OpenStruct.new(@client.get_detector({ detector_id: detector }).to_h)
24
24
  struct.type = 'detector'
25
- struct.arn = "arn:aws:guardduty:#{@region}:detector/#{detector}"
25
+ struct.arn = "arn:aws:guardduty:#{@region}:#{@account}:detector/#{detector}"
26
26
 
27
27
  # get_findings_statistics (only active findings)
28
28
  struct.findings_statistics = @client.get_findings_statistics({
@@ -85,7 +85,7 @@ class IAM < Mapper
85
85
  create_date: p.create_date
86
86
  }
87
87
  end
88
- end
88
+ end
89
89
 
90
90
  resources.push(struct.to_h)
91
91
  end
@@ -51,7 +51,7 @@ class KMS < Mapper
51
51
  log(response.context.operation_name, 'get_key_policy')
52
52
  struct.policy = @client
53
53
  .get_key_policy({ key_id: key.key_id, policy_name: 'default' })
54
- .policy
54
+ .policy.parse_policy
55
55
 
56
56
  # list_aliases
57
57
  log(response.context.operation_name, 'list_aliases')
@@ -67,6 +67,24 @@ class RDS < Mapper
67
67
  end
68
68
  end
69
69
 
70
+ #
71
+ # describe_db_cluster_snapshots
72
+ #
73
+ @client.describe_db_cluster_snapshots.each_with_index do |response, page|
74
+ log(response.context.operation_name, page)
75
+
76
+ response.db_cluster_snapshots.each do |snapshot|
77
+ log(response.context.operation_name, snapshot.db_cluster_snapshot_identifier)
78
+
79
+ struct = OpenStruct.new(snapshot.to_h)
80
+ struct.type = 'db_cluster_snapshot'
81
+ struct.arn = snapshot.db_cluster_snapshot_arn
82
+ struct.parent_id = snapshot.db_cluster_identifier
83
+
84
+ resources.push(struct.to_h)
85
+ end
86
+ end
87
+
70
88
  #
71
89
  # describe_db_engine_versions
72
90
  #
@@ -19,7 +19,7 @@ class SES < Mapper
19
19
  response.identities.each do |identity|
20
20
  struct = OpenStruct.new
21
21
  struct.type = 'identity'
22
- struct.arn = "aws:ses:#{@region}::identity/#{identity}"
22
+ struct.arn = "aws:ses:#{@region}:#{@account}:identity/#{identity}"
23
23
 
24
24
  # get_identity_dkim_attributes
25
25
  struct.dkim_attributes = @client.get_identity_dkim_attributes({ identities: [identity] }).dkim_attributes[identity].to_h
@@ -1,3 +1,3 @@
1
1
  module AwsRecon
2
- VERSION = "0.2.29"
2
+ VERSION = "0.2.34"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: aws_recon
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.29
4
+ version: 0.2.34
5
5
  platform: ruby
6
6
  authors:
7
7
  - Josh Larsen
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2021-01-25 00:00:00.000000000 Z
12
+ date: 2021-02-02 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: aws-sdk