aws-sdk-core 2.0.48 → 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.
Files changed (197) hide show
  1. checksums.yaml +4 -4
  2. data/apis/autoscaling/2011-01-01/api-2.json +636 -33
  3. data/apis/cloudhsm/2014-05-30/api-2.json +3 -6
  4. data/apis/ec2/2014-10-01/api-2.json +10267 -0
  5. data/apis/ec2/2014-10-01/paginators-1.json +125 -0
  6. data/apis/ec2/2014-10-01/resources-1.json +2289 -0
  7. data/apis/ec2/2014-10-01/waiters-2.json +453 -0
  8. data/apis/ec2/2015-03-01/api-2.json +11245 -0
  9. data/apis/ec2/2015-03-01/paginators-1.json +125 -0
  10. data/apis/ec2/2015-03-01/resources-1.json +2479 -0
  11. data/apis/ec2/2015-03-01/waiters-2.json +458 -0
  12. data/apis/ec2/2015-04-15/api-2.json +182 -2
  13. data/apis/ecs/2014-11-13/api-2.json +316 -7
  14. data/apis/ecs/2014-11-13/paginators-1.json +40 -0
  15. data/apis/ecs/2014-11-13/waiters-2.json +93 -0
  16. data/apis/redshift/2012-12-01/waiters-2.json +19 -0
  17. data/apis/s3/2006-03-01/api-2.json +1 -2
  18. data/apis/sqs/2012-11-05/api-2.json +5 -6
  19. data/ca-bundle.crt +3554 -0
  20. data/lib/aws-sdk-core.rb +127 -44
  21. data/lib/aws-sdk-core/api/builder.rb +95 -0
  22. data/lib/aws-sdk-core/api/customizations.rb +152 -0
  23. data/lib/aws-sdk-core/api/docs/builder.rb +220 -0
  24. data/lib/aws-sdk-core/api/docs/client_type_documenter.rb +109 -0
  25. data/lib/aws-sdk-core/api/docs/docstring_provider.rb +66 -0
  26. data/lib/aws-sdk-core/api/docs/operation_documenter.rb +107 -0
  27. data/lib/aws-sdk-core/api/docs/param_formatter.rb +163 -0
  28. data/lib/aws-sdk-core/api/docs/request_syntax_example.rb +22 -0
  29. data/lib/aws-sdk-core/api/docs/response_structure_example.rb +91 -0
  30. data/lib/aws-sdk-core/api/docs/utils.rb +133 -0
  31. data/lib/aws-sdk-core/api/shape_map.rb +140 -0
  32. data/lib/aws-sdk-core/assume_role_credentials.rb +9 -6
  33. data/lib/aws-sdk-core/client.rb +9 -6
  34. data/lib/aws-sdk-core/client_stubs.rb +127 -133
  35. data/lib/aws-sdk-core/client_waiters.rb +1 -1
  36. data/lib/aws-sdk-core/credential_provider.rb +44 -0
  37. data/lib/aws-sdk-core/credential_provider_chain.rb +3 -2
  38. data/lib/aws-sdk-core/credentials.rb +5 -0
  39. data/lib/aws-sdk-core/deprecations.rb +69 -0
  40. data/lib/aws-sdk-core/dynamodb.rb +12 -0
  41. data/lib/aws-sdk-core/eager_loader.rb +31 -0
  42. data/lib/aws-sdk-core/ecs.rb +2 -0
  43. data/lib/aws-sdk-core/empty_structure.rb +1 -82
  44. data/lib/aws-sdk-core/endpoint_provider.rb +1 -1
  45. data/lib/aws-sdk-core/instance_profile_credentials.rb +9 -10
  46. data/lib/aws-sdk-core/json.rb +56 -0
  47. data/lib/aws-sdk-core/json/builder.rb +33 -34
  48. data/lib/aws-sdk-core/json/error_handler.rb +2 -2
  49. data/lib/aws-sdk-core/json/handler.rb +67 -0
  50. data/lib/aws-sdk-core/json/json_engine.rb +15 -0
  51. data/lib/aws-sdk-core/json/oj_engine.rb +15 -0
  52. data/lib/aws-sdk-core/json/parser.rb +30 -38
  53. data/lib/aws-sdk-core/pageable_response.rb +9 -12
  54. data/lib/aws-sdk-core/pager.rb +69 -0
  55. data/lib/aws-sdk-core/param_converter.rb +203 -0
  56. data/lib/aws-sdk-core/param_validator.rb +148 -0
  57. data/lib/aws-sdk-core/plugins/dynamodb_simple_attributes.rb +21 -18
  58. data/lib/aws-sdk-core/plugins/glacier_account_id.rb +9 -1
  59. data/lib/aws-sdk-core/plugins/glacier_checksums.rb +2 -3
  60. data/lib/aws-sdk-core/plugins/param_converter.rb +27 -0
  61. data/lib/aws-sdk-core/plugins/param_validator.rb +28 -0
  62. data/lib/aws-sdk-core/plugins/protocols/json_rpc.rb +3 -7
  63. data/lib/aws-sdk-core/plugins/protocols/rest_json.rb +1 -2
  64. data/lib/aws-sdk-core/plugins/protocols/rest_xml.rb +1 -1
  65. data/lib/aws-sdk-core/plugins/regional_endpoint.rb +1 -1
  66. data/lib/aws-sdk-core/plugins/request_signer.rb +5 -5
  67. data/lib/aws-sdk-core/plugins/response_paging.rb +20 -11
  68. data/lib/aws-sdk-core/plugins/s3_get_bucket_location_fix.rb +1 -1
  69. data/lib/aws-sdk-core/plugins/s3_request_signer.rb +1 -2
  70. data/lib/aws-sdk-core/plugins/stub_responses.rb +25 -27
  71. data/lib/aws-sdk-core/query/ec2_param_builder.rb +29 -34
  72. data/lib/aws-sdk-core/query/handler.rb +32 -18
  73. data/lib/aws-sdk-core/query/param_builder.rb +45 -53
  74. data/lib/aws-sdk-core/refreshing_credentials.rb +3 -15
  75. data/lib/aws-sdk-core/rest/handler.rb +22 -0
  76. data/lib/aws-sdk-core/rest/request/body.rb +58 -0
  77. data/lib/aws-sdk-core/rest/request/builder.rb +50 -0
  78. data/lib/aws-sdk-core/rest/request/endpoint.rb +70 -0
  79. data/lib/aws-sdk-core/rest/request/headers.rb +48 -0
  80. data/lib/aws-sdk-core/rest/response/body.rb +43 -0
  81. data/lib/aws-sdk-core/rest/response/headers.rb +60 -0
  82. data/lib/aws-sdk-core/rest/response/parser.rb +47 -0
  83. data/lib/aws-sdk-core/rest/response/status_code.rb +24 -0
  84. data/lib/aws-sdk-core/shared_credentials.rb +11 -6
  85. data/lib/aws-sdk-core/signers/base.rb +1 -1
  86. data/lib/aws-sdk-core/signers/s3.rb +2 -3
  87. data/lib/aws-sdk-core/signers/v2.rb +7 -4
  88. data/lib/aws-sdk-core/signers/v4.rb +11 -22
  89. data/lib/aws-sdk-core/structure.rb +26 -145
  90. data/lib/aws-sdk-core/stubbing/data_applicator.rb +46 -0
  91. data/lib/aws-sdk-core/stubbing/empty_stub.rb +53 -0
  92. data/lib/aws-sdk-core/stubbing/protocols/ec2.rb +49 -0
  93. data/lib/aws-sdk-core/stubbing/protocols/json.rb +40 -0
  94. data/lib/aws-sdk-core/stubbing/protocols/query.rb +40 -0
  95. data/lib/aws-sdk-core/stubbing/protocols/rest.rb +67 -0
  96. data/lib/aws-sdk-core/stubbing/protocols/rest_json.rb +25 -0
  97. data/lib/aws-sdk-core/stubbing/protocols/rest_xml.rb +38 -0
  98. data/lib/aws-sdk-core/stubbing/stub_data.rb +34 -0
  99. data/lib/aws-sdk-core/version.rb +1 -1
  100. data/lib/aws-sdk-core/xml/builder.rb +58 -52
  101. data/lib/aws-sdk-core/xml/default_map.rb +10 -0
  102. data/lib/aws-sdk-core/xml/doc_builder.rb +86 -0
  103. data/lib/aws-sdk-core/xml/error_handler.rb +7 -2
  104. data/lib/aws-sdk-core/xml/parser.rb +4 -4
  105. data/lib/aws-sdk-core/xml/parser/frame.rb +75 -70
  106. data/lib/aws-sdk-core/xml/parser/stack.rb +4 -4
  107. data/lib/seahorse.rb +0 -11
  108. data/lib/seahorse/client/base.rb +3 -12
  109. data/lib/seahorse/client/http/request.rb +9 -5
  110. data/lib/seahorse/client/plugins/endpoint.rb +5 -56
  111. data/lib/seahorse/client/plugins/restful_bindings.rb +38 -31
  112. data/lib/seahorse/client/request_context.rb +2 -2
  113. data/lib/seahorse/client/response.rb +6 -5
  114. data/lib/seahorse/model/api.rb +18 -61
  115. data/lib/seahorse/model/operation.rb +24 -54
  116. data/lib/seahorse/model/shapes.rb +120 -364
  117. data/lib/seahorse/util.rb +2 -6
  118. metadata +56 -109
  119. data/apis/autoscaling/2011-01-01/docs-2.json +0 -1246
  120. data/apis/cloudformation/2010-05-15/docs-2.json +0 -725
  121. data/apis/cloudfront/2014-11-06/docs-2.json +0 -1125
  122. data/apis/cloudhsm/2014-05-30/docs-2.json +0 -472
  123. data/apis/cloudsearch/2013-01-01/docs-2.json +0 -865
  124. data/apis/cloudsearchdomain/2013-01-01/docs-2.json +0 -311
  125. data/apis/cloudtrail/2013-11-01/docs-2.json +0 -328
  126. data/apis/codedeploy/2014-10-06/docs-2.json +0 -1261
  127. data/apis/cognito-identity/2014-06-30/docs-2.json +0 -506
  128. data/apis/cognito-sync/2014-06-30/docs-2.json +0 -582
  129. data/apis/config/2014-10-17/docs-2.json +0 -513
  130. data/apis/config/2014-11-12/docs-2.json +0 -514
  131. data/apis/datapipeline/2012-10-29/docs-2.json +0 -607
  132. data/apis/directconnect/2012-10-25/docs-2.json +0 -494
  133. data/apis/ds/2015-04-16/docs-2.json +0 -753
  134. data/apis/dynamodb/2011-12-05/api-2.json +0 -949
  135. data/apis/dynamodb/2011-12-05/docs-2.json +0 -606
  136. data/apis/dynamodb/2011-12-05/paginators-1.json +0 -26
  137. data/apis/dynamodb/2011-12-05/waiters-2.json +0 -35
  138. data/apis/dynamodb/2012-08-10/docs-2.json +0 -977
  139. data/apis/ec2/2015-04-15/docs-2.json +0 -5368
  140. data/apis/ecs/2014-11-13/docs-2.json +0 -791
  141. data/apis/elasticache/2015-02-02/docs-2.json +0 -1390
  142. data/apis/elasticbeanstalk/2010-12-01/docs-2.json +0 -1114
  143. data/apis/elasticfilesystem/2015-02-01/docs-2.json +0 -414
  144. data/apis/elasticloadbalancing/2012-06-01/docs-2.json +0 -1078
  145. data/apis/elasticmapreduce/2009-03-31/docs-2.json +0 -969
  146. data/apis/elastictranscoder/2012-09-25/docs-2.json +0 -1152
  147. data/apis/email/2010-12-01/docs-2.json +0 -441
  148. data/apis/glacier/2012-06-01/docs-2.json +0 -575
  149. data/apis/iam/2010-05-08/docs-2.json +0 -2138
  150. data/apis/importexport/2010-06-01/docs-2.json +0 -432
  151. data/apis/kinesis/2013-12-02/docs-2.json +0 -424
  152. data/apis/kms/2014-11-01/docs-2.json +0 -628
  153. data/apis/lambda/2014-11-11/docs-2.json +0 -303
  154. data/apis/lambda/2015-03-31/docs-2.json +0 -490
  155. data/apis/logs/2014-03-28/docs-2.json +0 -599
  156. data/apis/machinelearning/2014-12-12/docs-2.json +0 -1034
  157. data/apis/monitoring/2010-08-01/docs-2.json +0 -514
  158. data/apis/opsworks/2013-02-18/docs-2.json +0 -1592
  159. data/apis/rds/2014-10-31/docs-2.json +0 -2074
  160. data/apis/redshift/2012-12-01/docs-2.json +0 -1890
  161. data/apis/route53/2013-04-01/docs-2.json +0 -1159
  162. data/apis/route53domains/2014-05-15/docs-2.json +0 -620
  163. data/apis/s3/2006-03-01/docs-2.json +0 -2213
  164. data/apis/sdb/2009-04-15/docs-2.json +0 -339
  165. data/apis/sns/2010-03-31/docs-2.json +0 -564
  166. data/apis/sqs/2012-11-05/docs-2.json +0 -503
  167. data/apis/ssm/2014-11-06/docs-2.json +0 -440
  168. data/apis/storagegateway/2013-06-30/docs-2.json +0 -1331
  169. data/apis/sts/2011-06-15/docs-2.json +0 -351
  170. data/apis/support/2013-04-15/docs-2.json +0 -680
  171. data/apis/swf/2012-01-25/docs-2.json +0 -1569
  172. data/apis/workspaces/2015-04-08/docs-2.json +0 -457
  173. data/lib/aws-sdk-core/api/customizer.rb +0 -75
  174. data/lib/aws-sdk-core/api/docstrings.rb +0 -38
  175. data/lib/aws-sdk-core/api/documenter.rb +0 -241
  176. data/lib/aws-sdk-core/api/operation_documenter.rb +0 -173
  177. data/lib/aws-sdk-core/api/operation_example.rb +0 -133
  178. data/lib/aws-sdk-core/api/service_customizations.rb +0 -140
  179. data/lib/aws-sdk-core/client_paging.rb +0 -31
  180. data/lib/aws-sdk-core/json/rest_handler.rb +0 -20
  181. data/lib/aws-sdk-core/json/rpc_body_handler.rb +0 -38
  182. data/lib/aws-sdk-core/json/rpc_headers_handler.rb +0 -34
  183. data/lib/aws-sdk-core/json/simple_body_handler.rb +0 -34
  184. data/lib/aws-sdk-core/paging/null_pager.rb +0 -20
  185. data/lib/aws-sdk-core/paging/null_provider.rb +0 -13
  186. data/lib/aws-sdk-core/paging/pager.rb +0 -70
  187. data/lib/aws-sdk-core/paging/provider.rb +0 -22
  188. data/lib/aws-sdk-core/rest_body_handler.rb +0 -111
  189. data/lib/aws-sdk-core/signers/handler.rb +0 -18
  190. data/lib/aws-sdk-core/xml/rest_handler.rb +0 -20
  191. data/lib/seahorse/client/param_converter.rb +0 -207
  192. data/lib/seahorse/client/param_validator.rb +0 -139
  193. data/lib/seahorse/client/plugins/json_simple.rb +0 -33
  194. data/lib/seahorse/client/plugins/param_conversion.rb +0 -29
  195. data/lib/seahorse/client/plugins/param_validation.rb +0 -30
  196. data/lib/seahorse/client/xml/builder.rb +0 -91
  197. data/lib/seahorse/model/shape_map.rb +0 -47
@@ -1,133 +0,0 @@
1
- module Aws
2
- module Api
3
- class OperationExample
4
-
5
- include Seahorse::Model::Shapes
6
-
7
- def initialize(options)
8
- @obj_name = options[:svc_var_name]
9
- @method_name = options[:method_name]
10
- @operation = options[:operation]
11
- @streaming_output = !!(
12
- @operation.output &&
13
- @operation.output.payload_member &&
14
- @operation.output.payload_member.definition['streaming']
15
- )
16
- end
17
-
18
- def to_str
19
- "resp = #{@obj_name}.#{@method_name}(#{params[1...-1]})"
20
- end
21
- alias to_s to_str
22
- alias inspect to_str
23
-
24
- private
25
-
26
- def params
27
- return '' if @operation.input.nil?
28
- structure(@operation.input, '', [])
29
- end
30
-
31
- def structure(shape, i, visited)
32
- lines = ['{']
33
- if @streaming_output
34
- lines << "#{i} response_target: '/path/to/file', # optional target file path"
35
- end
36
- shape.members.each do |member_name, member_shape|
37
- if shape.required.include?(member_name)
38
- lines << "#{i} # required"
39
- end
40
- lines << "#{i} #{member_name}: #{member(member_shape, i + ' ', visited)},"
41
- end
42
- lines << "#{i}}"
43
- lines.join("\n")
44
- end
45
-
46
- def map(shape, i, visited)
47
- if multiline?(shape.value)
48
- multiline_map(shape, i, visited)
49
- else
50
- "{ #{key_name(shape)} => #{value(shape.value)} }"
51
- end
52
- end
53
-
54
- def multiline_map(shape, i, visited)
55
- lines = ["{"]
56
- lines << "#{i} #{key_name(shape)} => #{member(shape.value, i + ' ', visited)},"
57
- lines << "#{i}}"
58
- lines.join("\n")
59
- end
60
-
61
- def list(shape, i, visited)
62
- if multiline?(shape.member)
63
- multiline_list(shape, i, visited)
64
- else
65
- "[#{value(shape.member)}, '...']"
66
- end
67
- end
68
-
69
- def multiline_list(shape, i, visited)
70
- lines = ["["]
71
- lines << "#{i} #{member(shape.member, i + ' ', visited)},"
72
- lines << "#{i}]"
73
- lines.join("\n")
74
- end
75
-
76
- def member(shape, i, visited)
77
- if visited.include?(shape.name)
78
- recursive = ['{']
79
- recursive << "#{i} # recursive #{shape.name} ..."
80
- recursive << "#{i}}"
81
- return recursive.join("\n")
82
- elsif shape.name == 'AttributeValue'
83
- msg='"value", #<Hash,Array,String,Numeric,Boolean,nil,IO,Set>'
84
- return msg
85
- else
86
- visited = visited + [shape.name]
87
- end
88
- case shape
89
- when Seahorse::Model::Shapes::Structure then structure(shape, i, visited)
90
- when Seahorse::Model::Shapes::Map then map(shape, i, visited)
91
- when Seahorse::Model::Shapes::List then list(shape, i, visited)
92
- else value(shape)
93
- end
94
- end
95
-
96
- def value(shape)
97
- case shape
98
- when Seahorse::Model::Shapes::String then string_value(shape)
99
- when Seahorse::Model::Shapes::Integer then 1
100
- when Seahorse::Model::Shapes::Float then 1.1
101
- when Seahorse::Model::Shapes::Boolean then true
102
- when Seahorse::Model::Shapes::Timestamp then 'Time.now'
103
- when Seahorse::Model::Shapes::Blob then "#{shape_name(shape, false)}<String,IO>".inspect
104
- else raise "unhandled shape type `#{shape.type}'"
105
- end
106
- end
107
-
108
- def string_value(shape)
109
- if shape.enum
110
- shape.enum.to_a.join('|').inspect
111
- else
112
- shape_name(shape)
113
- end
114
- end
115
-
116
- def multiline?(shape)
117
- Seahorse::Model::Shapes::Structure === shape ||
118
- Seahorse::Model::Shapes::List === shape ||
119
- Seahorse::Model::Shapes::Map === shape
120
- end
121
-
122
- def shape_name(shape, inspect = true)
123
- value = shape.name
124
- inspect ? value.inspect : value
125
- end
126
-
127
- def key_name(shape, inspect = true)
128
- shape_name(shape.key)
129
- end
130
-
131
- end
132
- end
133
- end
@@ -1,140 +0,0 @@
1
- module Aws
2
- module Api
3
- module ServiceCustomizations
4
-
5
- @customizations = Hash.new {|h,k| h[k] = [] }
6
-
7
- class << self
8
-
9
- # Registers a list of customizations to apply during API translation.
10
- #
11
- # ServiceCustomizations.customize('s3') do
12
- # plugin 'MyCustomPlugin'
13
- # end
14
- #
15
- # The block is evaluated by an instance of {Customizer}.
16
- # @param [String] endpoint_prefix
17
- # @return [void]
18
- # @see {Customizer}
19
- def customize(endpoint_prefix, &block)
20
- @customizations[endpoint_prefix] << block
21
- end
22
-
23
- # Applies customizations registered for the service client.
24
- # Customizations are registered by the service endpoint prefix.
25
- # @param [Class<Seahorse::Client::Base>] client_class
26
- # @return [void]
27
- # @see {#customize}
28
- # @see {Customizer}
29
- def apply(client_class)
30
- apply_protocol_plugin(client_class)
31
- endpoint_prefix = client_class.api.metadata('endpointPrefix')
32
- @customizations[endpoint_prefix].each do |customization|
33
- Customizer.new(client_class).apply(&customization)
34
- end
35
- end
36
-
37
- private
38
-
39
- def apply_protocol_plugin(client_class)
40
- protocol = client_class.api.metadata('protocol')
41
- plugin = case protocol
42
- when 'ec2' then Aws::Plugins::Protocols::EC2
43
- when 'query' then Aws::Plugins::Protocols::Query
44
- when 'json' then Aws::Plugins::Protocols::JsonRpc
45
- when 'rest-json' then Aws::Plugins::Protocols::RestJson
46
- when 'rest-xml' then Aws::Plugins::Protocols::RestXml
47
- end
48
- client_class.add_plugin(plugin) if plugin
49
- end
50
-
51
- end
52
-
53
- customize 'cloudfront' do
54
- reshape_members 'MaxItems', 'shape' => 'integer'
55
- api.operations.each do |method_name|
56
- operation = api.operation(method_name)
57
- name = operation.name.sub(/\d{4}_\d{2}_\d{2}$/, '')
58
- operation.instance_variable_set("@name", name)
59
- end
60
- end
61
-
62
- customize 'cloudsearchdomain' do
63
- remove_plugin 'Aws::Plugins::RegionalEndpoint'
64
- add_plugin 'Aws::Plugins::CSDConditionalSigning'
65
- end
66
-
67
- customize 'dynamodb' do
68
- add_plugin 'Aws::Plugins::DynamoDBExtendedRetries'
69
- add_plugin 'Aws::Plugins::DynamoDBSimpleAttributes'
70
- add_plugin 'Aws::Plugins::DynamoDBCRC32Validation'
71
- end
72
-
73
- customize 'ec2' do
74
- if api.version >= '2014-05-01'
75
- add_plugin 'Aws::Plugins::EC2CopyEncryptedSnapshot'
76
- end
77
- end
78
-
79
- customize 'glacier' do
80
- add_plugin 'Aws::Plugins::GlacierAccountId'
81
- add_plugin 'Aws::Plugins::GlacierApiVersion'
82
- add_plugin 'Aws::Plugins::GlacierChecksums'
83
- add_shape 'Date', 'type' => 'timestamp'
84
- reshape_members /date/i, 'shape' => 'Date'
85
- reshape_members 'limit', 'shape' => 'Size'
86
- reshape_members 'partSize', 'shape' => 'Size'
87
- reshape_members 'archiveSize', 'shape' => 'Size'
88
- end
89
-
90
- customize 'importexport' do
91
- each_operation do |name, operation|
92
- operation['http']['requestUri'] = '/'
93
- end
94
- end
95
-
96
- customize 'lambda' do
97
- reshape 'Timestamp', 'type' => 'timestamp'
98
- end
99
-
100
- customize 'machinelearning' do
101
- add_plugin 'Aws::Plugins::MachineLearningPredictEndpoint'
102
- end
103
-
104
- customize 'route53' do
105
- add_plugin 'Aws::Plugins::Route53IdFix'
106
- reshape 'PageMaxItems', 'type' => 'integer'
107
- end
108
-
109
- customize 's3' do
110
- add_plugin 'Aws::Plugins::S3BucketDns'
111
- add_plugin 'Aws::Plugins::S3Expect100Continue'
112
- add_plugin 'Aws::Plugins::S3CompleteMultipartUploadFix'
113
- add_plugin 'Aws::Plugins::S3GetBucketLocationFix'
114
- add_plugin 'Aws::Plugins::S3LocationConstraint'
115
- add_plugin 'Aws::Plugins::S3Md5s'
116
- add_plugin 'Aws::Plugins::S3Redirects'
117
- add_plugin 'Aws::Plugins::S3SseCpk'
118
- add_plugin 'Aws::Plugins::S3UrlEncodedKeys'
119
- add_plugin 'Aws::Plugins::S3RequestSigner'
120
-
121
- api.definition['metadata'].delete('signatureVersion')
122
-
123
- # required for the GetBucketLocation fix to work, disabled normal
124
- # parsing of the output
125
- client_class.api.operation(:get_bucket_location).
126
- instance_variable_set("@output", nil)
127
- end
128
-
129
- customize 'sqs' do
130
- add_plugin 'Aws::Plugins::SQSQueueUrls'
131
- metadata 'errorPrefix', 'AWS.SimpleQueueService.'
132
- end
133
-
134
- customize 'swf' do
135
- add_plugin 'Aws::Plugins::SWFReadTimeouts'
136
- end
137
-
138
- end
139
- end
140
- end
@@ -1,31 +0,0 @@
1
- require 'pathname'
2
-
3
- module Aws
4
- # @api private
5
- module ClientPaging
6
-
7
- # @api private
8
- def self.included(subclass)
9
-
10
- subclass.add_plugin('Aws::Plugins::ResponsePaging')
11
-
12
- class << subclass
13
-
14
- def set_paginators(paginators)
15
- @paginators = case paginators
16
- when Paging::Provider then paginators
17
- when Hash then Paging::Provider.new(paginators)
18
- when String, Pathname then Paging::Provider.new(Aws.load_json(paginators))
19
- when nil then Paging::NullProvider.new
20
- else raise ArgumentError, 'invalid paginators'
21
- end
22
- end
23
-
24
- def paginators
25
- @paginators
26
- end
27
-
28
- end
29
- end
30
- end
31
- end
@@ -1,20 +0,0 @@
1
- module Aws
2
- module Json
3
- class RestHandler < RestBodyHandler
4
-
5
- # @param [Seahorse::Model::Shapes::Structure] shape
6
- # @param [Hash] params
7
- def serialize_params(shape, params)
8
- Builder.new.to_json(shape, params)
9
- end
10
-
11
- # @param [String] json
12
- # @param [Seahorse::Model::Shapes::Structure] shape
13
- # @param [Structure, nil] target
14
- def parse_body(json, shape, target)
15
- Parser.new.parse(shape, json, target)
16
- end
17
-
18
- end
19
- end
20
- end
@@ -1,38 +0,0 @@
1
- module Aws
2
- module Json
3
- class RpcBodyHandler < Seahorse::Client::Handler
4
-
5
- # @param [Seahorse::Client::RequestContext] context
6
- # @return [Seahorse::Client::Response]
7
- def call(context)
8
- build_json(context)
9
- @handler.call(context).on_success do |response|
10
- unless response.error
11
- response.data = parse_json(context)
12
- end
13
- end
14
- end
15
-
16
- private
17
-
18
- def build_json(context)
19
- if shape = context.operation.input
20
- context.http_request.body = Builder.new.to_json(shape, context.params)
21
- else
22
- context.http_request.body = '{}'
23
- end
24
- end
25
-
26
- def parse_json(context)
27
- if output_shape = context.operation.output
28
- json = context.http_response.body_contents
29
- json = '{}' if json == ''
30
- Parser.new.parse(output_shape, json)
31
- else
32
- EmptyStructure.new
33
- end
34
- end
35
-
36
- end
37
- end
38
- end
@@ -1,34 +0,0 @@
1
- module Aws
2
- module Json
3
- class RpcHeadersHandler < Seahorse::Client::Handler
4
-
5
- CONTENT_TYPE = 'application/x-amz-json-%s'
6
-
7
- # @param [Seahorse::Client::RequestContext] context
8
- # @return [Seahorse::Client::Response]
9
- def call(context)
10
- @handler.call(add_headers(context)).on(200..599) do |resp|
11
- context[:request_id] = context.http_response.headers['x-amzn-requestid']
12
- end
13
- end
14
-
15
- private
16
-
17
- def add_headers(context)
18
- context.http_request.headers['Content-Type'] = content_type(context)
19
- context.http_request.headers['X-Amz-Target'] = target(context)
20
- context
21
- end
22
-
23
- def content_type(context)
24
- CONTENT_TYPE % [context.config.api.metadata('jsonVersion')]
25
- end
26
-
27
- def target(context)
28
- prefix = context.config.api.metadata('targetPrefix')
29
- "#{prefix}.#{context.operation.name}"
30
- end
31
-
32
- end
33
- end
34
- end
@@ -1,34 +0,0 @@
1
- module Aws
2
- module Json
3
-
4
- # This plugin performs two trivial translations:
5
- #
6
- # * The request parameters are serialized as JSON for the request body
7
- # * The response body is deserialized as JSON for the response data
8
- #
9
- # No attempt is made to extract errors from the HTTP response body.
10
- # Parsing the response only happens for a successful response.
11
- #
12
- class SimpleBodyHandler < Seahorse::Client::Handler
13
-
14
- def call(context)
15
- build_json(context)
16
- @handler.call(context).on_success do |response|
17
- response.error = nil
18
- response.data = parse_json(context)
19
- end
20
- end
21
-
22
- private
23
-
24
- def build_json(context)
25
- context.http_request.body = MultiJson.dump(context.params)
26
- end
27
-
28
- def parse_json(context)
29
- MultiJson.load(context.http_response.body_contents)
30
- end
31
-
32
- end
33
- end
34
- end
@@ -1,20 +0,0 @@
1
- module Aws
2
- module Paging
3
- class NullPager < Pager
4
-
5
- def initialize
6
- end
7
-
8
- # @return [{}]
9
- def next_tokens
10
- {}
11
- end
12
-
13
- # @return [false]
14
- def truncated?(response)
15
- false
16
- end
17
-
18
- end
19
- end
20
- end