class Aws::AssumeRoleWebIdentityCredentials
def initialize(options = {})
(**options)
-
before_refresh
(Callable
) -- Proc called before -
:client
(STS::Client
) -- -
:role_session_name
(String
) -- the IAM session -
:web_identity_token_file
(required, String
) -- -
:role_arn
(required, String
) -- the IAM role
Parameters:
-
options
(Hash
) --
def initialize(options = {}) client_opts = {} @assume_role_web_identity_params = {} @token_file = options.delete(:web_identity_token_file) @async_refresh = true options.each_pair do |key, value| if self.class.assume_role_web_identity_options.include?(key) @assume_role_web_identity_params[key] = value elsif !CLIENT_EXCLUDE_OPTIONS.include?(key) client_opts[key] = value end end unless @assume_role_web_identity_params[:role_session_name] # not provided, generate encoded UUID as session name @assume_role_web_identity_params[:role_session_name] = _session_name end @client = client_opts[:client] || STS::Client.new(client_opts.merge(credentials: false)) super end