Sha256: 6b4b6b8258a20a8c492cabe9fac088ab1606d546275e26849ebe2c42da0eb7c4

Contents?: true

Size: 874 Bytes

Versions: 14

Compression:

Stored size: 874 Bytes

Contents

module Aws
  module STS
    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
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
aws-sdk-core-3.100.0 lib/aws-sdk-sts/plugins/sts_regional_endpoints.rb
aws-sdk-core-3.99.2 lib/aws-sdk-sts/plugins/sts_regional_endpoints.rb
aws-sdk-core-3.99.1 lib/aws-sdk-sts/plugins/sts_regional_endpoints.rb
aws-sdk-core-3.99.0 lib/aws-sdk-sts/plugins/sts_regional_endpoints.rb
aws-sdk-core-3.98.0 lib/aws-sdk-sts/plugins/sts_regional_endpoints.rb
aws-sdk-core-3.97.1 lib/aws-sdk-sts/plugins/sts_regional_endpoints.rb
aws-sdk-core-3.97.0 lib/aws-sdk-sts/plugins/sts_regional_endpoints.rb
aws-sdk-core-3.96.1 lib/aws-sdk-sts/plugins/sts_regional_endpoints.rb
aws-sdk-core-3.96.0 lib/aws-sdk-sts/plugins/sts_regional_endpoints.rb
aws-sdk-core-3.95.0 lib/aws-sdk-sts/plugins/sts_regional_endpoints.rb
aws-sdk-core-3.94.1 lib/aws-sdk-sts/plugins/sts_regional_endpoints.rb
aws-sdk-core-3.94.0 lib/aws-sdk-sts/plugins/sts_regional_endpoints.rb
aws-sdk-core-3.93.0 lib/aws-sdk-sts/plugins/sts_regional_endpoints.rb
aws-sdk-core-3.92.0 lib/aws-sdk-sts/plugins/sts_regional_endpoints.rb