class Aws::S3::ExpressCredentialsProvider

params as options. See {Client#create_session} for details.
Returns Credentials class for S3 Express. Accepts CreateSession

def cached_credentials_for(bucket)

def cached_credentials_for(bucket)
  if @cache.key?(bucket)
    @cache[bucket]
  else
    @cache[bucket] = new_credentials_for(bucket)
  end
end

def express_credentials_for(bucket)

def express_credentials_for(bucket)
  if @caching
    cached_credentials_for(bucket)
  else
    new_credentials_for(bucket)
  end
end

def initialize(options = {})

Options Hash: (**options)
  • :before_refresh (Callable) -- Proc called before
  • :caching (Boolean) -- When true, credentials will
  • :session_mode (String) --
  • :client (Client) -- The S3 client used to create the

Parameters:
  • options (Hash) --
def initialize(options = {})
  @client = options.delete(:client)
  @caching = options.delete(:caching) != false
  @options = options
  return unless @caching
  @cache = Aws::S3.express_credentials_cache
end

def new_credentials_for(bucket)

def new_credentials_for(bucket)
  ExpressCredentials.new(
    bucket: bucket,
    client: @client,
    **@options
  )
end