Module: LogStash::PluginMixins::AwsConfig::V2
Defined Under Namespace
Modules: RegisterInterceptor
Class Method Summary
collapse
Instance Method Summary
collapse
Class Method Details
.included(base) ⇒ Object
13
14
15
16
17
|
# File 'lib/logstash/plugin_mixins/aws_config/v2.rb', line 13
def self.included(base)
base.extend(self)
base.send(:include, LogStash::PluginMixins::AwsConfig::Generic)
base.prepend(RegisterInterceptor)
end
|
Instance Method Details
#aws_options_hash ⇒ Object
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
|
# File 'lib/logstash/plugin_mixins/aws_config/v2.rb', line 20
def aws_options_hash
opts = {}
opts[:http_proxy] = @proxy_uri if @proxy_uri
if @role_arn
credentials = assume_role(opts.dup)
opts[:credentials] = credentials
else
credentials = aws_credentials
opts[:credentials] = credentials if credentials
end
if self.respond_to?(:aws_service_endpoint)
opts.merge!(self.aws_service_endpoint(@region))
else
opts[:region] = @region
end
opts[:endpoint] = @endpoint unless @endpoint.nil?
if respond_to?(:additional_settings)
opts = symbolize_keys_and_cast_true_false(additional_settings).merge(opts)
end
if @use_aws_bundled_ca
aws_core_library = Gem.loaded_specs['aws-sdk-core']&.full_gem_path or fail("AWS Core library not available")
opts[:ssl_ca_bundle] = File.expand_path('ca-bundle.crt', aws_core_library).tap do |aws_core_ca_bundle|
fail("AWS Core CA bundle not found") unless File.exists?(aws_core_ca_bundle)
end
end
return opts
end
|