Class: AWS::Core::CredentialProviders::EC2Provider
- Inherits:
-
Object
- Object
- AWS::Core::CredentialProviders::EC2Provider
- Includes:
- Provider
- Defined in:
- lib/aws/core/credential_providers.rb
Overview
This credential provider tries to get credentials from the EC2 metadata service.
Constant Summary
Constants included from Provider
Instance Attribute Summary collapse
- #http_debug_output ⇒ Object?
- #http_open_timeout ⇒ Float
- #http_read_timeout ⇒ Float
-
#ip_address ⇒ String
Defaults to ‘169.254.169.254’.
-
#port ⇒ Integer
Defaults to port 80.
Instance Method Summary collapse
-
#initialize(options = {}) ⇒ EC2Provider
constructor
A new instance of EC2Provider.
Methods included from Provider
#access_key_id, #credentials, #refresh, #secret_access_key, #session_token
Constructor Details
#initialize(options = {}) ⇒ EC2Provider
Returns a new instance of EC2Provider.
233 234 235 236 237 238 239 |
# File 'lib/aws/core/credential_providers.rb', line 233 def initialize = {} @ip_address = [:ip_address] || '169.254.169.254' @port = [:port] || 80 @http_open_timeout = [:http_open_timeout] || 1 @http_read_timeout = [:http_read_timeout] || 1 @http_debug_output = [:http_debug_output] end |
Instance Attribute Details
#http_debug_output ⇒ Object?
254 255 256 |
# File 'lib/aws/core/credential_providers.rb', line 254 def http_debug_output @http_debug_output end |
#http_open_timeout ⇒ Float
248 249 250 |
# File 'lib/aws/core/credential_providers.rb', line 248 def http_open_timeout @http_open_timeout end |
#http_read_timeout ⇒ Float
251 252 253 |
# File 'lib/aws/core/credential_providers.rb', line 251 def http_read_timeout @http_read_timeout end |
#ip_address ⇒ String
Returns Defaults to ‘169.254.169.254’.
242 243 244 |
# File 'lib/aws/core/credential_providers.rb', line 242 def ip_address @ip_address end |
#port ⇒ Integer
Returns Defaults to port 80.
245 246 247 |
# File 'lib/aws/core/credential_providers.rb', line 245 def port @port end |