aws_recon 0.2.26 → 0.2.27

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: e94ce0b14c283d62b106df80e56dc8340c4acc37970381cf95294d337d55ceda
4
- data.tar.gz: 8e4fb54d9907493f94dfe4a3d73afcb396d8c101c309e8acacac6b527076be81
3
+ metadata.gz: 2735a8f96df8c633e71fb31cd0a67248bd4f1cf1205ef6815e438d223810f5e9
4
+ data.tar.gz: a134383f05173c5e46005859b637b45d35f2ad33df518c5befb4f443122ea623
5
5
  SHA512:
6
- metadata.gz: '0283ab12e7885d2462f24038648b5a326978a88465a92869fb8dcd617dde52789383d48a343c017050fc1c321ce72c40466a116b8d2bf3adc861fea2c4307e35'
7
- data.tar.gz: e325e70dee2f236d77c0bb72e257a80b14900d26ed3347aa316e9b0e89fec7dbfa82e3fca010ae95959692114ccd58a0b7a8addc93fc573eac193ca5ea0c4ccc
6
+ metadata.gz: 14ceefcb774b6067837b4eec5e421be0992a93372fbdea73dcc397e6e5a45c5fab69fdec8e5a150e8ce20d88215f78d35609fb59699b9cb9f9ddb63074262f71
7
+ data.tar.gz: df340090ee783531f7686c85fe42b5474d1f8f8534d0b3de1e47711e864512752e06f91f525f770c37f87714667e17257dbdc25faa4bb65ea0e8b2e0f87c0a0d
@@ -9,4 +9,20 @@
9
9
  #
10
10
  # See https://docs.rubocop.org/rubocop/configuration
11
11
  Layout/LineLength:
12
- Max: 80
12
+ Max: 100
13
+ Style/FrozenStringLiteralComment:
14
+ EnforcedStyle: always_true
15
+ Safe: true
16
+ SafeAutoCorrect: true
17
+ Style/ClassAndModuleChildren:
18
+ Enabled: false
19
+ Metrics/BlockLength:
20
+ Enabled: false
21
+ Metrics/MethodLength:
22
+ Enabled: false
23
+ Metrics/PerceivedComplexity:
24
+ Enabled: false
25
+ Metrics/CyclomaticComplexity:
26
+ Enabled: false
27
+ Metrics/AbcSize:
28
+ Enabled: false
@@ -1,3 +1,8 @@
1
+ # frozen_string_literal: true
2
+
3
+ #
4
+ # Collect RDS Resources
5
+ #
1
6
  class RDS < Mapper
2
7
  #
3
8
  # Returns an array of resources.
@@ -1,3 +1,8 @@
1
+ # frozen_string_literal: true
2
+
3
+ #
4
+ # Collect S3 Resources
5
+ #
1
6
  class S3 < Mapper
2
7
  #
3
8
  # Returns an array of resources.
@@ -63,9 +68,7 @@ class S3 < Mapper
63
68
  rescue Aws::S3::Errors::ServiceError => e
64
69
  log_error(e.code)
65
70
 
66
- unless suppressed_errors.include?(e.code) && !@options.quit_on_exception
67
- raise e
68
- end
71
+ raise e unless suppressed_errors.include?(e.code) && !@options.quit_on_exception
69
72
  end
70
73
 
71
74
  resources.push(struct.to_h)
@@ -1,3 +1,8 @@
1
+ # frozen_string_literal: true
2
+
3
+ #
4
+ # Collect SageMaker Resources
5
+ #
1
6
  class SageMaker < Mapper
2
7
  #
3
8
  # Returns an array of resources.
@@ -12,7 +17,9 @@ class SageMaker < Mapper
12
17
  log(response.context.operation_name, page)
13
18
 
14
19
  response.notebook_instances.each do |instance|
15
- struct = OpenStruct.new(instance.to_h)
20
+ struct = OpenStruct.new(@client.describe_notebook_instance({
21
+ notebook_instance_name: instance.notebook_instance_name
22
+ }).to_h)
16
23
  struct.type = 'notebook_instance'
17
24
  struct.arn = instance.notebook_instance_arn
18
25
 
@@ -20,6 +27,23 @@ class SageMaker < Mapper
20
27
  end
21
28
  end
22
29
 
30
+ #
31
+ # list_endpoints
32
+ #
33
+ @client.list_endpoints.each_with_index do |response, page|
34
+ log(response.context.operation_name, page)
35
+
36
+ response.endpoints.each do |instance|
37
+ struct = OpenStruct.new(@client.describe_endpoint({
38
+ endpoint_name: instance.endpoint_name
39
+ }).to_h)
40
+ struct.type = 'endpoint'
41
+ struct.arn = instance.endpoint_arn
42
+
43
+ resources.push(struct.to_h)
44
+ end
45
+ end
46
+
23
47
  resources
24
48
  end
25
49
  end
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  #
2
4
  # Generic wrapper for service clients.
3
5
  #
@@ -64,14 +66,14 @@ class Mapper
64
66
  end
65
67
 
66
68
  def log(*msg)
67
- if @options.verbose
68
- puts _msg(msg).map { |x| "\x1b[32m#{x}\x1b[0m" }.join("\x1b[35m.\x1b[0m")
69
- end
69
+ return unless @options.verbose
70
+
71
+ puts _msg(msg).map { |x| "\x1b[32m#{x}\x1b[0m" }.join("\x1b[35m.\x1b[0m")
70
72
  end
71
73
 
72
74
  def log_error(*msg)
73
- if @options.verbose
74
- puts _msg(msg).map { |x| "\x1b[35m#{x}\x1b[0m" }.join("\x1b[32m.\x1b[0m")
75
- end
75
+ return unless @options.verbose
76
+
77
+ puts _msg(msg).map { |x| "\x1b[35m#{x}\x1b[0m" }.join("\x1b[32m.\x1b[0m")
76
78
  end
77
79
  end
@@ -1,3 +1,3 @@
1
1
  module AwsRecon
2
- VERSION = "0.2.26"
2
+ VERSION = "0.2.27"
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.26
4
+ version: 0.2.27
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: 2020-12-15 00:00:00.000000000 Z
12
+ date: 2020-12-22 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: aws-sdk