Class: Aws::S3::ExpressCredentialsProvider
- Inherits:
-
Object
- Object
- Aws::S3::ExpressCredentialsProvider
- Defined in:
- lib/aws-sdk-s3/express_credentials_provider.rb
Overview
Returns Credentials class for S3 Express. Accepts CreateSession params as options. See Client#create_session for details.
Instance Attribute Summary collapse
-
#client ⇒ Object
Returns the value of attribute client.
Instance Method Summary collapse
- #express_credentials_for(bucket) ⇒ Object
-
#initialize(options = {}) ⇒ ExpressCredentialsProvider
constructor
A new instance of ExpressCredentialsProvider.
Constructor Details
#initialize(options = {}) ⇒ ExpressCredentialsProvider
Returns a new instance of ExpressCredentialsProvider.
21 22 23 24 25 26 27 28 |
# File 'lib/aws-sdk-s3/express_credentials_provider.rb', line 21 def initialize( = {}) @client = .delete(:client) @caching = .delete(:caching) != false @options = return unless @caching @cache = Aws::S3.express_credentials_cache end |
Instance Attribute Details
#client ⇒ Object
Returns the value of attribute client.
38 39 40 |
# File 'lib/aws-sdk-s3/express_credentials_provider.rb', line 38 def client @client end |
Instance Method Details
#express_credentials_for(bucket) ⇒ Object
30 31 32 33 34 35 36 |
# File 'lib/aws-sdk-s3/express_credentials_provider.rb', line 30 def express_credentials_for(bucket) if @caching cached_credentials_for(bucket) else new_credentials_for(bucket) end end |