Class | AWS::Base |
In: |
lib/AWS.rb
|
Parent: | Object |
This class provides all the methods for using the EC2 or ELB service including the handling of header signing and other security concerns. This class uses the Net::HTTP library to interface with the AWS Query API interface. You should not instantiate this directly, instead you should setup an instance of ‘AWS::EC2::Base’ or ‘AWS::ELB::Base’.
port | [R] | |
proxy_server | [R] | |
server | [R] | |
use_ssl | [R] |
@option options [String] :access_key_id ("") The user‘s AWS Access Key ID @option options [String] :secret_access_key ("") The user‘s AWS Secret Access Key @option options [Boolean] :use_ssl (true) Connect using SSL? @option options [String] :server ("ec2.amazonaws.com") The server API endpoint host @option options [String] :proxy_server (nil) An HTTP proxy server FQDN @return [Object] the object.
If :user_data is passed in then URL escape and Base64 encode it as needed. Need for URL Escape + Base64 encoding is determined by :base64_encoded param.
Raises the appropriate error if the specified Net::HTTPResponse object contains an AWS error; returns false otherwise.
Set the Authorization header using AWS signed header authentication
Same as pathlist except it deals with arrays of hashes. So if you pass in args ("People", [{:name=>’jon’, :age=>’22’}, {:name=>’chris’}], {:name => ‘Name’, :age => ‘Age’}) you should get {"People.1.Name"=>"jon", "People.1.Age"=>’22’, ‘People.2.Name’=>’chris’}
pathlist is a utility method which takes a key string and and array as input. It converts the array into a Hash with the hash key being ‘Key.n’ where ‘n’ increments by 1 for each iteration. So if you pass in args ("ImageId", ["123", "456"]) you should get {"ImageId.1"=>"123", "ImageId.2"=>"456"} returned.
allow us to have a one line call in each method which will do all of the work in making the actual request to AWS.