Class: Amazon::Coral::AwsQuery

Inherits:
Object
  • Object
show all
Defined in:
lib/amazon/coral/awsquery.rb

Constant Summary collapse

@@identity_arg_keys =
[:aws_access_key, :aws_secret_key, :http_authorization, :http_client_x509_cert, :http_client_x509_key]
@@recognized_arg_keys =
[:endpoint, :uri, :signature_algorithm, :ca_file, :verbose, 
:aws_access_key, :aws_secret_key, :http_authorization, :http_client_x509_cert, :http_client_x509_key,
:timeout, :connect_timeout]

Class Method Summary collapse

Class Method Details

.new_orchestrator(args) ⇒ Object

Creates an Orchestrator capable of processing AWS/QUERY requests. Possible arguments include:

:endpoint

The HTTP URL at which the service is located.

:signature_algorithm

The AWS signature version to be used to sign outgoing requests. Current choices are:

:V0 :V1 :V2

By default, the version 2 signing algorithm is used. All signing may be disabled by passing the value ‘nil’ as the signature algorithm.

:aws_access_key

An AWS access key to associate with every outgoing request. This parameter is optional and may be specified on a per-request basis as well.

:aws_secret_key

An AWS secret key to associate with every outgoing request. This parameter is optional and may be specified on a per-request basis as well.

:http_client_x509_cert

A base64-encoded X509 certificate to sign outgoing requests. Requires that the x509 key also be specified.

:http_client_x509_key

A base64-encoded private key for an X509 certificate to sign outgoing requests. Requires that the x509 certificate also be specified.

:http_authorization

The content of an http-authorization header to send with the request. Used for services which require HTTP basic authentication.

:ca_file

A Certificate Authority file to pass to the HttpHandler.

:timeout

The socket read timeout to use during service calls (see HttpHandler for details)

:connect_timeout

A timeout to use for establishing a connection to the service (see HttpHandler for details)

:verbose

A verbosity flag to pass to the HttpHandler.

Example usage:

orchestrator = AwsQuery.new_orchestrator(:endpoint => "http://localhost:8000", :signature_algorithm => :V2)
client = ExampleClient.new(orchestrator)


60
61
62
63
# File 'lib/amazon/coral/awsquery.rb', line 60

def AwsQuery.new_orchestrator(args)
  check_args(args)
  return Orchestrator.new(new_chain(args))
end