Class: Aws::InstanceIdentityCredentials
- Inherits:
-
Object
- Object
- Aws::InstanceIdentityCredentials
- Includes:
- CredentialProvider, RefreshingCredentials
- Defined in:
- lib/aws-sdk-core/instance_identity_credentials.rb
Defined Under Namespace
Classes: Non200Response
Constant Summary collapse
- FAILURES =
This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.
These are the errors we trap when attempting to talk to the instance metadata service. Any of these imply the service is not present, no responding or some other non-recoverable error.
[ Errno::EHOSTUNREACH, Errno::ECONNREFUSED, Errno::EHOSTDOWN, Errno::ENETUNREACH, SocketError, Timeout::Error, Non200Response, ]
Instance Attribute Summary collapse
-
#from_identity ⇒ Object
readonly
Returns the value of attribute from_identity.
-
#retries ⇒ Integer
readonly
The number of times to retry failed atttempts to fetch credentials from the instance metadata service.
Instance Method Summary collapse
-
#initialize(options = {}) ⇒ InstanceIdentityCredentials
constructor
A new instance of InstanceIdentityCredentials.
Constructor Details
#initialize(options = {}) ⇒ InstanceIdentityCredentials
Returns a new instance of InstanceIdentityCredentials.
43 44 45 46 47 48 49 50 51 52 |
# File 'lib/aws-sdk-core/instance_identity_credentials.rb', line 43 def initialize = {} @from_identity = true @retries = [:retries] || 5 @ip_address = [:ip_address] || '169.254.169.254' @port = [:port] || 80 @http_open_timeout = [:http_open_timeout] || 5 @http_read_timeout = [:http_read_timeout] || 5 @http_debug_output = [:http_debug_output] super end |
Instance Attribute Details
#from_identity ⇒ Object (readonly)
Returns the value of attribute from_identity.
58 59 60 |
# File 'lib/aws-sdk-core/instance_identity_credentials.rb', line 58 def from_identity @from_identity end |
#retries ⇒ Integer (readonly)
Returns The number of times to retry failed atttempts to fetch credentials from the instance metadata service. Defaults to 0.
56 57 58 |
# File 'lib/aws-sdk-core/instance_identity_credentials.rb', line 56 def retries @retries end |