Sha256: 0779f9f5e718f1d6581dcc7bd51584c581fb002dce03498e7ef7601fb4cae917

Contents?: true

Size: 905 Bytes

Versions: 45

Compression:

Stored size: 905 Bytes

Contents

# frozen_string_literal: true

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

45 entries across 45 versions & 1 rubygems

Version Path
aws-sdk-core-3.124.0 lib/aws-sdk-sts/plugins/sts_regional_endpoints.rb
aws-sdk-core-3.123.0 lib/aws-sdk-sts/plugins/sts_regional_endpoints.rb
aws-sdk-core-3.122.1 lib/aws-sdk-sts/plugins/sts_regional_endpoints.rb
aws-sdk-core-3.122.0 lib/aws-sdk-sts/plugins/sts_regional_endpoints.rb
aws-sdk-core-3.121.6 lib/aws-sdk-sts/plugins/sts_regional_endpoints.rb
aws-sdk-core-3.121.5 lib/aws-sdk-sts/plugins/sts_regional_endpoints.rb
aws-sdk-core-3.121.3 lib/aws-sdk-sts/plugins/sts_regional_endpoints.rb
aws-sdk-core-3.121.2 lib/aws-sdk-sts/plugins/sts_regional_endpoints.rb
aws-sdk-core-3.121.1 lib/aws-sdk-sts/plugins/sts_regional_endpoints.rb
aws-sdk-core-3.121.0 lib/aws-sdk-sts/plugins/sts_regional_endpoints.rb
aws-sdk-core-3.120.0 lib/aws-sdk-sts/plugins/sts_regional_endpoints.rb
aws-sdk-core-3.119.1 lib/aws-sdk-sts/plugins/sts_regional_endpoints.rb
aws-sdk-core-3.119.0 lib/aws-sdk-sts/plugins/sts_regional_endpoints.rb
aws-sdk-core-3.118.0 lib/aws-sdk-sts/plugins/sts_regional_endpoints.rb
aws-sdk-core-3.117.0 lib/aws-sdk-sts/plugins/sts_regional_endpoints.rb
aws-sdk-core-3.116.0 lib/aws-sdk-sts/plugins/sts_regional_endpoints.rb
aws-sdk-core-3.115.0 lib/aws-sdk-sts/plugins/sts_regional_endpoints.rb
aws-sdk-core-3.114.3 lib/aws-sdk-sts/plugins/sts_regional_endpoints.rb
aws-sdk-core-3.114.2 lib/aws-sdk-sts/plugins/sts_regional_endpoints.rb
aws-sdk-core-3.114.1 lib/aws-sdk-sts/plugins/sts_regional_endpoints.rb