Class: Aws::Sigv2::StaticCredentialsProvider

Inherits:
Object
  • Object
show all
Defined in:
lib/aws-sigv2/credentials.rb

Overview

The default credential provider class.

StaticCredentialsProvider.new({
  access_key_id: 'akid',
  secret_access_key: 'secret',
})

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(options = {}) ⇒ StaticCredentialsProvider

Returns a new instance of StaticCredentialsProvider.

Parameters:

  • options (Hash) (defaults to: {})

    a customizable set of options

Options Hash (options):

  • :credentials (Credentials)
  • :access_key_id (String)
  • :secret_access_key (String)
  • :session_token (String) — default: nil


45
46
47
48
49
# File 'lib/aws-sigv2/credentials.rb', line 45

def initialize(options = {})
  @credentials = options[:credentials] ?
    options[:credentials] :
    Credentials.new(options)
end

Instance Attribute Details

#credentialsCredentials (readonly)

Returns:



52
53
54
# File 'lib/aws-sigv2/credentials.rb', line 52

def credentials
  @credentials
end