aws-sdk 1.8.1.2 → 1.8.1.3

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.
@@ -13,9 +13,8 @@
13
13
 
14
14
  ---
15
15
  :api_version: '2012-05-05'
16
- :namespace: http://cloudfront.amazonaws.com/doc/2012-07-01/
17
16
  :operations:
18
- - :name: CreateCloudFrontOriginAccessIdentity2012_05_05
17
+ - :name: CreateCloudFrontOriginAccessIdentity
19
18
  :method: :create_cloud_front_origin_access_identity
20
19
  :http:
21
20
  :verb: POST
@@ -51,7 +50,7 @@
51
50
  :type: :string
52
51
  Comment:
53
52
  :type: :string
54
- - :name: CreateDistribution2012_05_05
53
+ - :name: CreateDistribution
55
54
  :method: :create_distribution
56
55
  :http:
57
56
  :verb: POST
@@ -423,7 +422,7 @@
423
422
  :type: :string
424
423
  Enabled:
425
424
  :type: :boolean
426
- - :name: CreateInvalidation2012_05_05
425
+ - :name: CreateInvalidation
427
426
  :method: :create_invalidation
428
427
  :http:
429
428
  :verb: POST
@@ -483,7 +482,7 @@
483
482
  :type: :string
484
483
  CallerReference:
485
484
  :type: :string
486
- - :name: CreateStreamingDistribution2012_05_05
485
+ - :name: CreateStreamingDistribution
487
486
  :method: :create_streaming_distribution
488
487
  :http:
489
488
  :verb: POST
@@ -657,7 +656,7 @@
657
656
  :type: :string
658
657
  Enabled:
659
658
  :type: :boolean
660
- - :name: DeleteCloudFrontOriginAccessIdentity2012_05_05
659
+ - :name: DeleteCloudFrontOriginAccessIdentity
661
660
  :method: :delete_cloud_front_origin_access_identity
662
661
  :http:
663
662
  :verb: DELETE
@@ -672,7 +671,7 @@
672
671
  :if_match:
673
672
  :type: :string
674
673
  :outputs: {}
675
- - :name: DeleteDistribution2012_05_05
674
+ - :name: DeleteDistribution
676
675
  :method: :delete_distribution
677
676
  :http:
678
677
  :verb: DELETE
@@ -687,7 +686,7 @@
687
686
  :if_match:
688
687
  :type: :string
689
688
  :outputs: {}
690
- - :name: DeleteStreamingDistribution2012_05_05
689
+ - :name: DeleteStreamingDistribution
691
690
  :method: :delete_streaming_distribution
692
691
  :http:
693
692
  :verb: DELETE
@@ -702,7 +701,7 @@
702
701
  :if_match:
703
702
  :type: :string
704
703
  :outputs: {}
705
- - :name: GetCloudFrontOriginAccessIdentity2012_05_05
704
+ - :name: GetCloudFrontOriginAccessIdentity
706
705
  :method: :get_cloud_front_origin_access_identity
707
706
  :http:
708
707
  :verb: GET
@@ -725,7 +724,7 @@
725
724
  :type: :string
726
725
  Comment:
727
726
  :type: :string
728
- - :name: GetCloudFrontOriginAccessIdentityConfig2012_05_05
727
+ - :name: GetCloudFrontOriginAccessIdentityConfig
729
728
  :method: :get_cloud_front_origin_access_identity_config
730
729
  :http:
731
730
  :verb: GET
@@ -742,7 +741,7 @@
742
741
  :type: :string
743
742
  Comment:
744
743
  :type: :string
745
- - :name: GetDistribution2012_05_05
744
+ - :name: GetDistribution
746
745
  :method: :get_distribution
747
746
  :http:
748
747
  :verb: GET
@@ -908,7 +907,7 @@
908
907
  :type: :string
909
908
  Enabled:
910
909
  :type: :boolean
911
- - :name: GetDistributionConfig2012_05_05
910
+ - :name: GetDistributionConfig
912
911
  :method: :get_distribution_config
913
912
  :http:
914
913
  :verb: GET
@@ -1036,7 +1035,7 @@
1036
1035
  :type: :string
1037
1036
  Enabled:
1038
1037
  :type: :boolean
1039
- - :name: GetInvalidation2012_05_05
1038
+ - :name: GetInvalidation
1040
1039
  :method: :get_invalidation
1041
1040
  :http:
1042
1041
  :verb: GET
@@ -1071,7 +1070,7 @@
1071
1070
  :type: :string
1072
1071
  CallerReference:
1073
1072
  :type: :string
1074
- - :name: GetStreamingDistribution2012_05_05
1073
+ - :name: GetStreamingDistribution
1075
1074
  :method: :get_streaming_distribution
1076
1075
  :http:
1077
1076
  :verb: GET
@@ -1164,7 +1163,7 @@
1164
1163
  :type: :string
1165
1164
  Enabled:
1166
1165
  :type: :boolean
1167
- - :name: GetStreamingDistributionConfig2012_05_05
1166
+ - :name: GetStreamingDistributionConfig
1168
1167
  :method: :get_streaming_distribution_config
1169
1168
  :http:
1170
1169
  :verb: GET
@@ -1221,7 +1220,7 @@
1221
1220
  :type: :string
1222
1221
  Enabled:
1223
1222
  :type: :boolean
1224
- - :name: ListCloudFrontOriginAccessIdentities2012_05_05
1223
+ - :name: ListCloudFrontOriginAccessIdentities
1225
1224
  :method: :list_cloud_front_origin_access_identities
1226
1225
  :http:
1227
1226
  :verb: GET
@@ -1256,7 +1255,7 @@
1256
1255
  :type: :string
1257
1256
  Comment:
1258
1257
  :type: :string
1259
- - :name: ListDistributions2012_05_05
1258
+ - :name: ListDistributions
1260
1259
  :method: :list_distributions
1261
1260
  :http:
1262
1261
  :verb: GET
@@ -1396,7 +1395,7 @@
1396
1395
  :type: :string
1397
1396
  Enabled:
1398
1397
  :type: :boolean
1399
- - :name: ListInvalidations2012_05_05
1398
+ - :name: ListInvalidations
1400
1399
  :method: :list_invalidations
1401
1400
  :http:
1402
1401
  :verb: GET
@@ -1432,7 +1431,7 @@
1432
1431
  :type: :string
1433
1432
  Status:
1434
1433
  :type: :string
1435
- - :name: ListStreamingDistributions2012_05_05
1434
+ - :name: ListStreamingDistributions
1436
1435
  :method: :list_streaming_distributions
1437
1436
  :http:
1438
1437
  :verb: GET
@@ -1503,7 +1502,7 @@
1503
1502
  :type: :string
1504
1503
  Enabled:
1505
1504
  :type: :boolean
1506
- - :name: UpdateCloudFrontOriginAccessIdentity2012_05_05
1505
+ - :name: UpdateCloudFrontOriginAccessIdentity
1507
1506
  :method: :update_cloud_front_origin_access_identity
1508
1507
  :http:
1509
1508
  :verb: PUT
@@ -1544,7 +1543,7 @@
1544
1543
  :type: :string
1545
1544
  Comment:
1546
1545
  :type: :string
1547
- - :name: UpdateDistribution2012_05_05
1546
+ - :name: UpdateDistribution
1548
1547
  :method: :update_distribution
1549
1548
  :http:
1550
1549
  :verb: PUT
@@ -1921,7 +1920,7 @@
1921
1920
  :type: :string
1922
1921
  Enabled:
1923
1922
  :type: :boolean
1924
- - :name: UpdateStreamingDistribution2012_05_05
1923
+ - :name: UpdateStreamingDistribution
1925
1924
  :method: :update_streaming_distribution
1926
1925
  :http:
1927
1926
  :verb: PUT
@@ -2100,3 +2099,4 @@
2100
2099
  :type: :string
2101
2100
  Enabled:
2102
2101
  :type: :boolean
2102
+ :namespace: http://cloudfront.amazonaws.com/doc/2012-07-01/
@@ -323,6 +323,8 @@
323
323
  - :string
324
324
  VisibleToAllUsers:
325
325
  - :boolean
326
+ JobFlowRole:
327
+ - :string
326
328
  :outputs:
327
329
  :children:
328
330
  RunJobFlowResult:
@@ -14,6 +14,32 @@
14
14
  ---
15
15
  :api_version: '2011-06-15'
16
16
  :operations:
17
+ - :name: AssumeRole
18
+ :method: :assume_role
19
+ :inputs:
20
+ RoleArn:
21
+ - :string
22
+ - :required
23
+ RoleSessionName:
24
+ - :string
25
+ - :required
26
+ Policy:
27
+ - :string
28
+ DurationSeconds:
29
+ - :integer
30
+ ExternalId:
31
+ - :string
32
+ :outputs:
33
+ :children:
34
+ AssumeRoleResult:
35
+ :ignore: true
36
+ :children:
37
+ Credentials:
38
+ :children:
39
+ Expiration:
40
+ :type: :time
41
+ PackedPolicySize:
42
+ :type: :integer
17
43
  - :name: GetFederationToken
18
44
  :method: :get_federation_token
19
45
  :inputs:
@@ -25,7 +25,7 @@ module AWS
25
25
  #
26
26
  # @attr_reader [String] stack_id Unique stack identifier.
27
27
  #
28
- # @attr_reader [Symbol] status The status of the stack.
28
+ # @attr_reader [String] status The status of the stack.
29
29
  #
30
30
  # @attr_reader [String] status_reason Success/Failure message
31
31
  # associated with the +status+.
@@ -21,7 +21,7 @@ module AWS
21
21
  # client methods #
22
22
 
23
23
  # @!method create_cloud_front_origin_access_identity(options = {})
24
- # Calls the POST CreateCloudFrontOriginAccessIdentity2012_05_05 API operation.
24
+ # Calls the POST CreateCloudFrontOriginAccessIdentity API operation.
25
25
  # @param [Hash] options
26
26
  # * +:cloud_front_origin_access_identity_config+ - *required* - (Hash)
27
27
  # The origin access identity's configuration information.
@@ -51,7 +51,7 @@ module AWS
51
51
  # * +:comment+ - (String)
52
52
 
53
53
  # @!method create_distribution(options = {})
54
- # Calls the POST CreateDistribution2012_05_05 API operation.
54
+ # Calls the POST CreateDistribution API operation.
55
55
  # @param [Hash] options
56
56
  # * +:distribution_config+ - *required* - (Hash) The distribution's
57
57
  # configuration information.
@@ -325,7 +325,7 @@ module AWS
325
325
  # * +:enabled+ - (Boolean)
326
326
 
327
327
  # @!method create_invalidation(options = {})
328
- # Calls the POST CreateInvalidation2012_05_05 API operation.
328
+ # Calls the POST CreateInvalidation API operation.
329
329
  # @param [Hash] options
330
330
  # * +:distribution_id+ - *required* - (String) The distribution's id.
331
331
  # * +:invalidation_batch+ - *required* - (Hash) The batch information for
@@ -366,7 +366,7 @@ module AWS
366
366
  # * +:caller_reference+ - (String)
367
367
 
368
368
  # @!method create_streaming_distribution(options = {})
369
- # Calls the POST CreateStreamingDistribution2012_05_05 API operation.
369
+ # Calls the POST CreateStreamingDistribution API operation.
370
370
  # @param [Hash] options
371
371
  # * +:streaming_distribution_config+ - *required* - (Hash) The streaming
372
372
  # distribution's configuration information.
@@ -476,7 +476,7 @@ module AWS
476
476
  # * +:enabled+ - (Boolean)
477
477
 
478
478
  # @!method delete_cloud_front_origin_access_identity(options = {})
479
- # Calls the DELETE DeleteCloudFrontOriginAccessIdentity2012_05_05 API operation.
479
+ # Calls the DELETE DeleteCloudFrontOriginAccessIdentity API operation.
480
480
  # @param [Hash] options
481
481
  # * +:id+ - *required* - (String) The origin access identity's id.
482
482
  # * +:if_match+ - (String) The value of the ETag header you received from
@@ -484,7 +484,7 @@ module AWS
484
484
  # @return [Core::Response]
485
485
 
486
486
  # @!method delete_distribution(options = {})
487
- # Calls the DELETE DeleteDistribution2012_05_05 API operation.
487
+ # Calls the DELETE DeleteDistribution API operation.
488
488
  # @param [Hash] options
489
489
  # * +:id+ - *required* - (String) The distribution id.
490
490
  # * +:if_match+ - (String) The value of the ETag header you received when
@@ -492,7 +492,7 @@ module AWS
492
492
  # @return [Core::Response]
493
493
 
494
494
  # @!method delete_streaming_distribution(options = {})
495
- # Calls the DELETE DeleteStreamingDistribution2012_05_05 API operation.
495
+ # Calls the DELETE DeleteStreamingDistribution API operation.
496
496
  # @param [Hash] options
497
497
  # * +:id+ - *required* - (String) The distribution id.
498
498
  # * +:if_match+ - (String) The value of the ETag header you received when
@@ -500,7 +500,7 @@ module AWS
500
500
  # @return [Core::Response]
501
501
 
502
502
  # @!method get_cloud_front_origin_access_identity(options = {})
503
- # Calls the GET GetCloudFrontOriginAccessIdentity2012_05_05 API operation.
503
+ # Calls the GET GetCloudFrontOriginAccessIdentity API operation.
504
504
  # @param [Hash] options
505
505
  # * +:id+ - *required* - (String) The identity's id.
506
506
  # @return [Core::Response]
@@ -513,7 +513,7 @@ module AWS
513
513
  # * +:comment+ - (String)
514
514
 
515
515
  # @!method get_cloud_front_origin_access_identity_config(options = {})
516
- # Calls the GET GetCloudFrontOriginAccessIdentityConfig2012_05_05 API operation.
516
+ # Calls the GET GetCloudFrontOriginAccessIdentityConfig API operation.
517
517
  # @param [Hash] options
518
518
  # * +:id+ - *required* - (String) The identity's id.
519
519
  # @return [Core::Response]
@@ -523,7 +523,7 @@ module AWS
523
523
  # * +:comment+ - (String)
524
524
 
525
525
  # @!method get_distribution(options = {})
526
- # Calls the GET GetDistribution2012_05_05 API operation.
526
+ # Calls the GET GetDistribution API operation.
527
527
  # @param [Hash] options
528
528
  # * +:id+ - *required* - (String) The distribution's id.
529
529
  # @return [Core::Response]
@@ -590,7 +590,7 @@ module AWS
590
590
  # * +:enabled+ - (Boolean)
591
591
 
592
592
  # @!method get_distribution_config(options = {})
593
- # Calls the GET GetDistributionConfig2012_05_05 API operation.
593
+ # Calls the GET GetDistributionConfig API operation.
594
594
  # @param [Hash] options
595
595
  # * +:id+ - *required* - (String) The distribution's id.
596
596
  # @return [Core::Response]
@@ -643,7 +643,7 @@ module AWS
643
643
  # * +:enabled+ - (Boolean)
644
644
 
645
645
  # @!method get_invalidation(options = {})
646
- # Calls the GET GetInvalidation2012_05_05 API operation.
646
+ # Calls the GET GetInvalidation API operation.
647
647
  # @param [Hash] options
648
648
  # * +:distribution_id+ - *required* - (String) The distribution's id.
649
649
  # * +:id+ - *required* - (String) The invalidation's id.
@@ -660,7 +660,7 @@ module AWS
660
660
  # * +:caller_reference+ - (String)
661
661
 
662
662
  # @!method get_streaming_distribution(options = {})
663
- # Calls the GET GetStreamingDistribution2012_05_05 API operation.
663
+ # Calls the GET GetStreamingDistribution API operation.
664
664
  # @param [Hash] options
665
665
  # * +:id+ - *required* - (String) The streaming distribution's id.
666
666
  # @return [Core::Response]
@@ -698,7 +698,7 @@ module AWS
698
698
  # * +:enabled+ - (Boolean)
699
699
 
700
700
  # @!method get_streaming_distribution_config(options = {})
701
- # Calls the GET GetStreamingDistributionConfig2012_05_05 API operation.
701
+ # Calls the GET GetStreamingDistributionConfig API operation.
702
702
  # @param [Hash] options
703
703
  # * +:id+ - *required* - (String) The streaming distribution's id.
704
704
  # @return [Core::Response]
@@ -723,7 +723,7 @@ module AWS
723
723
  # * +:enabled+ - (Boolean)
724
724
 
725
725
  # @!method list_cloud_front_origin_access_identities(options = {})
726
- # Calls the GET ListCloudFrontOriginAccessIdentities2012_05_05 API operation.
726
+ # Calls the GET ListCloudFrontOriginAccessIdentities API operation.
727
727
  # @param [Hash] options
728
728
  # * +:marker+ - (String) Use this when paginating results to indicate
729
729
  # where to begin in your list of origin access identities. The results
@@ -747,7 +747,7 @@ module AWS
747
747
  # * +:comment+ - (String)
748
748
 
749
749
  # @!method list_distributions(options = {})
750
- # Calls the GET ListDistributions2012_05_05 API operation.
750
+ # Calls the GET ListDistributions API operation.
751
751
  # @param [Hash] options
752
752
  # * +:marker+ - (String) Use this when paginating results to indicate
753
753
  # where to begin in your list of distributions. The results include
@@ -811,7 +811,7 @@ module AWS
811
811
  # * +:enabled+ - (Boolean)
812
812
 
813
813
  # @!method list_invalidations(options = {})
814
- # Calls the GET ListInvalidations2012_05_05 API operation.
814
+ # Calls the GET ListInvalidations API operation.
815
815
  # @param [Hash] options
816
816
  # * +:distribution_id+ - *required* - (String) The distribution's id.
817
817
  # * +:marker+ - (String) Use this parameter when paginating results to
@@ -837,7 +837,7 @@ module AWS
837
837
  # * +:status+ - (String)
838
838
 
839
839
  # @!method list_streaming_distributions(options = {})
840
- # Calls the GET ListStreamingDistributions2012_05_05 API operation.
840
+ # Calls the GET ListStreamingDistributions API operation.
841
841
  # @param [Hash] options
842
842
  # * +:marker+ - (String) Use this when paginating results to indicate
843
843
  # where to begin in your list of streaming distributions. The results
@@ -874,7 +874,7 @@ module AWS
874
874
  # * +:enabled+ - (Boolean)
875
875
 
876
876
  # @!method update_cloud_front_origin_access_identity(options = {})
877
- # Calls the PUT UpdateCloudFrontOriginAccessIdentity2012_05_05 API operation.
877
+ # Calls the PUT UpdateCloudFrontOriginAccessIdentity API operation.
878
878
  # @param [Hash] options
879
879
  # * +:cloud_front_origin_access_identity_config+ - *required* - (Hash)
880
880
  # The identity's configuration information.
@@ -907,7 +907,7 @@ module AWS
907
907
  # * +:comment+ - (String)
908
908
 
909
909
  # @!method update_distribution(options = {})
910
- # Calls the PUT UpdateDistribution2012_05_05 API operation.
910
+ # Calls the PUT UpdateDistribution API operation.
911
911
  # @param [Hash] options
912
912
  # * +:distribution_config+ - *required* - (Hash) The distribution's
913
913
  # configuration information.
@@ -1185,7 +1185,7 @@ module AWS
1185
1185
  # * +:enabled+ - (Boolean)
1186
1186
 
1187
1187
  # @!method update_streaming_distribution(options = {})
1188
- # Calls the PUT UpdateStreamingDistribution2012_05_05 API operation.
1188
+ # Calls the PUT UpdateStreamingDistribution API operation.
1189
1189
  # @param [Hash] options
1190
1190
  # * +:streaming_distribution_config+ - *required* - (Hash) The streaming
1191
1191
  # distribution's configuration information.
@@ -35,7 +35,7 @@ module AWS
35
35
  end
36
36
 
37
37
  def string_to_sign
38
- headers['date'] ||= Time.now.rfc822
38
+ headers['date'] ||= Time.now.httpdate
39
39
  end
40
40
 
41
41
  end
@@ -12,6 +12,7 @@
12
12
  # language governing permissions and limitations under the License.
13
13
 
14
14
  require 'thread'
15
+ require 'stringio'
15
16
 
16
17
  module AWS
17
18
  module Core
@@ -28,11 +29,12 @@ module AWS
28
29
  start_processor
29
30
  end
30
31
 
31
- def handle request, response
32
+ def handle request, response, &read_block
33
+
32
34
  raise "unsupport http reqest method: #{request.http_method}" unless
33
35
  ['GET', 'HEAD', 'PUT', 'POST', 'DELETE'].include? request.http_method
34
36
  @sem.synchronize do
35
- @q << [request, response, Thread.current]
37
+ @q << [request, response, read_block, Thread.current]
36
38
  begin
37
39
  @processor.wakeup
38
40
  rescue ThreadError
@@ -85,7 +87,7 @@ module AWS
85
87
  end
86
88
 
87
89
  private
88
- def make_easy_handle request, response, thread = nil
90
+ def make_easy_handle request, response, read_block, thread = nil
89
91
 
90
92
  protocol = request.use_ssl? ? 'https' : 'http'
91
93
  url = "#{protocol}://#{request.host}:#{request.port}#{request.uri}"
@@ -121,9 +123,26 @@ module AWS
121
123
  curl.delete = true
122
124
  end
123
125
 
126
+ buffer = StringIO.new
127
+
128
+ if read_block
129
+ curl.on_body do |chunk|
130
+ read_block.call(chunk)
131
+ chunk.size
132
+ end
133
+ else
134
+ curl.on_body do |chunk|
135
+ buffer << chunk
136
+ chunk.size
137
+ end
138
+ end
139
+
124
140
  curl.on_complete do
125
- response.body = curl.body_str
126
141
  response.status = curl.response_code
142
+ unless read_block
143
+ buffer.rewind
144
+ response.body = buffer.read
145
+ end
127
146
  thread.run if thread
128
147
  end
129
148
 
@@ -25,7 +25,7 @@ module AWS
25
25
 
26
26
  def add_authorization! credentials
27
27
 
28
- headers["x-amz-date"] ||= (headers["date"] ||= Time.now.rfc822)
28
+ headers["x-amz-date"] ||= (headers["date"] ||= Time.now.httpdate)
29
29
  headers["host"] ||= host
30
30
 
31
31
  headers["x-amz-security-token"] = credentials.session_token if
@@ -44,7 +44,7 @@ module AWS
44
44
  end
45
45
 
46
46
  def string_to_sign
47
- headers['date'] ||= Time.now.rfc822
47
+ headers['date'] ||= Time.now.httpdate
48
48
  end
49
49
 
50
50
  end
@@ -66,6 +66,17 @@ module AWS
66
66
  resp[:security_group_index][id]
67
67
  end
68
68
 
69
+ # @return [InstanceCollection] Returns an instance collection that will
70
+ # only enumerate instances in this security group.
71
+ def instances
72
+ instances = InstanceCollection.new(:config => config)
73
+ if vpc?
74
+ instances.filter('instance.group-id', [group_id])
75
+ else
76
+ instances.filter('group-id', [group_id])
77
+ end
78
+ end
79
+
69
80
  # @return [Boolean] True if the security group exists.
70
81
  def exists?
71
82
  client.describe_security_groups(:filters => [
@@ -16,7 +16,13 @@ module AWS
16
16
 
17
17
  # @private
18
18
  class Request < Core::Http::Request
19
- include Core::Signature::Version2
19
+
20
+ include Core::Signature::Version4
21
+
22
+ def service
23
+ 'elasticbeanstalk'
24
+ end
25
+
20
26
  end
21
27
 
22
28
  end
@@ -154,6 +154,7 @@ module AWS
154
154
  # * +:args+ - (Array<String>)
155
155
  # * +:supported_products+ - (Array<String>)
156
156
  # * +:visible_to_all_users+ - (Boolean)
157
+ # * +:job_flow_role+ - (String)
157
158
 
158
159
  # @!method modify_instance_groups(options = {})
159
160
  # Calls the ModifyInstanceGroups API operation.
@@ -176,13 +177,12 @@ module AWS
176
177
  # additional features.
177
178
  # * +:ami_version+ - (String) The version of the Amazon Machine Image
178
179
  # (AMI) to use when launching Amazon EC2 instances in the job flow.
179
- # The following values are valid: "latest" (latest AMI version;
180
- # currently AMI 2.0, Hadoop 0.20.205) "2.0" (AMI 2.0, Hadoop
181
- # 0.20.205) "1.0" (AMI 1.0, Hadoop 0.18) If this value is not
182
- # specified, the job flow uses the default of (AMI 1.0, Hadoop 0.18).
183
- # If the AMI supports multiple versions of Hadoop (for example, AMI
184
- # 1.0 supports both Hadoop 0.18 and 0.20) you can use the
185
- # JobFlowInstancesConfig HadoopVersion parameter to modify the
180
+ # The following values are valid: "latest" (uses the latest AMI) The
181
+ # version number of the AMI to use, for example, "2.0" If this value
182
+ # is not specified, the job flow uses the default of (AMI 1.0, Hadoop
183
+ # 0.18). If the AMI supports multiple versions of Hadoop (for
184
+ # example, AMI 1.0 supports both Hadoop 0.18 and 0.20) you can use
185
+ # the JobFlowInstancesConfig HadoopVersion parameter to modify the
186
186
  # version of Hadoop from the defaults shown above. For details about
187
187
  # the AMI versions currently supported by Amazon ElasticMapReduce, go
188
188
  # to AMI Versions Supported in Elastic MapReduce in the Amazon
@@ -278,6 +278,10 @@ module AWS
278
278
  # can view and (if they have the proper policy permissions set)
279
279
  # manage the job flow. If it is set to +false+ , only the IAM user
280
280
  # that created the job flow can view and manage it.
281
+ # * +:job_flow_role+ - (String) An IAM role for the job flow. The EC2
282
+ # instances of the job flow assume this role. The default role is
283
+ # EMRJobflowDefault. In order to use the default role, you must have
284
+ # already created it using the CLI.
281
285
  # @return [Core::Response]
282
286
  # The #data method of the response object returns
283
287
  # a hash with the following structure:
@@ -156,7 +156,16 @@ module AWS
156
156
  # @overload put_bucket_website(options = {})
157
157
  # @param [Hash] options
158
158
  # @option options [required,String] :bucket_name
159
- # @option options [required,Hash] :index_document
159
+ # @option options [Hash] :redirect_all_requests_to
160
+ # Describes the redirect behavior for every request to this
161
+ # bucket's website endpoint. If this element is present, no
162
+ # other options are are allowed.
163
+ # * +:host_name+ - (*required*, String)
164
+ # Name of the host where requests will be redirected.
165
+ # * +:protocol+ - (String)
166
+ # Protocol to use (http, https) when redirecting requests. The
167
+ # default is the protocol that is used in the original request.
168
+ # @option options [Hash] :index_document
160
169
  # * +:suffix+ - (*required*, String) - A suffix that is appended to
161
170
  # a request that is for a directory on the website endpoint
162
171
  # (e.g. if the suffix is index.html and you make a request to
@@ -167,6 +176,16 @@ module AWS
167
176
  # @option options [Hash] :error_document
168
177
  # * +:key+ - (*required*, String) - The object key name to use
169
178
  # when a 4XX class error occurs.
179
+ # @option options [Array<Hash>] :routing_rules
180
+ # * +:redirect+ - (*required*, Hash)
181
+ # * +:host_name+ - (String)
182
+ # * +:protocol+ - (String)
183
+ # * +:replace_key_prefix_with+ - (String)
184
+ # * +:replace_key_with+ - (String)
185
+ # * +:http_redirect_code+ - (String)
186
+ # * +:condition+ - (Hash)
187
+ # * +:key_prefix_equals+ - (String)
188
+ # * +:http_error_code_returned_equals+ - (String)
170
189
  # @return [Core::Response]
171
190
  bucket_method(:put_bucket_website, :put, 'website') do
172
191
 
@@ -174,14 +193,52 @@ module AWS
174
193
  validate_bucket_name!(options[:bucket_name])
175
194
  req.body = Nokogiri::XML::Builder.new do |xml|
176
195
  xml.WebsiteConfiguration(:xmlns => XMLNS) do
177
- xml.IndexDocument do
178
- xml.Suffix(options[:index_document][:suffix])
196
+
197
+ if redirect = options[:redirect_all_requests_to]
198
+ xml.RedirectAllRequestsTo do
199
+ xml.HostName(redirect[:host_name])
200
+ xml.Protocol(redirect[:protocol]) if redirect[:protocol]
201
+ end
202
+ end
203
+
204
+ if indx = options[:index_document]
205
+ xml.IndexDocument do
206
+ xml.Suffix(indx[:suffix])
207
+ end
179
208
  end
180
- if options[:error_document]
209
+
210
+ if err = options[:error_document]
181
211
  xml.ErrorDocument do
182
- xml.Key(options[:error_document][:key])
212
+ xml.Key(err[:key])
183
213
  end
184
214
  end
215
+
216
+ if rules = options[:routing_rules]
217
+ xml.RoutingRules do
218
+ rules.each do |rule|
219
+ xml.RoutingRule do
220
+
221
+ redirect = rule[:redirect]
222
+ xml.Redirect do
223
+ xml.Protocol(redirect[:protocol]) if redirect[:protocol]
224
+ xml.HostName(redirect[:host_name]) if redirect[:host_name]
225
+ xml.ReplaceKeyPrefixWith(redirect[:replace_key_prefix_with]) if redirect[:replace_key_prefix_with]
226
+ xml.ReplaceKeyWith(redirect[:replace_key_with]) if redirect[:replace_key_with]
227
+ xml.HttpRedirectCode(redirect[:http_redirect_code]) if redirect[:http_redirect_code]
228
+ end
229
+
230
+ if condition = rule[:condition]
231
+ xml.Condition do
232
+ xml.KeyPrefixEquals(condition[:key_prefix_equals]) if condition[:key_prefix_equals]
233
+ xml.HttpErrorCodeReturnedEquals(condition[:http_error_code_returned_equals]) if condition[:http_error_code_returned_equals]
234
+ end
235
+ end
236
+
237
+ end
238
+ end
239
+ end
240
+ end
241
+
185
242
  end
186
243
  end.doc.root.to_xml
187
244
  super(req, options)
@@ -220,6 +220,9 @@ module AWS
220
220
  element "ErrorDocument" do
221
221
  element "Key"
222
222
  end
223
+ element "RoutingRules" do
224
+ list("RoutingRule")
225
+ end
223
226
  end
224
227
 
225
228
  end
@@ -106,7 +106,7 @@ module AWS
106
106
  if headers.detect{|k,v| k.to_s =~ /^x-amz-date$/i }
107
107
  ''
108
108
  else
109
- headers['date'] ||= Time.now.rfc822
109
+ headers['date'] ||= Time.now.httpdate
110
110
  end
111
111
  end
112
112
 
@@ -560,6 +560,9 @@ module AWS
560
560
  # See
561
561
  # http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.11
562
562
  #
563
+ # @option options [String] :content_md5
564
+ # The base64 encoded content md5 of the data.
565
+ #
563
566
  # @option options :content_type A standard MIME type
564
567
  # describing the format of the object data.
565
568
  #
@@ -1049,7 +1052,8 @@ module AWS
1049
1052
  if should_decrypt?(options)
1050
1053
  get_encrypted_object(options, &read_block)
1051
1054
  else
1052
- get_object(options, &read_block)
1055
+ resp_data = get_object(options, &read_block)
1056
+ block_given? ? resp_data : resp_data[:data]
1053
1057
  end
1054
1058
 
1055
1059
  end
@@ -1262,19 +1266,20 @@ module AWS
1262
1266
 
1263
1267
  # A small wrapper around client#get_object
1264
1268
  def get_object options, &read_block
1265
- client.get_object(options, &read_block).data[:data]
1269
+ client.get_object(options, &read_block).data
1266
1270
  end
1267
1271
 
1268
1272
  # A wrapper around get_object that decrypts
1269
1273
  def get_encrypted_object options, &read_block
1270
1274
  decryption_cipher(options) do |cipher|
1271
1275
  if block_given?
1272
- get_object(options) do |chunk|
1276
+ resp = get_object(options) do |chunk|
1273
1277
  yield(cipher.update(chunk))
1274
1278
  end
1275
1279
  yield(cipher.final)
1280
+ resp
1276
1281
  else
1277
- cipher.update(get_object(options)) + cipher.final
1282
+ cipher.update(get_object(options)[:data]) + cipher.final
1278
1283
  end
1279
1284
  end
1280
1285
  end
@@ -1510,7 +1515,7 @@ module AWS
1510
1515
  config.s3_encryption_materials_location
1511
1516
 
1512
1517
  cipher =
1513
- decryption_materials(location) do |envelope_key, envelope_iv|
1518
+ decryption_materials(location, options) do |envelope_key, envelope_iv|
1514
1519
  envelope_key, envelope_iv =
1515
1520
  decode_envelope_key(envelope_key, envelope_iv, encryption_key)
1516
1521
  get_aes_cipher(:decrypt, :CBC, envelope_key, envelope_iv)
@@ -1539,10 +1544,10 @@ module AWS
1539
1544
 
1540
1545
  # @yield [String, String, String] Yields encryption materials for
1541
1546
  # decryption
1542
- def decryption_materials location, &block
1547
+ def decryption_materials location, options = {}, &block
1543
1548
 
1544
1549
  materials = case location
1545
- when :metadata then get_metadata_materials
1550
+ when :metadata then get_metadata_materials(options)
1546
1551
  when :instruction_file then get_inst_file_materials
1547
1552
  else
1548
1553
  msg = "invalid :encryption_materials_location option, expected "
@@ -1562,8 +1567,10 @@ module AWS
1562
1567
 
1563
1568
  # @return [String, String, String] Returns the data key, envelope_iv, and the
1564
1569
  # material description for decryption from the metadata.
1565
- def get_metadata_materials
1566
- metadata.to_h.values_at(*%w(x-amz-key x-amz-iv))
1570
+ def get_metadata_materials(options)
1571
+ opts = {}
1572
+ opts[:version_id] = options[:version_id] if options[:version_id]
1573
+ metadata(opts).to_h.values_at(*%w(x-amz-key x-amz-iv))
1567
1574
  end
1568
1575
 
1569
1576
  # @return [String, String, String] Returns the data key, envelope_iv, and the
@@ -18,41 +18,54 @@ module AWS
18
18
  class S3
19
19
  class WebsiteConfiguration
20
20
 
21
- # @private
21
+ # @option (see S3::Client#put_bucket_website)
22
22
  def initialize options = {}
23
- @index_document_suffix = index_suffix(options)
24
- @error_document_key = error_key(options)
23
+ @options = deep_copy(options)
24
+ if @options.empty?
25
+ @options[:index_document] = { :suffix => 'index.html' }
26
+ @options[:error_document] = { :key => 'error.html' }
27
+ end
25
28
  end
26
29
 
27
- # @return [String]
28
- attr_accessor :index_document_suffix
30
+ # @return [Hash]
31
+ attr_reader :options
29
32
 
30
- # @return [String]
31
- attr_accessor :error_document_key
33
+ alias_method :to_hash, :options
32
34
 
33
- # @return [Hash]
34
- def to_hash
35
- {
36
- :index_document => { :suffix => index_document_suffix },
37
- :error_document => { :key => error_document_key },
38
- }
35
+ # This method exists for backwards compatability.
36
+ # @return [String,nil]
37
+ # @private
38
+ def index_document_suffix
39
+ (@options[:index_document] || {})[:suffix]
39
40
  end
40
41
 
41
- # @return [Boolean] Returns +true+ if the other configuration is
42
- # the same.
43
- def eql? other
44
- other.is_a?(WebsiteConfiguration) and other.to_hash == self.to_hash
42
+ # This method exists for backwards compatability.
43
+ # @private
44
+ def index_document_suffix= suffix
45
+ @options.delete(:redirect_all_requests_to)
46
+ @options[:index_document] ||= {}
47
+ @options[:index_document][:suffix] = suffix
45
48
  end
46
- alias_method :==, :eql?
47
49
 
48
- private
50
+ # This method exists for backwards compatability.
51
+ # @return [String,nil]
52
+ # @private
53
+ def error_document_key
54
+ (@options[:error_document] || {})[:key]
55
+ end
49
56
 
50
- def index_suffix options
51
- (options[:index_document] || {})[:suffix] || 'index.html'
57
+ # This method exists for backwards compatability.
58
+ # @private
59
+ def error_document_key= key
60
+ @options.delete(:redirect_all_requests_to)
61
+ @options[:error_document] ||= {}
62
+ @options[:error_document][:key] = key
52
63
  end
53
64
 
54
- def error_key options
55
- (options[:error_document] || {})[:key] || 'error.html'
65
+ private
66
+
67
+ def deep_copy hash
68
+ Marshal.load(Marshal.dump(hash))
56
69
  end
57
70
 
58
71
  end
@@ -46,7 +46,7 @@ module AWS
46
46
  # @note Creating a domain in SimpleDB is an idempotent operation;
47
47
  # running it multiple times using the same domain name will not
48
48
  # result in an error.
49
- # @note You can create up to 100 domains per account.
49
+ # @note You can create up to 250 domains per account.
50
50
  # @param [String] domain_name
51
51
  # @return [Domain] Returns a new domain with the given name.
52
52
  def create(domain_name)
@@ -17,7 +17,11 @@ module AWS
17
17
  # @private
18
18
  class Request < Core::Http::Request
19
19
 
20
- include Core::Signature::Version2
20
+ include Core::Signature::Version4
21
+
22
+ def service
23
+ 'sqs'
24
+ end
21
25
 
22
26
  def path
23
27
  full_url.path
@@ -50,6 +50,11 @@ module AWS
50
50
 
51
51
  include Core::ServiceInterface
52
52
 
53
+ # (see Client#assume_role)
54
+ def assume_role options = {}
55
+ client.assume_role(options).data
56
+ end
57
+
53
58
  # Returns a set of temporary credentials for an AWS account or IAM
54
59
  # User. The credentials consist of an Access Key ID, a Secret
55
60
  # Access Key, and a security token. These credentials are valid
@@ -33,24 +33,68 @@ module AWS
33
33
 
34
34
  # client methods #
35
35
 
36
+ # @!method assume_role(options = {})
37
+ # Calls the AssumeRole API operation.
38
+ # @param [Hash] options
39
+ # * +:role_arn+ - *required* - (String) The Amazon Resource Name (ARN)
40
+ # of the role that the caller is assuming.
41
+ # * +:role_session_name+ - *required* - (String) An identifier for the
42
+ # assumed role session. The session name is included as part of the
43
+ # AssumedRoleUser.
44
+ # * +:policy+ - (String) A supplemental policy that can be associated
45
+ # with the temporary security credentials. The caller can restrict
46
+ # the permissions that are available on the role's temporary security
47
+ # credentials to maintain the least amount of privileges. When a
48
+ # service call is made with the temporary security credentials, both
49
+ # the role's permission policy and supplemental policy are checked.
50
+ # For more information about how permissions work in the context of
51
+ # temporary credentials, see Controlling Permissions in Temporary
52
+ # Credentials.
53
+ # * +:duration_seconds+ - (Integer) The duration, in seconds, of the
54
+ # role session. The value can range from 900 seconds (15 minutes) to
55
+ # 3600 seconds (1 hour). By default, the value is set to 3600 seconds
56
+ # (1 hour).
57
+ # * +:external_id+ - (String) A unique identifier that is generated by
58
+ # a third party for each of their customers. For each role that the
59
+ # third party can assume, they should instruct their customers to
60
+ # create a role with the external ID that was generated by the third
61
+ # party. Each time the third party assumes the role, they must pass
62
+ # the customer's correct external ID. The external ID is useful in
63
+ # order to help third parties bind a role to the customer who created
64
+ # it. For more information about the external ID, see About the
65
+ # External ID in Using Temporary Security Credentials.
66
+ # @return [Core::Response]
67
+ # The #data method of the response object returns
68
+ # a hash with the following structure:
69
+ # * +:credentials+ - (Hash)
70
+ # * +:access_key_id+ - (String)
71
+ # * +:secret_access_key+ - (String)
72
+ # * +:session_token+ - (String)
73
+ # * +:expiration+ - (Time)
74
+ # * +:assumed_role_user+ - (Hash)
75
+ # * +:assumed_role_id+ - (String)
76
+ # * +:arn+ - (String)
77
+ # * +:packed_policy_size+ - (Integer)
78
+
36
79
  # @!method get_federation_token(options = {})
37
80
  # Calls the GetFederationToken API operation.
38
81
  # @param [Hash] options
39
82
  # * +:name+ - *required* - (String) The name of the federated user
40
83
  # associated with the credentials. For information about limitations
41
- # on user names, go to Limitations on IAM Entities in Using AWS
42
- # Identity and Access Management.
84
+ # on user names, go to Limitations on IAM Entities in Using IAM.
43
85
  # * +:policy+ - (String) A policy specifying the permissions to
44
86
  # associate with the credentials. The caller can delegate their own
45
87
  # permissions by specifying a policy, and both policies will be
46
88
  # checked when a service call is made. For more information about how
47
89
  # permissions work in the context of temporary credentials, see
48
- # Controlling Permissions in Temporary Credentials in Using AWS
49
- # Identity and Access Management.
90
+ # Controlling Permissions in Temporary Credentials in Using IAM.
50
91
  # * +:duration_seconds+ - (Integer) The duration, in seconds, that the
51
92
  # session should last. Acceptable durations for federation sessions
52
- # range from 3600s (one hour) to 129600s (36 hours), with 43200s (12
53
- # hours) as the default.
93
+ # range from 900s (15 minutes) to 129600s (36 hours), with 43200s (12
94
+ # hours) as the default. Sessions for AWS account owners are
95
+ # restricted to a maximum of 3600s (one hour). If the duration is
96
+ # longer than one hour, the session for AWS account owners defaults
97
+ # to one hour.
54
98
  # @return [Core::Response]
55
99
  # The #data method of the response object returns
56
100
  # a hash with the following structure:
@@ -69,25 +113,32 @@ module AWS
69
113
  # @param [Hash] options
70
114
  # * +:duration_seconds+ - (Integer) The duration, in seconds, that the
71
115
  # credentials should remain valid. Acceptable durations for IAM user
72
- # sessions range from 3600s (one hour) to 129600s (36 hours), with
116
+ # sessions range from 900s (15 minutes) to 129600s (36 hours), with
73
117
  # 43200s (12 hours) as the default. Sessions for AWS account owners
74
- # are restricted to a maximum of 3600s (one hour).
75
- # * +:serial_number+ - (String) The identification number of the
76
- # Multi-Factor Authentication (MFA) device for the user. If the user
77
- # has an access policy requiring MFA to access resources, provide the
78
- # value here. The number is in the Security Credentials tab of the
79
- # user's details pane in the IAM console. If the user has an active
80
- # MFA device, the details pane displays a Multi-Factor Authentication
81
- # Device value such as arn:aws:iam::123456789012:mfa/user for a
82
- # virtual device or the device serial number for a hardware device.
118
+ # are restricted to a maximum of 3600s (one hour). If the duration is
119
+ # longer than one hour, the session for AWS account owners defaults
120
+ # to one hour.
121
+ # * +:serial_number+ - (String) The identification number of the MFA
122
+ # device for the user. If the IAM user has a policy requiring MFA
123
+ # authentication (or is in a group requiring MFA authentication) to
124
+ # access resources, provide the device value here.The value is in the
125
+ # Security Credentials tab of the user's details pane in the IAM
126
+ # console. If the IAM user has an active MFA device, the details pane
127
+ # displays a Multi-Factor Authentication Device value. The value is
128
+ # either for a virtual device, such as
129
+ # arn:aws:iam::123456789012:mfa/user, or it is the device serial
130
+ # number for a hardware device (usually the number from the back of
131
+ # the device), such as GAHT12345678. For more information, see Using
132
+ # Multi-Factor Authentication (MFA) Devices with AWS in Using IAM.
83
133
  # * +:token_code+ - (String) The value provided by the MFA device. If
84
- # the user has an access policy requiring an MFA code, provide the
85
- # value here to get permission to resources as specified in the
86
- # access policy. If MFA is required, and a code not provided while
87
- # requesting a set of temporary security credentials, the user will
88
- # receive an "access denied" response when requesting resources that
89
- # require MFA. For more information, see Using Multi-Factor
90
- # Authentication (MFA) Devices with AWS in Using IAM.
134
+ # the user has an access policy requiring an MFA code (or is in a
135
+ # group requiring an MFA code), provide the value here to get
136
+ # permission to resources as specified in the access policy. If MFA
137
+ # authentication is required, and the user does not provide a code
138
+ # when requesting a set of temporary security credentials, the user
139
+ # will receive an "access denied" response when requesting resources
140
+ # that require MFA authentication. For more information, see Using
141
+ # Multi-Factor Authentication (MFA) Devices with AWS in Using IAM.
91
142
  # @return [Core::Response]
92
143
  # The #data method of the response object returns
93
144
  # a hash with the following structure:
@@ -14,5 +14,5 @@
14
14
 
15
15
  module AWS
16
16
  # Current version of the AWS SDK for Ruby
17
- VERSION = '1.8.1.2'
17
+ VERSION = '1.8.1.3'
18
18
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: aws-sdk
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.8.1.2
4
+ version: 1.8.1.3
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-02-04 00:00:00.000000000 Z
12
+ date: 2013-02-12 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: uuidtools