Class: Aws::ECSCredentials
- Inherits:
-
Object
- Object
- Aws::ECSCredentials
- Includes:
- CredentialProvider, RefreshingCredentials
- Defined in:
- lib/aws-sdk-core/ecs_credentials.rb
Overview
Defined Under Namespace
Classes: InvalidTokenError, Non200Response, TokenFileReadError
Constant Summary collapse
- NETWORK_ERRORS =
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 ].freeze
Constants included from RefreshingCredentials
RefreshingCredentials::ASYNC_EXPIRATION_LENGTH, RefreshingCredentials::CLIENT_EXCLUDE_OPTIONS, RefreshingCredentials::SYNC_EXPIRATION_LENGTH
Instance Attribute Summary collapse
-
#retries ⇒ Integer
readonly
The number of times to retry failed attempts to fetch credentials from the instance metadata service.
Attributes included from CredentialProvider
Instance Method Summary collapse
-
#initialize(options = {}) ⇒ ECSCredentials
constructor
A new instance of ECSCredentials.
Methods included from RefreshingCredentials
Methods included from CredentialProvider
Constructor Details
#initialize(options = {}) ⇒ ECSCredentials
Returns a new instance of ECSCredentials.
67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 |
# File 'lib/aws-sdk-core/ecs_credentials.rb', line 67 def initialize( = {}) credential_path = [:credential_path] || ENV['AWS_CONTAINER_CREDENTIALS_RELATIVE_URI'] endpoint = [:endpoint] || ENV['AWS_CONTAINER_CREDENTIALS_FULL_URI'] initialize_uri(, credential_path, endpoint) @retries = [:retries] || 5 @http_open_timeout = [:http_open_timeout] || 5 @http_read_timeout = [:http_read_timeout] || 5 @http_debug_output = [:http_debug_output] @backoff = backoff([:backoff]) @async_refresh = false super end |
Instance Attribute Details
#retries ⇒ Integer (readonly)
Returns The number of times to retry failed attempts to fetch credentials from the instance metadata service. Defaults to 0.
85 86 87 |
# File 'lib/aws-sdk-core/ecs_credentials.rb', line 85 def retries @retries end |