aws-sdk-simpledb 1.0.0.rc1

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 4f43753abbf035664d9e64611a3f0c530fbe8b04
4
+ data.tar.gz: 019285b9887217e093a3a09334259747d1f8a05f
5
+ SHA512:
6
+ metadata.gz: ee6acb7b6f05be31db08f9d436eadf167fe6fd9ea6acd90a873dc6b9b4f5654f54259fe8f96770ab41e33c18590013321fdeb7968101e76f915edb6b104c72b4
7
+ data.tar.gz: fd8959f06da19463e564a79e04dad38b932961d09af6c19b00bacbb09e45e6376343dc36e0f193ba3607ef8cccbb16617f872bec0d87601d5d881fc5387035ed
@@ -0,0 +1,47 @@
1
+ # WARNING ABOUT GENERATED CODE
2
+ #
3
+ # This file is generated. See the contributing for info on making contributions:
4
+ # https://github.com/aws/aws-sdk-ruby/blob/master/CONTRIBUTING.md
5
+ #
6
+ # WARNING ABOUT GENERATED CODE
7
+
8
+ require 'aws-sdk-core'
9
+ require 'aws-sigv2'
10
+
11
+ require_relative 'aws-sdk-simpledb/types'
12
+ require_relative 'aws-sdk-simpledb/client_api'
13
+ require_relative 'aws-sdk-simpledb/client'
14
+ require_relative 'aws-sdk-simpledb/errors'
15
+ require_relative 'aws-sdk-simpledb/resource'
16
+ require_relative 'aws-sdk-simpledb/customizations'
17
+
18
+ # This module provides support for Amazon SimpleDB. This module is available in the
19
+ # `aws-sdk-simpledb` gem.
20
+ #
21
+ # # Client
22
+ #
23
+ # The {Client} class provides one method for each API operation. Operation
24
+ # methods each accept a hash of request parameters and return a response
25
+ # structure.
26
+ #
27
+ # See {Client} for more information.
28
+ #
29
+ # # Errors
30
+ #
31
+ # Errors returned from Amazon SimpleDB all
32
+ # extend {Errors::ServiceError}.
33
+ #
34
+ # begin
35
+ # # do stuff
36
+ # rescue Aws::SimpleDB::Errors::ServiceError
37
+ # # rescues all service API errors
38
+ # end
39
+ #
40
+ # See {Errors} for more information.
41
+ #
42
+ # @service
43
+ module Aws::SimpleDB
44
+
45
+ GEM_VERSION = '1.0.0.rc1'
46
+
47
+ end
@@ -0,0 +1,612 @@
1
+ # WARNING ABOUT GENERATED CODE
2
+ #
3
+ # This file is generated. See the contributing for info on making contributions:
4
+ # https://github.com/aws/aws-sdk-ruby/blob/master/CONTRIBUTING.md
5
+ #
6
+ # WARNING ABOUT GENERATED CODE
7
+
8
+ require 'seahorse/client/plugins/content_length.rb'
9
+ require 'aws-sdk-core/plugins/credentials_configuration.rb'
10
+ require 'aws-sdk-core/plugins/logging.rb'
11
+ require 'aws-sdk-core/plugins/param_converter.rb'
12
+ require 'aws-sdk-core/plugins/param_validator.rb'
13
+ require 'aws-sdk-core/plugins/user_agent.rb'
14
+ require 'aws-sdk-core/plugins/helpful_socket_errors.rb'
15
+ require 'aws-sdk-core/plugins/retry_errors.rb'
16
+ require 'aws-sdk-core/plugins/global_configuration.rb'
17
+ require 'aws-sdk-core/plugins/regional_endpoint.rb'
18
+ require 'aws-sdk-core/plugins/response_paging.rb'
19
+ require 'aws-sdk-core/plugins/stub_responses.rb'
20
+ require 'aws-sdk-core/plugins/idempotency_token.rb'
21
+ require 'aws-sdk-core/plugins/signature_v2.rb'
22
+ require 'aws-sdk-core/plugins/protocols/query.rb'
23
+
24
+ Aws::Plugins::GlobalConfiguration.add_identifier(:simpledb)
25
+
26
+ module Aws
27
+ module SimpleDB
28
+ class Client < Seahorse::Client::Base
29
+
30
+ include Aws::ClientStubs
31
+
32
+ @identifier = :simpledb
33
+
34
+ set_api(ClientApi::API)
35
+
36
+ add_plugin(Seahorse::Client::Plugins::ContentLength)
37
+ add_plugin(Aws::Plugins::CredentialsConfiguration)
38
+ add_plugin(Aws::Plugins::Logging)
39
+ add_plugin(Aws::Plugins::ParamConverter)
40
+ add_plugin(Aws::Plugins::ParamValidator)
41
+ add_plugin(Aws::Plugins::UserAgent)
42
+ add_plugin(Aws::Plugins::HelpfulSocketErrors)
43
+ add_plugin(Aws::Plugins::RetryErrors)
44
+ add_plugin(Aws::Plugins::GlobalConfiguration)
45
+ add_plugin(Aws::Plugins::RegionalEndpoint)
46
+ add_plugin(Aws::Plugins::ResponsePaging)
47
+ add_plugin(Aws::Plugins::StubResponses)
48
+ add_plugin(Aws::Plugins::IdempotencyToken)
49
+ add_plugin(Aws::Plugins::SignatureV2)
50
+ add_plugin(Aws::Plugins::Protocols::Query)
51
+
52
+ # @option options [required, Aws::CredentialProvider] :credentials
53
+ # Your AWS credentials. This can be an instance of any one of the
54
+ # following classes:
55
+ #
56
+ # * `Aws::Credentials` - Used for configuring static, non-refreshing
57
+ # credentials.
58
+ #
59
+ # * `Aws::InstanceProfileCredentials` - Used for loading credentials
60
+ # from an EC2 IMDS on an EC2 instance.
61
+ #
62
+ # * `Aws::SharedCredentials` - Used for loading credentials from a
63
+ # shared file, such as `~/.aws/config`.
64
+ #
65
+ # * `Aws::AssumeRoleCredentials` - Used when you need to assume a role.
66
+ #
67
+ # When `:credentials` are not configured directly, the following
68
+ # locations will be searched for credentials:
69
+ #
70
+ # * `Aws.config[:credentials]`
71
+ # * The `:access_key_id`, `:secret_access_key`, and `:session_token` options.
72
+ # * ENV['AWS_ACCESS_KEY_ID'], ENV['AWS_SECRET_ACCESS_KEY']
73
+ # * `~/.aws/credentials`
74
+ # * `~/.aws/config`
75
+ # * EC2 IMDS instance profile - When used by default, the timeouts are
76
+ # very aggressive. Construct and pass an instance of
77
+ # `Aws::InstanceProfileCredentails` to enable retries and extended
78
+ # timeouts.
79
+ # @option options [required, String] :region
80
+ # The AWS region to connect to. The configured `:region` is
81
+ # used to determine the service `:endpoint`. When not passed,
82
+ # a default `:region` is search for in the following locations:
83
+ #
84
+ # * `Aws.config[:region]`
85
+ # * `ENV['AWS_REGION']`
86
+ # * `ENV['AMAZON_REGION']`
87
+ # * `ENV['AWS_DEFAULT_REGION']`
88
+ # * `~/.aws/credentials`
89
+ # * `~/.aws/config`
90
+ # @option options [String] :access_key_id
91
+ # @option options [Boolean] :convert_params (true)
92
+ # When `true`, an attempt is made to coerce request parameters into
93
+ # the required types.
94
+ # @option options [String] :endpoint
95
+ # The client endpoint is normally constructed from the `:region`
96
+ # option. You should only configure an `:endpoint` when connecting
97
+ # to test endpoints. This should be avalid HTTP(S) URI.
98
+ # @option options [Aws::Log::Formatter] :log_formatter (Aws::Log::Formatter.default)
99
+ # The log formatter.
100
+ # @option options [Symbol] :log_level (:info)
101
+ # The log level to send messages to the `:logger` at.
102
+ # @option options [Logger] :logger
103
+ # The Logger instance to send log messages to. If this option
104
+ # is not set, logging will be disabled.
105
+ # @option options [String] :profile ("default")
106
+ # Used when loading credentials from the shared credentials file
107
+ # at HOME/.aws/credentials. When not specified, 'default' is used.
108
+ # @option options [Integer] :retry_limit (3)
109
+ # The maximum number of times to retry failed requests. Only
110
+ # ~ 500 level server errors and certain ~ 400 level client errors
111
+ # are retried. Generally, these are throttling errors, data
112
+ # checksum errors, networking errors, timeout errors and auth
113
+ # errors from expired credentials.
114
+ # @option options [String] :secret_access_key
115
+ # @option options [String] :session_token
116
+ # @option options [Boolean] :stub_responses (false)
117
+ # Causes the client to return stubbed responses. By default
118
+ # fake responses are generated and returned. You can specify
119
+ # the response data to return or errors to raise by calling
120
+ # {ClientStubs#stub_responses}. See {ClientStubs} for more information.
121
+ #
122
+ # ** Please note ** When response stubbing is enabled, no HTTP
123
+ # requests are made, and retries are disabled.
124
+ # @option options [Boolean] :validate_params (true)
125
+ # When `true`, request parameters are validated before
126
+ # sending the request.
127
+ def initialize(*args)
128
+ super
129
+ end
130
+
131
+ # @!group API Operations
132
+
133
+ # Performs multiple DeleteAttributes operations in a single call, which
134
+ # reduces round trips and latencies. This enables Amazon SimpleDB to
135
+ # optimize requests, which generally yields better throughput.
136
+ #
137
+ # The following limitations are enforced for this operation: * 1 MB
138
+ # request size
139
+ # * 25 item limit per BatchDeleteAttributes operation
140
+ # @option params [required, String] :domain_name
141
+ # The name of the domain in which the attributes are being deleted.
142
+ # @option params [required, Array<Types::DeletableItem>] :items
143
+ # A list of items on which to perform the operation.
144
+ # @return [Struct] Returns an empty {Seahorse::Client::Response response}.
145
+ #
146
+ # @example Request syntax with placeholder values
147
+ # resp = client.batch_delete_attributes({
148
+ # domain_name: "String", # required
149
+ # items: [ # required
150
+ # {
151
+ # name: "String", # required
152
+ # attributes: [
153
+ # {
154
+ # name: "String", # required
155
+ # alternate_name_encoding: "String",
156
+ # value: "String", # required
157
+ # alternate_value_encoding: "String",
158
+ # },
159
+ # ],
160
+ # },
161
+ # ],
162
+ # })
163
+ # @overload batch_delete_attributes(params = {})
164
+ # @param [Hash] params ({})
165
+ def batch_delete_attributes(params = {}, options = {})
166
+ req = build_request(:batch_delete_attributes, params)
167
+ req.send_request(options)
168
+ end
169
+
170
+ # The `BatchPutAttributes` operation creates or replaces attributes
171
+ # within one or more items. By using this operation, the client can
172
+ # perform multiple PutAttribute operation with a single call. This helps
173
+ # yield savings in round trips and latencies, enabling Amazon SimpleDB
174
+ # to optimize requests and generally produce better throughput.
175
+ #
176
+ # The client may specify the item name with the `Item.X.ItemName`
177
+ # parameter. The client may specify new attributes using a combination
178
+ # of the `Item.X.Attribute.Y.Name` and `Item.X.Attribute.Y.Value`
179
+ # parameters. The client may specify the first attribute for the first
180
+ # item using the parameters `Item.0.Attribute.0.Name` and
181
+ # `Item.0.Attribute.0.Value`, and for the second attribute for the first
182
+ # item by the parameters `Item.0.Attribute.1.Name` and
183
+ # `Item.0.Attribute.1.Value`, and so on.
184
+ #
185
+ # Attributes are uniquely identified within an item by their name/value
186
+ # combination. For example, a single item can have the attributes `\{
187
+ # "first_name", "first_value" \}` and `\{ "first_name", "second_value"
188
+ # \}`. However, it cannot have two attribute instances where both the
189
+ # `Item.X.Attribute.Y.Name` and `Item.X.Attribute.Y.Value` are the same.
190
+ #
191
+ # Optionally, the requester can supply the `Replace` parameter for each
192
+ # individual value. Setting this value to `true` will cause the new
193
+ # attribute values to replace the existing attribute values. For
194
+ # example, if an item `I` has the attributes `\{ 'a', '1' \}, \{ 'b',
195
+ # '2'\}` and `\{ 'b', '3' \}` and the requester does a
196
+ # BatchPutAttributes of `\{'I', 'b', '4' \}` with the Replace parameter
197
+ # set to true, the final attributes of the item will be `\{ 'a', '1' \}`
198
+ # and `\{ 'b', '4' \}`, replacing the previous values of the 'b'
199
+ # attribute with the new value.
200
+ #
201
+ # This operation is vulnerable to exceeding the maximum URL size when
202
+ # making a REST request using the HTTP GET method. This operation does
203
+ # not support conditions using `Expected.X.Name`, `Expected.X.Value`, or
204
+ # `Expected.X.Exists`.
205
+ #
206
+ # You can execute multiple `BatchPutAttributes` operations and other
207
+ # operations in parallel. However, large numbers of concurrent
208
+ # `BatchPutAttributes` calls can result in Service Unavailable (503)
209
+ # responses.
210
+ #
211
+ # The following limitations are enforced for this operation: * 256
212
+ # attribute name-value pairs per item
213
+ # * 1 MB request size
214
+ # * 1 billion attributes per domain
215
+ # * 10 GB of total user data storage per domain
216
+ # * 25 item limit per `BatchPutAttributes` operation
217
+ # @option params [required, String] :domain_name
218
+ # The name of the domain in which the attributes are being stored.
219
+ # @option params [required, Array<Types::ReplaceableItem>] :items
220
+ # A list of items on which to perform the operation.
221
+ # @return [Struct] Returns an empty {Seahorse::Client::Response response}.
222
+ #
223
+ # @example Request syntax with placeholder values
224
+ # resp = client.batch_put_attributes({
225
+ # domain_name: "String", # required
226
+ # items: [ # required
227
+ # {
228
+ # name: "String", # required
229
+ # attributes: [ # required
230
+ # {
231
+ # name: "String", # required
232
+ # value: "String", # required
233
+ # replace: false,
234
+ # },
235
+ # ],
236
+ # },
237
+ # ],
238
+ # })
239
+ # @overload batch_put_attributes(params = {})
240
+ # @param [Hash] params ({})
241
+ def batch_put_attributes(params = {}, options = {})
242
+ req = build_request(:batch_put_attributes, params)
243
+ req.send_request(options)
244
+ end
245
+
246
+ # The `CreateDomain` operation creates a new domain. The domain name
247
+ # should be unique among the domains associated with the Access Key ID
248
+ # provided in the request. The `CreateDomain` operation may take 10 or
249
+ # more seconds to complete.
250
+ #
251
+ # The client can create up to 100 domains per account.
252
+ #
253
+ # If the client requires additional domains, go to [
254
+ # http://aws.amazon.com/contact-us/simpledb-limit-request/][1].
255
+ #
256
+ #
257
+ #
258
+ # [1]: http://aws.amazon.com/contact-us/simpledb-limit-request/
259
+ # @option params [required, String] :domain_name
260
+ # The name of the domain to create. The name can range between 3 and 255
261
+ # characters and can contain the following characters: a-z, A-Z, 0-9,
262
+ # '\_', '-', and '.'.
263
+ # @return [Struct] Returns an empty {Seahorse::Client::Response response}.
264
+ #
265
+ # @example Request syntax with placeholder values
266
+ # resp = client.create_domain({
267
+ # domain_name: "String", # required
268
+ # })
269
+ # @overload create_domain(params = {})
270
+ # @param [Hash] params ({})
271
+ def create_domain(params = {}, options = {})
272
+ req = build_request(:create_domain, params)
273
+ req.send_request(options)
274
+ end
275
+
276
+ # Deletes one or more attributes associated with an item. If all
277
+ # attributes of the item are deleted, the item is deleted.
278
+ #
279
+ # `DeleteAttributes` is an idempotent operation; running it multiple
280
+ # times on the same item or attribute does not result in an error
281
+ # response.
282
+ #
283
+ # Because Amazon SimpleDB makes multiple copies of item data and uses an
284
+ # eventual consistency update model, performing a GetAttributes or
285
+ # Select operation (read) immediately after a `DeleteAttributes` or
286
+ # PutAttributes operation (write) might not return updated item data.
287
+ # @option params [required, String] :domain_name
288
+ # The name of the domain in which to perform the operation.
289
+ # @option params [required, String] :item_name
290
+ # The name of the item. Similar to rows on a spreadsheet, items
291
+ # represent individual objects that contain one or more value-attribute
292
+ # pairs.
293
+ # @option params [Array<Types::Attribute>] :attributes
294
+ # A list of Attributes. Similar to columns on a spreadsheet, attributes
295
+ # represent categories of data that can be assigned to items.
296
+ # @option params [Types::UpdateCondition] :expected
297
+ # The update condition which, if specified, determines whether the
298
+ # specified attributes will be deleted or not. The update condition must
299
+ # be satisfied in order for this request to be processed and the
300
+ # attributes to be deleted.
301
+ # @return [Struct] Returns an empty {Seahorse::Client::Response response}.
302
+ #
303
+ # @example Request syntax with placeholder values
304
+ # resp = client.delete_attributes({
305
+ # domain_name: "String", # required
306
+ # item_name: "String", # required
307
+ # attributes: [
308
+ # {
309
+ # name: "String", # required
310
+ # alternate_name_encoding: "String",
311
+ # value: "String", # required
312
+ # alternate_value_encoding: "String",
313
+ # },
314
+ # ],
315
+ # expected: {
316
+ # name: "String",
317
+ # value: "String",
318
+ # exists: false,
319
+ # },
320
+ # })
321
+ # @overload delete_attributes(params = {})
322
+ # @param [Hash] params ({})
323
+ def delete_attributes(params = {}, options = {})
324
+ req = build_request(:delete_attributes, params)
325
+ req.send_request(options)
326
+ end
327
+
328
+ # The `DeleteDomain` operation deletes a domain. Any items (and their
329
+ # attributes) in the domain are deleted as well. The `DeleteDomain`
330
+ # operation might take 10 or more seconds to complete.
331
+ # @option params [required, String] :domain_name
332
+ # The name of the domain to delete.
333
+ # @return [Struct] Returns an empty {Seahorse::Client::Response response}.
334
+ #
335
+ # @example Request syntax with placeholder values
336
+ # resp = client.delete_domain({
337
+ # domain_name: "String", # required
338
+ # })
339
+ # @overload delete_domain(params = {})
340
+ # @param [Hash] params ({})
341
+ def delete_domain(params = {}, options = {})
342
+ req = build_request(:delete_domain, params)
343
+ req.send_request(options)
344
+ end
345
+
346
+ # Returns information about the domain, including when the domain was
347
+ # created, the number of items and attributes in the domain, and the
348
+ # size of the attribute names and values.
349
+ # @option params [required, String] :domain_name
350
+ # The name of the domain for which to display the metadata of.
351
+ # @return [Types::DomainMetadataResult] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
352
+ #
353
+ # * {Types::DomainMetadataResult#item_count #ItemCount} => Integer
354
+ # * {Types::DomainMetadataResult#item_names_size_bytes #ItemNamesSizeBytes} => Integer
355
+ # * {Types::DomainMetadataResult#attribute_name_count #AttributeNameCount} => Integer
356
+ # * {Types::DomainMetadataResult#attribute_names_size_bytes #AttributeNamesSizeBytes} => Integer
357
+ # * {Types::DomainMetadataResult#attribute_value_count #AttributeValueCount} => Integer
358
+ # * {Types::DomainMetadataResult#attribute_values_size_bytes #AttributeValuesSizeBytes} => Integer
359
+ # * {Types::DomainMetadataResult#timestamp #Timestamp} => Integer
360
+ #
361
+ # @example Request syntax with placeholder values
362
+ # resp = client.domain_metadata({
363
+ # domain_name: "String", # required
364
+ # })
365
+ #
366
+ # @example Response structure
367
+ # resp.item_count #=> Integer
368
+ # resp.item_names_size_bytes #=> Integer
369
+ # resp.attribute_name_count #=> Integer
370
+ # resp.attribute_names_size_bytes #=> Integer
371
+ # resp.attribute_value_count #=> Integer
372
+ # resp.attribute_values_size_bytes #=> Integer
373
+ # resp.timestamp #=> Integer
374
+ # @overload domain_metadata(params = {})
375
+ # @param [Hash] params ({})
376
+ def domain_metadata(params = {}, options = {})
377
+ req = build_request(:domain_metadata, params)
378
+ req.send_request(options)
379
+ end
380
+
381
+ # Returns all of the attributes associated with the specified item.
382
+ # Optionally, the attributes returned can be limited to one or more
383
+ # attributes by specifying an attribute name parameter.
384
+ #
385
+ # If the item does not exist on the replica that was accessed for this
386
+ # operation, an empty set is returned. The system does not return an
387
+ # error as it cannot guarantee the item does not exist on other
388
+ # replicas.
389
+ # @option params [required, String] :domain_name
390
+ # The name of the domain in which to perform the operation.
391
+ # @option params [required, String] :item_name
392
+ # The name of the item.
393
+ # @option params [Array<String>] :attribute_names
394
+ # The names of the attributes.
395
+ # @option params [Boolean] :consistent_read
396
+ # Determines whether or not strong consistency should be enforced when data is read from SimpleDB. If `true`, any data previously written to SimpleDB will be returned. Otherwise, results will be consistent eventually, and the client may not see data that was written immediately before your read.
397
+ # @return [Types::GetAttributesResult] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
398
+ #
399
+ # * {Types::GetAttributesResult#attributes #Attributes} => Array&lt;Types::Attribute&gt;
400
+ #
401
+ # @example Request syntax with placeholder values
402
+ # resp = client.get_attributes({
403
+ # domain_name: "String", # required
404
+ # item_name: "String", # required
405
+ # attribute_names: ["String"],
406
+ # consistent_read: false,
407
+ # })
408
+ #
409
+ # @example Response structure
410
+ # resp.attributes #=> Array
411
+ # resp.attributes[0].name #=> String
412
+ # resp.attributes[0].alternate_name_encoding #=> String
413
+ # resp.attributes[0].value #=> String
414
+ # resp.attributes[0].alternate_value_encoding #=> String
415
+ # @overload get_attributes(params = {})
416
+ # @param [Hash] params ({})
417
+ def get_attributes(params = {}, options = {})
418
+ req = build_request(:get_attributes, params)
419
+ req.send_request(options)
420
+ end
421
+
422
+ # The `ListDomains` operation lists all domains associated with the
423
+ # Access Key ID. It returns domain names up to the limit set by
424
+ # [MaxNumberOfDomains](#MaxNumberOfDomains). A [NextToken](#NextToken)
425
+ # is returned if there are more than `MaxNumberOfDomains` domains.
426
+ # Calling `ListDomains` successive times with the `NextToken` provided
427
+ # by the operation returns up to `MaxNumberOfDomains` more domain names
428
+ # with each successive operation call.
429
+ # @option params [Integer] :max_number_of_domains
430
+ # The maximum number of domain names you want returned. The range is 1
431
+ # to 100. The default setting is 100.
432
+ # @option params [String] :next_token
433
+ # A string informing Amazon SimpleDB where to start the next list of
434
+ # domain names.
435
+ # @return [Types::ListDomainsResult] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
436
+ #
437
+ # * {Types::ListDomainsResult#domain_names #DomainNames} => Array&lt;String&gt;
438
+ # * {Types::ListDomainsResult#next_token #NextToken} => String
439
+ #
440
+ # @example Request syntax with placeholder values
441
+ # resp = client.list_domains({
442
+ # max_number_of_domains: 1,
443
+ # next_token: "String",
444
+ # })
445
+ #
446
+ # @example Response structure
447
+ # resp.domain_names #=> Array
448
+ # resp.domain_names[0] #=> String
449
+ # resp.next_token #=> String
450
+ # @overload list_domains(params = {})
451
+ # @param [Hash] params ({})
452
+ def list_domains(params = {}, options = {})
453
+ req = build_request(:list_domains, params)
454
+ req.send_request(options)
455
+ end
456
+
457
+ # The PutAttributes operation creates or replaces attributes in an item.
458
+ # The client may specify new attributes using a combination of the
459
+ # `Attribute.X.Name` and `Attribute.X.Value` parameters. The client
460
+ # specifies the first attribute by the parameters `Attribute.0.Name` and
461
+ # `Attribute.0.Value`, the second attribute by the parameters
462
+ # `Attribute.1.Name` and `Attribute.1.Value`, and so on.
463
+ #
464
+ # Attributes are uniquely identified in an item by their name/value
465
+ # combination. For example, a single item can have the attributes `\{
466
+ # "first_name", "first_value" \}` and `\{ "first_name", second_value"
467
+ # \}`. However, it cannot have two attribute instances where both the
468
+ # `Attribute.X.Name` and `Attribute.X.Value` are the same.
469
+ #
470
+ # Optionally, the requestor can supply the `Replace` parameter for each
471
+ # individual attribute. Setting this value to `true` causes the new
472
+ # attribute value to replace the existing attribute value(s). For
473
+ # example, if an item has the attributes `\{ 'a', '1' \}`, `\{ 'b',
474
+ # '2'\}` and `\{ 'b', '3' \}` and the requestor calls `PutAttributes`
475
+ # using the attributes `\{ 'b', '4' \}` with the `Replace` parameter set
476
+ # to true, the final attributes of the item are changed to `\{ 'a', '1'
477
+ # \}` and `\{ 'b', '4' \}`, which replaces the previous values of the
478
+ # 'b' attribute with the new value.
479
+ #
480
+ # You cannot specify an empty string as an attribute name.
481
+ #
482
+ # Because Amazon SimpleDB makes multiple copies of client data and uses
483
+ # an eventual consistency update model, an immediate GetAttributes or
484
+ # Select operation (read) immediately after a PutAttributes or
485
+ # DeleteAttributes operation (write) might not return the updated data.
486
+ #
487
+ # The following limitations are enforced for this operation: * 256 total
488
+ # attribute name-value pairs per item
489
+ # * One billion attributes per domain
490
+ # * 10 GB of total user data storage per domain
491
+ # @option params [required, String] :domain_name
492
+ # The name of the domain in which to perform the operation.
493
+ # @option params [required, String] :item_name
494
+ # The name of the item.
495
+ # @option params [required, Array<Types::ReplaceableAttribute>] :attributes
496
+ # The list of attributes.
497
+ # @option params [Types::UpdateCondition] :expected
498
+ # The update condition which, if specified, determines whether the
499
+ # specified attributes will be updated or not. The update condition must
500
+ # be satisfied in order for this request to be processed and the
501
+ # attributes to be updated.
502
+ # @return [Struct] Returns an empty {Seahorse::Client::Response response}.
503
+ #
504
+ # @example Request syntax with placeholder values
505
+ # resp = client.put_attributes({
506
+ # domain_name: "String", # required
507
+ # item_name: "String", # required
508
+ # attributes: [ # required
509
+ # {
510
+ # name: "String", # required
511
+ # value: "String", # required
512
+ # replace: false,
513
+ # },
514
+ # ],
515
+ # expected: {
516
+ # name: "String",
517
+ # value: "String",
518
+ # exists: false,
519
+ # },
520
+ # })
521
+ # @overload put_attributes(params = {})
522
+ # @param [Hash] params ({})
523
+ def put_attributes(params = {}, options = {})
524
+ req = build_request(:put_attributes, params)
525
+ req.send_request(options)
526
+ end
527
+
528
+ # The `Select` operation returns a set of attributes for `ItemNames`
529
+ # that match the select expression. `Select` is similar to the standard
530
+ # SQL SELECT statement.
531
+ #
532
+ # The total size of the response cannot exceed 1 MB in total size.
533
+ # Amazon SimpleDB automatically adjusts the number of items returned per
534
+ # page to enforce this limit. For example, if the client asks to
535
+ # retrieve 2500 items, but each individual item is 10 kB in size, the
536
+ # system returns 100 items and an appropriate `NextToken` so the client
537
+ # can access the next page of results.
538
+ #
539
+ # For information on how to construct select expressions, see Using
540
+ # Select to Create Amazon SimpleDB Queries in the Developer Guide.
541
+ # @option params [required, String] :select_expression
542
+ # The expression used to query the domain.
543
+ # @option params [String] :next_token
544
+ # A string informing Amazon SimpleDB where to start the next list of `ItemNames`.
545
+ # @option params [Boolean] :consistent_read
546
+ # Determines whether or not strong consistency should be enforced when data is read from SimpleDB. If `true`, any data previously written to SimpleDB will be returned. Otherwise, results will be consistent eventually, and the client may not see data that was written immediately before your read.
547
+ # @return [Types::SelectResult] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
548
+ #
549
+ # * {Types::SelectResult#items #Items} => Array&lt;Types::Item&gt;
550
+ # * {Types::SelectResult#next_token #NextToken} => String
551
+ #
552
+ # @example Request syntax with placeholder values
553
+ # resp = client.select({
554
+ # select_expression: "String", # required
555
+ # next_token: "String",
556
+ # consistent_read: false,
557
+ # })
558
+ #
559
+ # @example Response structure
560
+ # resp.items #=> Array
561
+ # resp.items[0].name #=> String
562
+ # resp.items[0].alternate_name_encoding #=> String
563
+ # resp.items[0].attributes #=> Array
564
+ # resp.items[0].attributes[0].name #=> String
565
+ # resp.items[0].attributes[0].alternate_name_encoding #=> String
566
+ # resp.items[0].attributes[0].value #=> String
567
+ # resp.items[0].attributes[0].alternate_value_encoding #=> String
568
+ # resp.next_token #=> String
569
+ # @overload select(params = {})
570
+ # @param [Hash] params ({})
571
+ def select(params = {}, options = {})
572
+ req = build_request(:select, params)
573
+ req.send_request(options)
574
+ end
575
+
576
+ # @!endgroup
577
+
578
+ # @param params ({})
579
+ # @api private
580
+ def build_request(operation_name, params = {})
581
+ handlers = @handlers.for(operation_name)
582
+ context = Seahorse::Client::RequestContext.new(
583
+ operation_name: operation_name,
584
+ operation: config.api.operation(operation_name),
585
+ client: self,
586
+ params: params,
587
+ config: config)
588
+ context[:gem_name] = 'aws-sdk-simpledb'
589
+ context[:gem_version] = '1.0.0.rc1'
590
+ Seahorse::Client::Request.new(handlers, context)
591
+ end
592
+
593
+ # @api private
594
+ # @deprecated
595
+ def waiter_names
596
+ []
597
+ end
598
+
599
+ class << self
600
+
601
+ # @api private
602
+ attr_reader :identifier
603
+
604
+ # @api private
605
+ def errors_module
606
+ Errors
607
+ end
608
+
609
+ end
610
+ end
611
+ end
612
+ end