right_aws_api 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (37) hide show
  1. checksums.yaml +7 -0
  2. data/HISTORY +2 -0
  3. data/LICENSE +19 -0
  4. data/README.md +164 -0
  5. data/Rakefile +38 -0
  6. data/lib/cloud/aws/as/manager.rb +118 -0
  7. data/lib/cloud/aws/base/helpers/utils.rb +328 -0
  8. data/lib/cloud/aws/base/manager.rb +186 -0
  9. data/lib/cloud/aws/base/parsers/response_error.rb +117 -0
  10. data/lib/cloud/aws/base/routines/request_signer.rb +80 -0
  11. data/lib/cloud/aws/cf/manager.rb +171 -0
  12. data/lib/cloud/aws/cf/routines/request_signer.rb +70 -0
  13. data/lib/cloud/aws/cf/wrappers/default.rb +213 -0
  14. data/lib/cloud/aws/cfm/manager.rb +90 -0
  15. data/lib/cloud/aws/cw/manager.rb +113 -0
  16. data/lib/cloud/aws/eb/manager.rb +87 -0
  17. data/lib/cloud/aws/ec/manager.rb +91 -0
  18. data/lib/cloud/aws/ec2/manager.rb +222 -0
  19. data/lib/cloud/aws/elb/manager.rb +120 -0
  20. data/lib/cloud/aws/emr/manager.rb +86 -0
  21. data/lib/cloud/aws/iam/manager.rb +100 -0
  22. data/lib/cloud/aws/rds/manager.rb +110 -0
  23. data/lib/cloud/aws/route53/manager.rb +177 -0
  24. data/lib/cloud/aws/route53/routines/request_signer.rb +70 -0
  25. data/lib/cloud/aws/route53/wrappers/default.rb +132 -0
  26. data/lib/cloud/aws/s3/manager.rb +373 -0
  27. data/lib/cloud/aws/s3/parsers/response_error.rb +76 -0
  28. data/lib/cloud/aws/s3/routines/request_signer.rb +243 -0
  29. data/lib/cloud/aws/s3/wrappers/default.rb +315 -0
  30. data/lib/cloud/aws/sdb/manager.rb +150 -0
  31. data/lib/cloud/aws/sns/manager.rb +96 -0
  32. data/lib/cloud/aws/sqs/manager.rb +335 -0
  33. data/lib/right_aws_api.rb +45 -0
  34. data/lib/right_aws_api_version.rb +40 -0
  35. data/right_aws_api.gemspec +55 -0
  36. data/spec/describe_calls.rb +92 -0
  37. metadata +118 -0
@@ -0,0 +1,86 @@
1
+ #--
2
+ # Copyright (c) 2013 RightScale, Inc.
3
+ #
4
+ # Permission is hereby granted, free of charge, to any person obtaining
5
+ # a copy of this software and associated documentation files (the
6
+ # 'Software'), to deal in the Software without restriction, including
7
+ # without limitation the rights to use, copy, modify, merge, publish,
8
+ # distribute, sublicense, and/or sell copies of the Software, and to
9
+ # permit persons to whom the Software is furnished to do so, subject to
10
+ # the following conditions:
11
+ #
12
+ # The above copyright notice and this permission notice shall be
13
+ # included in all copies or substantial portions of the Software.
14
+ #
15
+ # THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
16
+ # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
17
+ # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
18
+ # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
19
+ # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
20
+ # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
21
+ # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
22
+ #++
23
+
24
+ require "cloud/aws/base/manager"
25
+
26
+ module RightScale
27
+ module CloudApi
28
+ module AWS
29
+
30
+ # ElasticMapReduce namespace
31
+ module EMR
32
+
33
+ # Amazon ElasticMapReduce (EMR) compatible manager (thread safe).
34
+ #
35
+ # @example
36
+ # require "right_aws_api"
37
+ #
38
+ # emr = RightScale::CloudApi::AWS::EMR::Manager::new(key, secret, 'https://elasticmapreduce.us-east-1.amazonaws.com')
39
+ #
40
+ # # Get a list of job flows that match all of the supplied parameters
41
+ # emr.DescribeJobFlows #=>
42
+ # {"DescribeJobFlowsResponse"=>
43
+ # {"@xmlns"=>"http://elasticmapreduce.amazonaws.com/doc/2009-03-31",
44
+ # "DescribeJobFlowsResult"=>{"JobFlows"=>nil},
45
+ # "ResponseMetadata"=>{"RequestId"=>"962fa6c0-4f71-11e2-9237-6da8e8d0164c"}}}
46
+ #
47
+ # @example
48
+ # # Get a job by ID
49
+ # emr.DescribeJobFlows('JobFlowIds.member' => 'j-3UN6WX5RRO2AG')
50
+ #
51
+ # @see ApiManager
52
+ # @see http://docs.aws.amazon.com/ElasticMapReduce/latest/API/API_Operations.html
53
+ #
54
+ class Manager < AWS::Manager
55
+ end
56
+
57
+
58
+ # Amazon ElasticMapReduce (EMR) compatible manager (thread unsafe).
59
+ #
60
+ # @see Manager
61
+ #
62
+ class ApiManager < AWS::ApiManager
63
+
64
+ # Default API version for ElasticMapReduce service.
65
+ # To override the API version use :api_version key when instantiating a manager.
66
+ #
67
+ DEFAULT_API_VERSION = '2009-03-31'
68
+
69
+ error_pattern :abort_on_timeout, :path => /Action=(Run)/
70
+ error_pattern :retry, :response => /InternalError|Unavailable/i
71
+ error_pattern :disconnect_and_abort, :code => /5..|403|408/
72
+ error_pattern :disconnect_and_abort, :code => /4../, :if => Proc.new{ |opts| rand(100) < 10 }
73
+
74
+ set :response_error_parser => Parser::AWS::ResponseErrorV2
75
+
76
+ cache_pattern :verb => /get|post/,
77
+ :path => /Action=List/,
78
+ :if => Proc::new{ |o| (o[:params].keys - COMMON_QUERY_PARAMS)._blank? },
79
+ :key => Proc::new{ |o| o[:params]['Action'] },
80
+ :sign => Proc::new{ |o| o[:response].body.to_s.sub(%r{<RequestId>.+?</RequestId>}i,'') }
81
+ end
82
+ end
83
+
84
+ end
85
+ end
86
+ end
@@ -0,0 +1,100 @@
1
+ #--
2
+ # Copyright (c) 2013 RightScale, Inc.
3
+ #
4
+ # Permission is hereby granted, free of charge, to any person obtaining
5
+ # a copy of this software and associated documentation files (the
6
+ # 'Software'), to deal in the Software without restriction, including
7
+ # without limitation the rights to use, copy, modify, merge, publish,
8
+ # distribute, sublicense, and/or sell copies of the Software, and to
9
+ # permit persons to whom the Software is furnished to do so, subject to
10
+ # the following conditions:
11
+ #
12
+ # The above copyright notice and this permission notice shall be
13
+ # included in all copies or substantial portions of the Software.
14
+ #
15
+ # THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
16
+ # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
17
+ # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
18
+ # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
19
+ # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
20
+ # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
21
+ # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
22
+ #++
23
+
24
+ require "cloud/aws/base/manager"
25
+
26
+ module RightScale
27
+ module CloudApi
28
+ module AWS
29
+
30
+ # Identity and Access Management namespace
31
+ module IAM
32
+
33
+ # Amazon Identity and Access Management (IAM) compatible manager (thread safe).
34
+ #
35
+ # @example
36
+ # require "right_aws_api"
37
+ #
38
+ # iam = RightScale::CloudApi::AWS::IAM::Manager::new(key, secret, 'https://iam.amazonaws.com')
39
+ #
40
+ # # Get information about the Access Key IDs associated with the specified user.
41
+ # iam.ListAccessKeys #=>
42
+ # {"ListAccessKeysResponse"=>
43
+ # {"@xmlns"=>"https://iam.amazonaws.com/doc/2010-05-08/",
44
+ # "ListAccessKeysResult"=>
45
+ # {"IsTruncated"=>"false",
46
+ # "AccessKeyMetadata"=>
47
+ # {"member"=>
48
+ # [{"Status"=>"Inactive",
49
+ # "AccessKeyId"=>"AKIAJ23FVBWT2CPC74RQ",
50
+ # "CreateDate"=>"2010-11-19T07:40:23Z"},
51
+ # {"Status"=>"Active",
52
+ # "AccessKeyId"=>"AKIAJDAKGFLR3C44FUTA",
53
+ # "CreateDate"=>"2011-10-14T23:32:16Z"}]}},
54
+ # "ResponseMetadata"=>{"RequestId"=>"68732a2a-4f72-11e2-8c9d-7786bfa02548"}}}
55
+ #
56
+ # @example
57
+ # # List keys by user
58
+ # iam.ListAccessKeys('UserName' => 'Bob')
59
+ #
60
+ # @example
61
+ # # Create a new User
62
+ # iam.CreateUser('Path' => '/division_abc/subdivision_xyz/bob/',
63
+ # 'UserName' => 'Bob')
64
+ #
65
+ # @see ApiManager
66
+ # @see http://docs.aws.amazon.com/IAM/latest/APIReference/API_Operations.html
67
+ #
68
+ class Manager < AWS::Manager
69
+ end
70
+
71
+
72
+ # Amazon Identity and Access Management (IAM) compatible manager (thread safe).
73
+ #
74
+ # @see Manager
75
+ #
76
+ class ApiManager < AWS::ApiManager
77
+
78
+ # Default API version for Identity and Access Management service.
79
+ # To override the API version use :api_version key when instantiating a manager.
80
+ #
81
+ DEFAULT_API_VERSION = '2010-05-08'
82
+
83
+ error_pattern :abort_on_timeout, :path => /Action=(Create|Put)/
84
+ error_pattern :retry, :response => /InternalError|Unavailable/i
85
+ error_pattern :disconnect_and_abort, :code => /5..|403|408/
86
+ error_pattern :disconnect_and_abort, :code => /4../, :if => Proc.new{ |opts| rand(100) < 10 }
87
+
88
+ set :response_error_parser => Parser::AWS::ResponseErrorV2
89
+
90
+ cache_pattern :verb => /get|post/,
91
+ :path => /Action=List/,
92
+ :if => Proc::new{ |o| (o[:params].keys - COMMON_QUERY_PARAMS)._blank? },
93
+ :key => Proc::new{ |o| o[:params]['Action'] },
94
+ :sign => Proc::new{ |o| o[:response].body.to_s.sub(%r{<RequestId>.+?</RequestId>}i,'') }
95
+ end
96
+ end
97
+
98
+ end
99
+ end
100
+ end
@@ -0,0 +1,110 @@
1
+ #--
2
+ # Copyright (c) 2013 RightScale, Inc.
3
+ #
4
+ # Permission is hereby granted, free of charge, to any person obtaining
5
+ # a copy of this software and associated documentation files (the
6
+ # 'Software'), to deal in the Software without restriction, including
7
+ # without limitation the rights to use, copy, modify, merge, publish,
8
+ # distribute, sublicense, and/or sell copies of the Software, and to
9
+ # permit persons to whom the Software is furnished to do so, subject to
10
+ # the following conditions:
11
+ #
12
+ # The above copyright notice and this permission notice shall be
13
+ # included in all copies or substantial portions of the Software.
14
+ #
15
+ # THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
16
+ # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
17
+ # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
18
+ # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
19
+ # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
20
+ # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
21
+ # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
22
+ #++
23
+
24
+ require "cloud/aws/base/manager"
25
+
26
+ module RightScale
27
+ module CloudApi
28
+ module AWS
29
+
30
+ # Relational Database Service namespace
31
+ module RDS
32
+
33
+ # Amazon Relational Database Service (RDS) compatible manager (thread safe).
34
+ #
35
+ # @example
36
+ # require "right_aws_api"
37
+ #
38
+ # rds = RightScale::CloudApi::AWS::RDS::Manager::new(key, secret, 'https://rds.amazonaws.com')
39
+ #
40
+ # # Describe DB Engine Versions
41
+ # rds.DescribeDBEngineVersions #=>
42
+ # {"DescribeDBEngineVersionsResponse"=>
43
+ # {"@xmlns"=>"http://rds.amazonaws.com/doc/2011-04-01/",
44
+ # "DescribeDBEngineVersionsResult"=>
45
+ # {"DBEngineVersions"=>
46
+ # {"DBEngineVersion"=>
47
+ # [{"DBParameterGroupFamily"=>"mysql5.1",
48
+ # "Engine"=>"mysql",
49
+ # "DBEngineDescription"=>"MySQL Community Edition",
50
+ # "EngineVersion"=>"5.1.45",
51
+ # "DBEngineVersionDescription"=>"MySQL 5.1.45"},
52
+ # ...
53
+ # {"DBParameterGroupFamily"=>"sqlserver-web-11.0",
54
+ # "Engine"=>"sqlserver-web",
55
+ # "DBEngineDescription"=>"Microsoft SQL Server Web Edition",
56
+ # "EngineVersion"=>"11.00.2100.60.v1",
57
+ # "DBEngineVersionDescription"=>"SQL Server 2012 11.00.2100.60.v1"}]}},
58
+ # "ResponseMetadata"=>{"RequestId"=>"2cea9327-4f73-11e2-b200-6b97351ff318"}}}
59
+ #
60
+ # @example
61
+ # # Create a new RDS instance
62
+ # rds.CreateDBInstance( 'DBInstanceIdentifier' => 'SimCoProd01',
63
+ # 'Engine' => 'mysql',
64
+ # 'MasterUserPassword' => 'Password01',
65
+ # 'AllocatedStorage' => 10,
66
+ # 'MasterUsername' => 'master',
67
+ # 'DBInstanceClass' => 'db.m1.large',
68
+ # 'DBSubnetGroupName' => 'dbSubnetgroup01')
69
+ #
70
+ # @example
71
+ # # Delete an instance
72
+ # rds.DeleteDBInstance('DBInstanceIdentifier' => 'SimCoProd01')
73
+ #
74
+ # @see ApiManager
75
+ # @see http://docs.aws.amazon.com/AmazonRDS/latest/APIReference/API_Operations.html
76
+ #
77
+ class Manager < AWS::Manager
78
+ end
79
+
80
+
81
+ # Amazon Relational Database Service (RDS) compatible manager (thread safe).
82
+ #
83
+ # @see Manager
84
+ #
85
+ class ApiManager < AWS::ApiManager
86
+
87
+ # Default API version for RDS service.
88
+ # To override the API version use :api_version key when instantiating a manager.
89
+ #
90
+ DEFAULT_API_VERSION = '2013-02-12'
91
+
92
+ error_pattern :abort_on_timeout, :path => /Action=(Create|Purchase)/
93
+ error_pattern :retry, :response => /InternalError|Unavailable/i
94
+ error_pattern :disconnect_and_abort, :code => /5..|403|408/
95
+ error_pattern :disconnect_and_abort, :code => /4../, :if => Proc.new{ |opts| rand(100) < 10 }
96
+
97
+ set :response_error_parser => Parser::AWS::ResponseErrorV2
98
+
99
+ cache_pattern :verb => /get|post/,
100
+ :path => /Action=Describe/,
101
+ :if => Proc::new{ |o| (o[:params].keys - COMMON_QUERY_PARAMS)._blank? },
102
+ :key => Proc::new{ |o| o[:params]['Action'] },
103
+ :sign => Proc::new{ |o| o[:response].body.to_s.sub(%r{<RequestId>.+?</RequestId>}i,'') }
104
+
105
+ end
106
+ end
107
+
108
+ end
109
+ end
110
+ end
@@ -0,0 +1,177 @@
1
+ #--
2
+ # Copyright (c) 2013 RightScale, Inc.
3
+ #
4
+ # Permission is hereby granted, free of charge, to any person obtaining
5
+ # a copy of this software and associated documentation files (the
6
+ # 'Software'), to deal in the Software without restriction, including
7
+ # without limitation the rights to use, copy, modify, merge, publish,
8
+ # distribute, sublicense, and/or sell copies of the Software, and to
9
+ # permit persons to whom the Software is furnished to do so, subject to
10
+ # the following conditions:
11
+ #
12
+ # The above copyright notice and this permission notice shall be
13
+ # included in all copies or substantial portions of the Software.
14
+ #
15
+ # THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
16
+ # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
17
+ # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
18
+ # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
19
+ # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
20
+ # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
21
+ # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
22
+ #++
23
+
24
+ require "cloud/aws/base/helpers/utils"
25
+ require "cloud/aws/base/parsers/response_error"
26
+ require "cloud/aws/route53/routines/request_signer"
27
+ require "cloud/aws/route53/wrappers/default"
28
+
29
+ module RightScale
30
+ module CloudApi
31
+ module AWS
32
+
33
+ # Route 53 namespace
34
+ module Route53
35
+
36
+ # Amazon Route 53 (Route53) compatible manager (thread safe).
37
+ #
38
+ # @example
39
+ # require "right_aws_api"
40
+ #
41
+ # r53 = RightScale::CloudApi::AWS::Route53::Manager::new(
42
+ # ENV['AWS_ACCESS_KEY_ID'],
43
+ # ENV['AWS_SECRET_ACCESS_KEY'],
44
+ # 'https://route53.amazonaws.com'
45
+ # )
46
+ #
47
+ # r53.ListHostedZones #=>
48
+ # {"ListHostedZonesResponse"=>
49
+ # {"IsTruncated"=>"false",
50
+ # "HostedZones"=>
51
+ # {"HostedZone"=>
52
+ # {"Name"=>"aws.rightscale.com.",
53
+ # "CallerReference"=>"RightScaleTest",
54
+ # "Config"=>{"Comment"=>"This is RightScale test hosted zone."},
55
+ # "Id"=>"/hostedzone/Z3AINKOIEY1X3X"}},
56
+ # "MaxItems"=>"100",
57
+ # "@xmlns"=>"https://route53.amazonaws.com/doc/2011-05-05/"}}
58
+ #
59
+ #
60
+ # @example
61
+ # r53.ListResourceRecordSets #=>
62
+ # {"ListResourceRecordSetsResponse"=>
63
+ # {"IsTruncated"=>"false",
64
+ # "MaxItems"=>"100",
65
+ # "@xmlns"=>"https://route53.amazonaws.com/doc/2011-05-05/",
66
+ # "ResourceRecordSets"=>
67
+ # {"ResourceRecordSet"=>
68
+ # [{"ResourceRecords"=>
69
+ # {"ResourceRecord"=>
70
+ # [{"Value"=>"ns-671.awsdns-19.net."},
71
+ # {"Value"=>"ns-1057.awsdns-04.org."},
72
+ # {"Value"=>"ns-1885.awsdns-43.co.uk."},
73
+ # {"Value"=>"ns-438.awsdns-54.com."}]},
74
+ # "TTL"=>"172800",
75
+ # "Name"=>"aws.rightscale.com.",
76
+ # "Type"=>"NS"},
77
+ # {"ResourceRecords"=>
78
+ # {"ResourceRecord"=>
79
+ # {"Value"=>
80
+ # "ns-671.awsdns-19.net. awsdns-hostmaster.amazon.com. 1 7200 900 1209600 86400"}},
81
+ # "TTL"=>"1000",
82
+ # "Name"=>"aws.rightscale.com.",
83
+ # "Type"=>"SOA"},
84
+ # {"ResourceRecords"=>{"ResourceRecord"=>{"Value"=>"10.244.154.211"}},
85
+ # "TTL"=>"60",
86
+ # "Name"=>"test.aws.rightscale.com.",
87
+ # "Type"=>"A"},
88
+ # {"ResourceRecords"=>{"ResourceRecord"=>{"Value"=>"10.194.215.64"}},
89
+ # "TTL"=>"60",
90
+ # "Name"=>"test1.aws.rightscale.com.",
91
+ # "Type"=>"A"},
92
+ # {"ResourceRecords"=>{"ResourceRecord"=>{"Value"=>"10.136.127.175"}},
93
+ # "TTL"=>"60",
94
+ # "Name"=>"testslave9.aws.rightscale.com.",
95
+ # "Type"=>"A"}]}}}
96
+ #
97
+ # @see ApiManager
98
+ # @see Wrapper::DEFAULT.extended Wrapper::DEFAULT.extended (click [View source])
99
+ # @see http://docs.aws.amazon.com/Route53/latest/APIReference/Welcome.html
100
+ #
101
+ class Manager < CloudApi::Manager
102
+ end
103
+
104
+
105
+ # Amazon Route 53 (Route) compatible manager (thread safe)
106
+ #
107
+ # @see Manager
108
+ #
109
+ class ApiManager < CloudApi::ApiManager
110
+
111
+ # RequestSigner Error
112
+ class Error < CloudApi::Error
113
+ end
114
+
115
+ # Default API version for Route53 service.
116
+ # To override the API version use :api_version key when instantiating a manager.
117
+ #
118
+ DEFAULT_API_VERSION = '2011-05-05'
119
+
120
+ include Mixin::QueryApiPatterns
121
+
122
+ set_routine CloudApi::RetryManager
123
+ set_routine CloudApi::RequestInitializer
124
+ set_routine AWS::Route53::RequestSigner
125
+ set_routine CloudApi::RequestGenerator
126
+ set_routine CloudApi::ConnectionProxy
127
+ set_routine CloudApi::ResponseAnalyzer
128
+ set_routine CloudApi::ResponseParser
129
+ set_routine CloudApi::ResultWrapper
130
+
131
+ set :response_error_parser => Parser::AWS::ResponseErrorV2
132
+
133
+
134
+ # Constructor
135
+ #
136
+ # @param [String] aws_access_key_id
137
+ # @param [String] aws_secret_access_key
138
+ # @param [String] endpoint
139
+ # @param [Hash] options
140
+ #
141
+ # @example
142
+ # # see Manager class usage
143
+ #
144
+ # @see Manager
145
+ #
146
+ def initialize(aws_access_key_id, aws_secret_access_key, endpoint, options={})
147
+ credentials = { :aws_access_key_id => aws_access_key_id,
148
+ :aws_secret_access_key => aws_secret_access_key }
149
+ super(credentials, endpoint, options)
150
+ end
151
+
152
+
153
+ # Makes an API call to AWS::Route53 compatible cloud
154
+ #
155
+ # @param [String,Symbol] verb
156
+ # @param [Objects] args
157
+ #
158
+ # @return [Object]
159
+ #
160
+ # @example
161
+ # api(verb, opts={})
162
+ # # Where opts may have next keys: :options, :headers, :params
163
+ # api(verb, 'path', opts={})
164
+ #
165
+ def api(verb, *args, &block)
166
+ relative_path = args.first.is_a?(String) ? args.shift : ''
167
+ opts = args.shift || {}
168
+ raise Error::new("Opts must be Hash not #{opts.class.name}") unless opts.is_a?(Hash)
169
+ process_api_request(verb, relative_path, opts, &block)
170
+ end
171
+
172
+ end
173
+
174
+ end
175
+ end
176
+ end
177
+ end