aws 1.11.38 → 2.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.
@@ -1,7 +1,7 @@
1
- module RightAws
1
+ module Aws
2
2
 
3
- class Mon < RightAws::RightAwsBase
4
- include RightAws::RightAwsBaseInterface
3
+ class Mon < Aws::AwsBase
4
+ include Aws::AwsBaseInterface
5
5
 
6
6
 
7
7
  #Amazon EC2 API version being used
@@ -15,7 +15,7 @@ module RightAws
15
15
  # NetworkIn NetworkOut DiskReadOps DiskWriteOps DiskReadBytes DiskWriteBytes CPUUtilization
16
16
  measures=%w(NetworkIn NetworkOut DiskReadOps DiskWriteOps DiskReadBytes DiskWriteBytes CPUUtilization)
17
17
 
18
- @@bench = RightAws::AwsBenchmarkingBlock.new
18
+ @@bench = Aws::AwsBenchmarkingBlock.new
19
19
 
20
20
  def self.bench_xml
21
21
  @@bench.xml
@@ -80,7 +80,7 @@ module RightAws
80
80
  # Raises AwsError if any banana happened
81
81
  def request_info(request, parser)
82
82
  thread = @params[:multi_thread] ? Thread.current : Thread.main
83
- thread[:elb_connection] ||= Rightscale::HttpConnection.new(:exception => RightAws::AwsError, :logger => @logger)
83
+ thread[:elb_connection] ||= Rightscale::HttpConnection.new(:exception => Aws::AwsError, :logger => @logger)
84
84
  request_info_impl(thread[:elb_connection], @@bench, request, parser)
85
85
  end
86
86
 
@@ -88,9 +88,12 @@ module RightAws
88
88
  # REQUESTS
89
89
  #-----------------------------------------------------------------
90
90
 
91
- def list_metrics
91
+ def list_metrics(options={})
92
+
93
+ next_token = options[:next_token] || nil
92
94
 
93
95
  params = { }
96
+ params['NextToken'] = next_token unless next_token.nil?
94
97
 
95
98
  @logger.info("list Metrics ")
96
99
 
@@ -105,15 +108,22 @@ module RightAws
105
108
  # measureName: CPUUtilization (Units: Percent), NetworkIn (Units: Bytes), NetworkOut (Units: Bytes), DiskWriteOps (Units: Count)
106
109
  # DiskReadBytes (Units: Bytes), DiskReadOps (Units: Count), DiskWriteBytes (Units: Bytes)
107
110
  # stats: array containing one or more of Minimum, Maximum, Sum, Average, Samples
108
- # startTime : Timestamp to start
109
- # endtime: Timestamp to end
111
+ # start_time : Timestamp to start
112
+ # end_time: Timestamp to end
110
113
  # unit: Either Seconds, Percent, Bytes, Bits, Count, Bytes, Bits/Second, Count/Second, and None
111
- # period: Integer 60 or multiple of 60
112
- # dimension: Hash containing keys ImageId, AutoScalingGroupName, InstanceId, InstanceType
113
- # customUnit: nil. not supported currently.
114
- # namespace: AWS/EC2
114
+ #
115
+ # Optional parameters:
116
+ # period: Integer 60 or multiple of 60
117
+ # dimension: Hash containing keys ImageId, AutoScalingGroupName, InstanceId, InstanceType
118
+ # customUnit: nil. not supported currently.
119
+ # namespace: AWS/EC2
120
+
121
+ def get_metric_statistics ( measure_name, stats, start_time, end_time, unit, options={})
115
122
 
116
- def get_metric_statistics ( measure_name, stats, start_time, end_time, unit, period=60, dimensions=nil, custom_unit=nil, namespace="AWS/EC2" )
123
+ period = options[:period] || 60
124
+ dimensions = options[:dimensions] || nil
125
+ custom_unit = options[:custom_unit] || nil
126
+ namespace = options[:namespace] || "AWS/EC2"
117
127
 
118
128
  params = {}
119
129
  params['MeasureName'] = measure_name
@@ -152,7 +162,7 @@ module RightAws
152
162
  #-----------------------------------------------------------------
153
163
 
154
164
 
155
- class QMonGetMetricStatistics < RightAws::RightAWSParser
165
+ class QMonGetMetricStatistics < Aws::AwsParser
156
166
 
157
167
  def reset
158
168
  @result = []
@@ -186,7 +196,7 @@ module RightAws
186
196
  end
187
197
  end
188
198
 
189
- class QMonListMetrics < RightAws::RightAWSParser
199
+ class QMonListMetrics < Aws::AwsParser
190
200
 
191
201
  def reset
192
202
  @result = []
@@ -1,9 +1,9 @@
1
- module RightAws
1
+ module Aws
2
2
 
3
3
 
4
4
 
5
- class Elb < RightAwsBase
6
- include RightAwsBaseInterface
5
+ class Elb < AwsBase
6
+ include AwsBaseInterface
7
7
 
8
8
 
9
9
  #Amazon EC2 API version being used
@@ -76,7 +76,7 @@ module RightAws
76
76
  # Raises AwsError if any banana happened
77
77
  def request_info(request, parser)
78
78
  thread = @params[:multi_thread] ? Thread.current : Thread.main
79
- thread[:elb_connection] ||= Rightscale::HttpConnection.new(:exception => RightAws::AwsError, :logger => @logger)
79
+ thread[:elb_connection] ||= Rightscale::HttpConnection.new(:exception => Aws::AwsError, :logger => @logger)
80
80
  request_info_impl(thread[:elb_connection], @@bench, request, parser)
81
81
  end
82
82
 
@@ -126,7 +126,7 @@ module RightAws
126
126
  # PARSERS: Instances
127
127
  #-----------------------------------------------------------------
128
128
 
129
- class QElbDescribeLoadBalancersParser < RightAWSParser
129
+ class QElbDescribeLoadBalancersParser < AwsParser
130
130
 
131
131
  def reset
132
132
  @result = []
@@ -153,7 +153,7 @@ module RightAws
153
153
  end
154
154
  end
155
155
 
156
- class QElbRegisterInstanceParser < RightAWSParser
156
+ class QElbRegisterInstanceParser < AwsParser
157
157
 
158
158
  def reset
159
159
  @result = []
@@ -39,6 +39,7 @@ require 'awsbase/benchmark_fix'
39
39
  require 'awsbase/support'
40
40
  require 'awsbase/right_awsbase'
41
41
  require 'ec2/right_ec2'
42
+ require 'ec2/right_mon_interface'
42
43
  require 's3/right_s3_interface'
43
44
  require 's3/right_s3'
44
45
  require 'sqs/right_sqs_interface'
@@ -48,21 +49,9 @@ require 'acf/right_acf_interface'
48
49
  require 'elb/right_elb_interface'
49
50
 
50
51
 
51
- module RightAws #:nodoc:
52
- module VERSION #:nodoc:
53
- MAJOR = 1
54
- MINOR = 11
55
- TINY = 30
56
-
57
- STRING = [MAJOR, MINOR, TINY].join('.')
58
- end
59
- end
60
-
61
- #-
62
-
63
- # We also want everything available in the Rightscale namespace for backward
64
- # compatibility reasons.
65
- module Rightscale #:nodoc:
66
- include RightAws
67
- extend RightAws
52
+ # backwards compatible.
53
+ # @deprecated
54
+ module RightAws
55
+ include Aws
56
+ extend Aws
68
57
  end
@@ -21,10 +21,10 @@
21
21
  # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
22
22
  #
23
23
 
24
- module RightAws
24
+ module Aws
25
25
 
26
- # = RightAws::S3 -- RightScale's Amazon S3 interface
27
- # The RightAws::S3 class provides a complete interface to Amazon's Simple
26
+ # = Aws::S3 -- RightScale's Amazon S3 interface
27
+ # The Aws::S3 class provides a complete interface to Amazon's Simple
28
28
  # Storage Service.
29
29
  # For explanations of the semantics
30
30
  # of each call, please refer to Amazon's documentation at
@@ -32,7 +32,7 @@ module RightAws
32
32
  #
33
33
  # See examples below for the bucket and buckets methods.
34
34
  #
35
- # Error handling: all operations raise an RightAws::AwsError in case
35
+ # Error handling: all operations raise an Aws::AwsError in case
36
36
  # of problems. Note that transient errors are automatically retried.
37
37
  #
38
38
  # It is a good way to use domain naming style getting a name for the buckets.
@@ -52,7 +52,7 @@ module RightAws
52
52
 
53
53
  # Create a new handle to an S3 account. All handles share the same per process or per thread
54
54
  # HTTP connection to Amazon S3. Each handle is for a specific account.
55
- # The +params+ are passed through as-is to RightAws::S3Interface.new
55
+ # The +params+ are passed through as-is to Aws::S3Interface.new
56
56
  #
57
57
  # Params is a hash:
58
58
  #
@@ -66,9 +66,9 @@ module RightAws
66
66
  end
67
67
 
68
68
  # Retrieve a list of buckets.
69
- # Returns an array of RightAws::S3::Bucket instances.
69
+ # Returns an array of Aws::S3::Bucket instances.
70
70
  # # Create handle to S3 account
71
- # s3 = RightAws::S3.new(aws_access_key_id, aws_secret_access_key)
71
+ # s3 = Aws::S3.new(aws_access_key_id, aws_secret_access_key)
72
72
  # my_buckets_names = s3.buckets.map{|b| b.name}
73
73
  # puts "Buckets on S3: #{my_bucket_names.join(', ')}"
74
74
  def buckets
@@ -82,10 +82,10 @@ module RightAws
82
82
  # If the bucket does not exist and +create+ is set, a new bucket
83
83
  # is created on S3. Launching this method with +create+=+true+ may
84
84
  # affect on the bucket's ACL if the bucket already exists.
85
- # Returns a RightAws::S3::Bucket instance or +nil+ if the bucket does not exist
85
+ # Returns a Aws::S3::Bucket instance or +nil+ if the bucket does not exist
86
86
  # and +create+ is not set.
87
87
  #
88
- # s3 = RightAws::S3.new(aws_access_key_id, aws_secret_access_key)
88
+ # s3 = Aws::S3.new(aws_access_key_id, aws_secret_access_key)
89
89
  # bucket1 = s3.bucket('my_awesome_bucket_1')
90
90
  # bucket1.keys #=> exception here if the bucket does not exists
91
91
  # ...
@@ -115,15 +115,15 @@ module RightAws
115
115
  # Returns Bucket instance or +nil+ if the bucket does not exist
116
116
  # and +create+ is not set.
117
117
  #
118
- # s3 = RightAws::S3.new(aws_access_key_id, aws_secret_access_key)
118
+ # s3 = Aws::S3.new(aws_access_key_id, aws_secret_access_key)
119
119
  # ...
120
- # bucket1 = RightAws::S3::Bucket.create(s3, 'my_awesome_bucket_1')
120
+ # bucket1 = Aws::S3::Bucket.create(s3, 'my_awesome_bucket_1')
121
121
  # bucket1.keys #=> exception here if the bucket does not exists
122
122
  # ...
123
- # bucket2 = RightAws::S3::Bucket.create(s3, 'my_awesome_bucket_2', true)
123
+ # bucket2 = Aws::S3::Bucket.create(s3, 'my_awesome_bucket_2', true)
124
124
  # bucket2.keys #=> list of keys
125
125
  # # create a bucket at the European location with public read access
126
- # bucket3 = RightAws::S3::Bucket.create(s3,'my-awesome-bucket-3', true, 'public-read', :location => :eu)
126
+ # bucket3 = Aws::S3::Bucket.create(s3,'my-awesome-bucket-3', true, 'public-read', :location => :eu)
127
127
  #
128
128
  # see http://docs.amazonwebservices.com/AmazonS3/2006-03-01/RESTAccessPolicy.html
129
129
  # (section: Canned Access Policies)
@@ -135,7 +135,7 @@ module RightAws
135
135
 
136
136
  # Create a bucket instance. In normal use this method should
137
137
  # not be called directly.
138
- # Use RightAws::S3::Bucket.create or RightAws::S3.bucket instead.
138
+ # Use Aws::S3::Bucket.create or Aws::S3.bucket instead.
139
139
  def initialize(s3, name, creation_date=nil, owner=nil)
140
140
  @s3 = s3
141
141
  @name = name
@@ -148,7 +148,7 @@ module RightAws
148
148
 
149
149
  # Return bucket name as a String.
150
150
  #
151
- # bucket = RightAws::S3.bucket('my_awesome_bucket')
151
+ # bucket = Aws::S3.bucket('my_awesome_bucket')
152
152
  # puts bucket #=> 'my_awesome_bucket'
153
153
  #
154
154
  def to_s
@@ -243,9 +243,9 @@ module RightAws
243
243
  # Retrieves meta-header information if +head+ is +true+.
244
244
  # Returns new Key instance.
245
245
  #
246
- # key = bucket.key('logs/today/1.log', true) #=> #<RightAws::S3::Key:0xb7b1e240 ... >
246
+ # key = bucket.key('logs/today/1.log', true) #=> #<Aws::S3::Key:0xb7b1e240 ... >
247
247
  # # is the same as:
248
- # key = RightAws::S3::Key.create(bucket, 'logs/today/1.log')
248
+ # key = Aws::S3::Key.create(bucket, 'logs/today/1.log')
249
249
  # key.head
250
250
  #
251
251
  def key(key_name, head=false)
@@ -288,9 +288,9 @@ module RightAws
288
288
  key.get(headers)
289
289
  end
290
290
 
291
- # Rename object. Returns RightAws::S3::Key instance.
291
+ # Rename object. Returns Aws::S3::Key instance.
292
292
  #
293
- # new_key = bucket.rename_key('logs/today/1.log','logs/today/2.log') #=> #<RightAws::S3::Key:0xb7b1e240 ... >
293
+ # new_key = bucket.rename_key('logs/today/1.log','logs/today/2.log') #=> #<Aws::S3::Key:0xb7b1e240 ... >
294
294
  # puts key.name #=> 'logs/today/2.log'
295
295
  # key.exists? #=> true
296
296
  #
@@ -300,9 +300,9 @@ module RightAws
300
300
  old_key_or_name
301
301
  end
302
302
 
303
- # Create an object copy. Returns a destination RightAws::S3::Key instance.
303
+ # Create an object copy. Returns a destination Aws::S3::Key instance.
304
304
  #
305
- # new_key = bucket.copy_key('logs/today/1.log','logs/today/2.log') #=> #<RightAws::S3::Key:0xb7b1e240 ... >
305
+ # new_key = bucket.copy_key('logs/today/1.log','logs/today/2.log') #=> #<Aws::S3::Key:0xb7b1e240 ... >
306
306
  # puts key.name #=> 'logs/today/2.log'
307
307
  # key.exists? #=> true
308
308
  #
@@ -311,9 +311,9 @@ module RightAws
311
311
  old_key_or_name.copy(new_key_or_name)
312
312
  end
313
313
 
314
- # Move an object to other location. Returns a destination RightAws::S3::Key instance.
314
+ # Move an object to other location. Returns a destination Aws::S3::Key instance.
315
315
  #
316
- # new_key = bucket.copy_key('logs/today/1.log','logs/today/2.log') #=> #<RightAws::S3::Key:0xb7b1e240 ... >
316
+ # new_key = bucket.copy_key('logs/today/1.log','logs/today/2.log') #=> #<Aws::S3::Key:0xb7b1e240 ... >
317
317
  # puts key.name #=> 'logs/today/2.log'
318
318
  # key.exists? #=> true
319
319
  #
@@ -396,7 +396,7 @@ module RightAws
396
396
  # The +name+ is a +String+.
397
397
  # Returns a new Key instance.
398
398
  #
399
- # key = RightAws::S3::Key.create(bucket, 'logs/today/1.log') #=> #<RightAws::S3::Key:0xb7b1e240 ... >
399
+ # key = Aws::S3::Key.create(bucket, 'logs/today/1.log') #=> #<Aws::S3::Key:0xb7b1e240 ... >
400
400
  # key.exists? #=> true | false
401
401
  # key.put('Woohoo!') #=> true
402
402
  # key.exists? #=> true
@@ -407,7 +407,7 @@ module RightAws
407
407
 
408
408
  # Create a new Key instance, but do not create the actual key.
409
409
  # In normal use this method should not be called directly.
410
- # Use RightAws::S3::Key.create or bucket.key() instead.
410
+ # Use Aws::S3::Key.create or bucket.key() instead.
411
411
  #
412
412
  def initialize(bucket, name, data=nil, headers={}, meta_headers={},
413
413
  last_modified=nil, e_tag=nil, size=nil, storage_class=nil, owner=nil)
@@ -429,7 +429,7 @@ module RightAws
429
429
 
430
430
  # Return key name as a String.
431
431
  #
432
- # key = RightAws::S3::Key.create(bucket, 'logs/today/1.log') #=> #<RightAws::S3::Key:0xb7b1e240 ... >
432
+ # key = Aws::S3::Key.create(bucket, 'logs/today/1.log') #=> #<Aws::S3::Key:0xb7b1e240 ... >
433
433
  # puts key #=> 'logs/today/1.log'
434
434
  #
435
435
  def to_s
@@ -476,7 +476,7 @@ module RightAws
476
476
  # Parameter +data+ is a +String+ or S3Object instance.
477
477
  # Returns +true+.
478
478
  #
479
- # key = RightAws::S3::Key.create(bucket, 'logs/today/1.log')
479
+ # key = Aws::S3::Key.create(bucket, 'logs/today/1.log')
480
480
  # key.data = 'Qwerty'
481
481
  # key.put #=> true
482
482
  # ...
@@ -491,7 +491,7 @@ module RightAws
491
491
 
492
492
  # Rename an object. Returns new object name.
493
493
  #
494
- # key = RightAws::S3::Key.create(bucket, 'logs/today/1.log') #=> #<RightAws::S3::Key:0xb7b1e240 ... >
494
+ # key = Aws::S3::Key.create(bucket, 'logs/today/1.log') #=> #<Aws::S3::Key:0xb7b1e240 ... >
495
495
  # key.rename('logs/today/2.log') #=> 'logs/today/2.log'
496
496
  # puts key.name #=> 'logs/today/2.log'
497
497
  # key.exists? #=> true
@@ -501,21 +501,21 @@ module RightAws
501
501
  @name = new_name
502
502
  end
503
503
 
504
- # Create an object copy. Returns a destination RightAws::S3::Key instance.
504
+ # Create an object copy. Returns a destination Aws::S3::Key instance.
505
505
  #
506
506
  # # Key instance as destination
507
- # key1 = RightAws::S3::Key.create(bucket, 'logs/today/1.log') #=> #<RightAws::S3::Key:0xb7b1e240 ... >
508
- # key2 = RightAws::S3::Key.create(bucket, 'logs/today/2.log') #=> #<RightAws::S3::Key:0xb7b5e240 ... >
507
+ # key1 = Aws::S3::Key.create(bucket, 'logs/today/1.log') #=> #<Aws::S3::Key:0xb7b1e240 ... >
508
+ # key2 = Aws::S3::Key.create(bucket, 'logs/today/2.log') #=> #<Aws::S3::Key:0xb7b5e240 ... >
509
509
  # key1.put('Olala!') #=> true
510
- # key1.copy(key2) #=> #<RightAws::S3::Key:0xb7b5e240 ... >
510
+ # key1.copy(key2) #=> #<Aws::S3::Key:0xb7b5e240 ... >
511
511
  # key1.exists? #=> true
512
512
  # key2.exists? #=> true
513
513
  # puts key2.data #=> 'Olala!'
514
514
  #
515
515
  # # String as destination
516
- # key = RightAws::S3::Key.create(bucket, 'logs/today/777.log') #=> #<RightAws::S3::Key:0xb7b1e240 ... >
516
+ # key = Aws::S3::Key.create(bucket, 'logs/today/777.log') #=> #<Aws::S3::Key:0xb7b1e240 ... >
517
517
  # key.put('Olala!') #=> true
518
- # new_key = key.copy('logs/today/888.log') #=> #<RightAws::S3::Key:0xb7b5e240 ... >
518
+ # new_key = key.copy('logs/today/888.log') #=> #<Aws::S3::Key:0xb7b5e240 ... >
519
519
  # key.exists? #=> true
520
520
  # new_key.exists? #=> true
521
521
  #
@@ -525,21 +525,21 @@ module RightAws
525
525
  new_key_or_name
526
526
  end
527
527
 
528
- # Move an object to other location. Returns a destination RightAws::S3::Key instance.
528
+ # Move an object to other location. Returns a destination Aws::S3::Key instance.
529
529
  #
530
530
  # # Key instance as destination
531
- # key1 = RightAws::S3::Key.create(bucket, 'logs/today/1.log') #=> #<RightAws::S3::Key:0xb7b1e240 ... >
532
- # key2 = RightAws::S3::Key.create(bucket, 'logs/today/2.log') #=> #<RightAws::S3::Key:0xb7b5e240 ... >
531
+ # key1 = Aws::S3::Key.create(bucket, 'logs/today/1.log') #=> #<Aws::S3::Key:0xb7b1e240 ... >
532
+ # key2 = Aws::S3::Key.create(bucket, 'logs/today/2.log') #=> #<Aws::S3::Key:0xb7b5e240 ... >
533
533
  # key1.put('Olala!') #=> true
534
- # key1.move(key2) #=> #<RightAws::S3::Key:0xb7b5e240 ... >
534
+ # key1.move(key2) #=> #<Aws::S3::Key:0xb7b5e240 ... >
535
535
  # key1.exists? #=> false
536
536
  # key2.exists? #=> true
537
537
  # puts key2.data #=> 'Olala!'
538
538
  #
539
539
  # # String as destination
540
- # key = RightAws::S3::Key.create(bucket, 'logs/today/777.log') #=> #<RightAws::S3::Key:0xb7b1e240 ... >
540
+ # key = Aws::S3::Key.create(bucket, 'logs/today/777.log') #=> #<Aws::S3::Key:0xb7b1e240 ... >
541
541
  # key.put('Olala!') #=> true
542
- # new_key = key.move('logs/today/888.log') #=> #<RightAws::S3::Key:0xb7b5e240 ... >
542
+ # new_key = key.move('logs/today/888.log') #=> #<Aws::S3::Key:0xb7b5e240 ... >
543
543
  # key.exists? #=> false
544
544
  # new_key.exists? #=> true
545
545
  #
@@ -553,7 +553,7 @@ module RightAws
553
553
  # Refresh meta-headers (by calling +head+ method) if +head+ is set.
554
554
  # Returns +true+ if the key exists in bucket and +false+ otherwise.
555
555
  #
556
- # key = RightAws::S3::Key.create(bucket, 'logs/today/1.log')
556
+ # key = Aws::S3::Key.create(bucket, 'logs/today/1.log')
557
557
  # key.e_tag #=> nil
558
558
  # key.meta_headers #=> {}
559
559
  # key.refresh #=> true
@@ -611,7 +611,7 @@ module RightAws
611
611
  # Check for existence of the key in the given bucket.
612
612
  # Returns +true+ or +false+.
613
613
  #
614
- # key = RightAws::S3::Key.create(bucket,'logs/today/1.log')
614
+ # key = Aws::S3::Key.create(bucket,'logs/today/1.log')
615
615
  # key.exists? #=> false
616
616
  # key.put('Woohoo!') #=> true
617
617
  # key.exists? #=> true
@@ -669,13 +669,13 @@ module RightAws
669
669
  # 'READ_ACP', 'WRITE_ACP', 'FULL_CONTROL'):
670
670
  #
671
671
  # bucket = s3.bucket('my_awesome_bucket', true)
672
- # grantee1 = RightAws::S3::Grantee.new(bucket, 'a123b...223c', FULL_CONTROL, :apply)
673
- # grantee2 = RightAws::S3::Grantee.new(bucket, 'xy3v3...5fhp', [READ, WRITE], :apply)
672
+ # grantee1 = Aws::S3::Grantee.new(bucket, 'a123b...223c', FULL_CONTROL, :apply)
673
+ # grantee2 = Aws::S3::Grantee.new(bucket, 'xy3v3...5fhp', [READ, WRITE], :apply)
674
674
  #
675
675
  # There is only one way to get and to remove permission (via Grantee instances):
676
676
  #
677
677
  # grantees = bucket.grantees # a list of Grantees that have any access for this bucket
678
- # grantee1 = RightAws::S3::Grantee.new(bucket, 'a123b...223c')
678
+ # grantee1 = Aws::S3::Grantee.new(bucket, 'a123b...223c')
679
679
  # grantee1.perms #=> returns a list of perms for this grantee to that bucket
680
680
  # ...
681
681
  # grantee1.drop # remove all perms for this grantee
@@ -696,7 +696,7 @@ module RightAws
696
696
  #
697
697
  # bucket = s3.bucket('my_awesome_bucket', true, 'public-read')
698
698
  # ...
699
- # RightAws::S3::Grantee.owner_and_grantees(bucket) #=> [owner, grantees]
699
+ # Aws::S3::Grantee.owner_and_grantees(bucket) #=> [owner, grantees]
700
700
  #
701
701
  def self.owner_and_grantees(thing)
702
702
  if thing.is_a?(Bucket)
@@ -718,7 +718,7 @@ module RightAws
718
718
  #
719
719
  # bucket = s3.bucket('my_awesome_bucket', true, 'public-read')
720
720
  # ...
721
- # RightAws::S3::Grantee.grantees(bucket) #=> grantees
721
+ # Aws::S3::Grantee.grantees(bucket) #=> grantees
722
722
  #
723
723
  def self.grantees(thing)
724
724
  owner_and_grantees(thing)[1]
@@ -750,10 +750,10 @@ module RightAws
750
750
  # this thing before. The default action is :refresh.
751
751
  #
752
752
  # bucket = s3.bucket('my_awesome_bucket', true, 'public-read')
753
- # grantee1 = RightAws::S3::Grantee.new(bucket, 'a123b...223c', FULL_CONTROL)
753
+ # grantee1 = Aws::S3::Grantee.new(bucket, 'a123b...223c', FULL_CONTROL)
754
754
  # ...
755
- # grantee2 = RightAws::S3::Grantee.new(bucket, 'abcde...asdf', [FULL_CONTROL, READ], :apply)
756
- # grantee3 = RightAws::S3::Grantee.new(bucket, 'aaaaa...aaaa', 'READ', :apply_and_refresh)
755
+ # grantee2 = Aws::S3::Grantee.new(bucket, 'abcde...asdf', [FULL_CONTROL, READ], :apply)
756
+ # grantee3 = Aws::S3::Grantee.new(bucket, 'aaaaa...aaaa', 'READ', :apply_and_refresh)
757
757
  #
758
758
  def initialize(thing, id, perms=[], action=:refresh, name=nil)
759
759
  @thing = thing
@@ -888,20 +888,20 @@ module RightAws
888
888
 
889
889
  end
890
890
 
891
- # RightAws::S3Generator and RightAws::S3Generator::Bucket methods:
891
+ # Aws::S3Generator and Aws::S3Generator::Bucket methods:
892
892
  #
893
- # s3g = RightAws::S3Generator.new('1...2', 'nx...Y6') #=> #<RightAws::S3Generator:0xb7b5cc94>
893
+ # s3g = Aws::S3Generator.new('1...2', 'nx...Y6') #=> #<Aws::S3Generator:0xb7b5cc94>
894
894
  #
895
895
  # # List all buckets(method 'GET'):
896
896
  # buckets_list = s3g.buckets #=> 'https://s3.amazonaws.com:443/?Signature=Y...D&Expires=1180941864&AWSAccessKeyId=1...2'
897
897
  # # Create bucket link (method 'PUT'):
898
- # bucket = s3g.bucket('my_awesome_bucket') #=> #<RightAws::S3Generator::Bucket:0xb7bcbda8>
898
+ # bucket = s3g.bucket('my_awesome_bucket') #=> #<Aws::S3Generator::Bucket:0xb7bcbda8>
899
899
  # link_to_create = bucket.create_link(1.hour) #=> https://s3.amazonaws.com:443/my_awesome_bucket?Signature=4...D&Expires=1180942132&AWSAccessKeyId=1...2
900
900
  # # ... or:
901
- # bucket = RightAws::S3Generator::Bucket.create(s3g, 'my_awesome_bucket') #=> #<RightAws::S3Generator::Bucket:0xb7bcbda8>
901
+ # bucket = Aws::S3Generator::Bucket.create(s3g, 'my_awesome_bucket') #=> #<Aws::S3Generator::Bucket:0xb7bcbda8>
902
902
  # link_to_create = bucket.create_link(1.hour) #=> https://s3.amazonaws.com:443/my_awesome_bucket?Signature=4...D&Expires=1180942132&AWSAccessKeyId=1...2
903
903
  # # ... or:
904
- # bucket = RightAws::S3Generator::Bucket.new(s3g, 'my_awesome_bucket') #=> #<RightAws::S3Generator::Bucket:0xb7bcbda8>
904
+ # bucket = Aws::S3Generator::Bucket.new(s3g, 'my_awesome_bucket') #=> #<Aws::S3Generator::Bucket:0xb7bcbda8>
905
905
  # link_to_create = bucket.create_link(1.hour) #=> https://s3.amazonaws.com:443/my_awesome_bucket?Signature=4...D&Expires=1180942132&AWSAccessKeyId=1...2
906
906
  # # List bucket(method 'GET'):
907
907
  # bucket.keys(1.day) #=> https://s3.amazonaws.com:443/my_awesome_bucket?Signature=i...D&Expires=1180942620&AWSAccessKeyId=1...2
@@ -912,10 +912,10 @@ module RightAws
912
912
  # # Delete bucket (method 'DELETE'):
913
913
  # bucket.delete(2.hour) #=> https://s3.amazonaws.com:443/my_awesome_bucket/logs%2Ftoday%2F1.log?Signature=4...D&Expires=1180820032&AWSAccessKeyId=1...2
914
914
  #
915
- # RightAws::S3Generator::Key methods:
915
+ # Aws::S3Generator::Key methods:
916
916
  #
917
917
  # # Create Key instance:
918
- # key = RightAws::S3Generator::Key.new(bicket, 'my_cool_key') #=> #<RightAws::S3Generator::Key:0xb7b7394c>
918
+ # key = Aws::S3Generator::Key.new(bicket, 'my_cool_key') #=> #<Aws::S3Generator::Key:0xb7b7394c>
919
919
  # # Put key data (method 'PUT'):
920
920
  # key.put #=> https://s3.amazonaws.com:443/my_awesome_bucket/my_cool_key?Signature=2...D&Expires=1180943302&AWSAccessKeyId=1...2
921
921
  # # Get key data (method 'GET'):
@@ -1004,7 +1004,7 @@ module RightAws
1004
1004
  # puts bucket.put('logs/today/1.log', 2.hour)
1005
1005
  #
1006
1006
  def put(key, meta_headers={}, expires=nil, headers={})
1007
- meta = RightAws::S3::Key.add_meta_prefix(meta_headers)
1007
+ meta = Aws::S3::Key.add_meta_prefix(meta_headers)
1008
1008
  @s3.interface.put_link(@name, key.to_s, nil, expires, meta.merge(headers))
1009
1009
  end
1010
1010