Class | AWS::Core::Client |
In: |
lib/aws/core/client.rb
|
Parent: | Object |
Base class for all of the Amazon AWS service clients. @private
CACHEABLE_REQUESTS | = | Set.new |
config | [R] | @return [Configuration] This clients configuration. |
endpoint | [R] |
@return [String] Returns the service endpoint (hostname) this client
makes requests against. |
port | [R] | @return [Integer] What port this client makes requests via. |
service_ruby_name | [R] |
@return [String] The snake-cased ruby name for the service
(e.g. 's3', 'iam', 'dynamo_db', etc). |
signer | [R] |
@return [DefaultSigner,Object] Returns the
signer for this client.
This is normally a DefaultSigner, but it can be configured to an other object. |
Creates a new low-level client.
To create a client you must provide access to AWS credentials. There are two options:
Primarily used for testing, this method returns an empty psuedo service response without making a request. Its used primarily for testing the ligher level service interfaces. @private
@param [Configuration] The configuration object to use. @return [Core::Client] Returns a new client object with the given
configuration.
Returns a copy of the client with a different HTTP handler. You can pass an object like BuiltinHttpHandler or you can use a block; for example:
s3_with_logging = s3.with_http_handler do |request, response| $stderr.puts request.inspect super end
The block executes in the context of an HttpHandler instance, and super delegates to the HTTP handler used by this client. This provides an easy way to spy on requests and responses. See HttpHandler, HttpRequest, and HttpResponse for more details on how to implement a fully functional HTTP handler using a different HTTP library than the one that ships with Ruby. @param handler (nil) A new http handler. Leave blank and pass a
block to wrap the current handler with the block.
@return [Core::Client] Returns a new instance of the client class with
the modified or wrapped http handler.