Class: Aws::Crt::Auth::Credentials

Inherits:
Object
  • Object
show all
Includes:
ManagedNative
Defined in:
lib/aws-crt/auth/credentials.rb

Overview

Utility class for Credentials.

Instance Method Summary collapse

Methods included from ManagedNative

included, #manage_native, #native, #native_set?, #release

Constructor Details

#initialize(access_key_id, secret_access_key, session_token = nil, expiration = nil) ⇒ Credentials

Returns a new instance of Credentials.

Parameters:

  • access_key_id (String)
  • secret_access_key (String)
  • session_token (String) (defaults to: nil)

    (nil)

  • expiration (Time|int) (defaults to: nil)

    (nil) - Either a Time or an int seconds since unix epoch



62
63
64
65
66
67
68
69
70
71
72
73
74
# File 'lib/aws-crt/auth/credentials.rb', line 62

def initialize(access_key_id, secret_access_key,
               session_token = nil, expiration = nil)

  credential_options = CredentialsOptions.new(
    access_key_id, secret_access_key,
    session_token, expiration
  )
  manage_native do
    Aws::Crt::Native.credentials_new(
      credential_options.native
    )
  end
end