Class: Aws::Crt::Auth::StaticCredentialsProviderOptions
- Inherits:
-
Object
- Object
- Aws::Crt::Auth::StaticCredentialsProviderOptions
- Includes:
- ManagedNative
- Defined in:
- lib/aws-crt/auth/static_credentials_provider.rb
Overview
CRT CredentialOptions
Instance Method Summary collapse
-
#initialize(access_key_id, secret_access_key, session_token = nil) ⇒ StaticCredentialsProviderOptions
constructor
A new instance of StaticCredentialsProviderOptions.
Methods included from ManagedNative
included, #manage_native, #native, #native_set?, #release
Constructor Details
#initialize(access_key_id, secret_access_key, session_token = nil) ⇒ StaticCredentialsProviderOptions
Returns a new instance of StaticCredentialsProviderOptions.
14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 |
# File 'lib/aws-crt/auth/static_credentials_provider.rb', line 14 def initialize(access_key_id, secret_access_key, session_token = nil) if !access_key_id || access_key_id.empty? raise ArgumentError, 'access_key_id must be set' end if !secret_access_key || secret_access_key.empty? raise ArgumentError, 'secret_access_key must be set' end manage_native do Aws::Crt::Native. end Aws::Crt::Native.( native, access_key_id, access_key_id.length ) Aws::Crt::Native.( native, secret_access_key, secret_access_key.length ) if session_token && !session_token.empty? Aws::Crt::Native.( native, session_token, session_token.length ) end end |