Sha256: c3f8b17ba9d6b5f662c004ae8489e5a2414db5125014f7fcd0970836c6650b97
Contents?: true
Size: 1003 Bytes
Versions: 152
Compression:
Stored size: 1003 Bytes
Contents
# frozen_string_literal: true module Aws # @api private module Plugins # @api private class DefaultsMode < Seahorse::Client::Plugin option(:defaults_mode, default: 'legacy', doc_type: String, docstring: <<-DOCS See {Aws::DefaultsModeConfiguration} for a list of the accepted modes and the configuration defaults that are included. DOCS ) do |cfg| resolve_defaults_mode(cfg) end option(:defaults_mode_config_resolver, doc_type: 'Aws::DefaultsModeConfigResolver') do |cfg| Aws::DefaultsModeConfigResolver.new( Aws::DefaultsModeConfiguration::SDK_DEFAULT_CONFIGURATION, cfg) end class << self private def resolve_defaults_mode(cfg) value = ENV['AWS_DEFAULTS_MODE'] value ||= Aws.shared_config.defaults_mode( profile: cfg.profile ) value&.downcase || "legacy" end end end end end
Version data entries
152 entries across 152 versions & 1 rubygems