Sha256: e919898ce9bf9ca7535dd584ba9118395c14c71b25d79e5dd8705f7bcc258e70
Contents?: true
Size: 1.25 KB
Versions: 18
Compression:
Stored size: 1.25 KB
Contents
# frozen_string_literal: true module Aws class Credentials # @param [String] access_key_id # @param [String] secret_access_key # @param [String] session_token (nil) # @param [Hash] kwargs # @option kwargs [String] :credential_scope (nil) def initialize(access_key_id, secret_access_key, session_token = nil, **kwargs) @access_key_id = access_key_id @secret_access_key = secret_access_key @session_token = session_token @account_id = kwargs[:account_id] end # @return [String] attr_reader :access_key_id # @return [String] attr_reader :secret_access_key # @return [String, nil] attr_reader :session_token # @return [String, nil] attr_reader :account_id # @return [Credentials] def credentials self end # @return [Boolean] Returns `true` if the access key id and secret # access key are both set. def set? !access_key_id.nil? && !access_key_id.empty? && !secret_access_key.nil? && !secret_access_key.empty? end # Removing the secret access key from the default inspect string. # @api private def inspect "#<#{self.class.name} access_key_id=#{access_key_id.inspect}>" end end end
Version data entries
18 entries across 18 versions & 1 rubygems