Sha256: 3e69ba925559452651e2c1c9a10eeb5b0d4105994e3261108e7de65dcc8f0032

Contents?: true

Size: 878 Bytes

Versions: 159

Compression:

Stored size: 878 Bytes

Contents

module Aws
  module Plugins

    class STSRegionalEndpoints < Seahorse::Client::Plugin

      option(:sts_regional_endpoints,
        default: 'regional',
        doc_type: String,
        docstring: <<-DOCS) do |cfg|
Passing in 'regional' to enable regional endpoint for STS for all supported
regions (except 'aws-global'). Using 'legacy' mode will force all legacy 
regions to resolve to the STS global endpoint.
      DOCS
        resolve_sts_regional_endpoints(cfg)
      end

      private
                                                                       
      def self.resolve_sts_regional_endpoints(cfg)
        env_mode = ENV['AWS_STS_REGIONAL_ENDPOINTS']
        env_mode = nil if env_mode == ''
        cfg_mode = Aws.shared_config.sts_regional_endpoints(
          profile: cfg.profile)
        env_mode || cfg_mode || 'regional'
      end

    end

  end
end

Version data entries

159 entries across 159 versions & 1 rubygems

Version Path
aws-sdk-core-2.11.632 lib/aws-sdk-core/plugins/sts_regional_endpoints.rb
aws-sdk-core-2.11.631 lib/aws-sdk-core/plugins/sts_regional_endpoints.rb
aws-sdk-core-2.11.630 lib/aws-sdk-core/plugins/sts_regional_endpoints.rb
aws-sdk-core-2.11.629 lib/aws-sdk-core/plugins/sts_regional_endpoints.rb
aws-sdk-core-2.11.628 lib/aws-sdk-core/plugins/sts_regional_endpoints.rb
aws-sdk-core-2.11.627 lib/aws-sdk-core/plugins/sts_regional_endpoints.rb
aws-sdk-core-2.11.626 lib/aws-sdk-core/plugins/sts_regional_endpoints.rb
aws-sdk-core-2.11.625 lib/aws-sdk-core/plugins/sts_regional_endpoints.rb
aws-sdk-core-2.11.624 lib/aws-sdk-core/plugins/sts_regional_endpoints.rb
aws-sdk-core-2.11.623 lib/aws-sdk-core/plugins/sts_regional_endpoints.rb
aws-sdk-core-2.11.622 lib/aws-sdk-core/plugins/sts_regional_endpoints.rb
aws-sdk-core-2.11.621 lib/aws-sdk-core/plugins/sts_regional_endpoints.rb
aws-sdk-core-2.11.620 lib/aws-sdk-core/plugins/sts_regional_endpoints.rb
aws-sdk-core-2.11.619 lib/aws-sdk-core/plugins/sts_regional_endpoints.rb
aws-sdk-core-2.11.618 lib/aws-sdk-core/plugins/sts_regional_endpoints.rb
aws-sdk-core-2.11.617 lib/aws-sdk-core/plugins/sts_regional_endpoints.rb
aws-sdk-core-2.11.616 lib/aws-sdk-core/plugins/sts_regional_endpoints.rb
aws-sdk-core-2.11.615 lib/aws-sdk-core/plugins/sts_regional_endpoints.rb
aws-sdk-core-2.11.614 lib/aws-sdk-core/plugins/sts_regional_endpoints.rb
aws-sdk-core-2.11.613 lib/aws-sdk-core/plugins/sts_regional_endpoints.rb