aws-sdk 1.12.0 → 1.13.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +2 -2
- data/bin/aws-rb +18 -0
- data/lib/aws/api_config/{CloudFront-2012-07-01.yml → CloudFront-2013-05-12.yml} +73 -23
- data/lib/aws/api_config/{RDS-2013-02-12.yml → RDS-2013-05-15.yml} +92 -5
- data/lib/aws/api_config/Redshift-2012-12-01.yml +188 -12
- data/lib/aws/api_config/STS-2011-06-15.yml +10 -0
- data/lib/aws/auto_scaling/client.rb +6 -0
- data/lib/aws/cloud_formation/client.rb +6 -0
- data/lib/aws/cloud_front/client.rb +37 -1
- data/lib/aws/cloud_search/client.rb +6 -0
- data/lib/aws/cloud_watch/client.rb +6 -0
- data/lib/aws/core.rb +15 -20
- data/lib/aws/core/client.rb +36 -0
- data/lib/aws/core/credential_providers.rb +45 -0
- data/lib/aws/core/region_collection.rb +4 -1
- data/lib/aws/data_pipeline/client.rb +6 -0
- data/lib/aws/direct_connect/client.rb +6 -0
- data/lib/aws/dynamo_db/client.rb +35 -1249
- data/lib/aws/dynamo_db/client/v20111205.rb +1266 -0
- data/lib/aws/dynamo_db/client/v20120810.rb +1409 -0
- data/lib/aws/dynamo_db/client_base.rb +1 -0
- data/lib/aws/dynamo_db/client_v2.rb +25 -1396
- data/lib/aws/ec2/client.rb +6 -0
- data/lib/aws/elastic_beanstalk/client.rb +6 -0
- data/lib/aws/elastic_transcoder/client.rb +6 -0
- data/lib/aws/elasticache/client.rb +6 -0
- data/lib/aws/elb/client.rb +6 -0
- data/lib/aws/emr/client.rb +6 -0
- data/lib/aws/glacier/client.rb +14 -8
- data/lib/aws/iam/client.rb +6 -0
- data/lib/aws/import_export/client.rb +6 -0
- data/lib/aws/ops_works/client.rb +6 -0
- data/lib/aws/rds/client.rb +83 -18
- data/lib/aws/record/abstract_base.rb +19 -22
- data/lib/aws/record/attributes.rb +5 -1
- data/lib/aws/record/hash_model.rb +50 -6
- data/lib/aws/record/model.rb +26 -0
- data/lib/aws/record/validator.rb +1 -1
- data/lib/aws/redshift/client.rb +186 -53
- data/lib/aws/route_53/client.rb +6 -0
- data/lib/aws/route_53/hosted_zone.rb +1 -1
- data/lib/aws/route_53/resource_record_set.rb +3 -3
- data/lib/aws/s3/client.rb +4 -1
- data/lib/aws/s3/presigned_post.rb +18 -21
- data/lib/aws/simple_db/client.rb +6 -0
- data/lib/aws/simple_email_service/client.rb +6 -0
- data/lib/aws/simple_email_service/identity.rb +1 -1
- data/lib/aws/simple_workflow/client.rb +24 -18
- data/lib/aws/sns/client.rb +6 -0
- data/lib/aws/sqs/client.rb +21 -15
- data/lib/aws/storage_gateway/client.rb +6 -0
- data/lib/aws/sts/client.rb +57 -38
- data/lib/aws/support/client.rb +6 -0
- data/lib/aws/version.rb +1 -1
- metadata +6 -4
@@ -17,9 +17,15 @@ module AWS
|
|
17
17
|
# Client class for Amazon Cloud Search.
|
18
18
|
class Client < Core::QueryClient
|
19
19
|
|
20
|
+
API_VERSION = '2011-02-01'
|
21
|
+
|
20
22
|
# @api private
|
21
23
|
CACHEABLE_REQUESTS = Set[]
|
22
24
|
|
25
|
+
end
|
26
|
+
|
27
|
+
class Client::V20110201 < Client
|
28
|
+
|
23
29
|
# client methods #
|
24
30
|
|
25
31
|
# @!method create_domain(options = {})
|
@@ -17,6 +17,8 @@ module AWS
|
|
17
17
|
# Client class for Cloud Watch
|
18
18
|
class Client < Core::QueryClient
|
19
19
|
|
20
|
+
API_VERSION = '2010-08-01'
|
21
|
+
|
20
22
|
# @api private
|
21
23
|
CACHEABLE_REQUESTS = Set[
|
22
24
|
:describe_alarm_history,
|
@@ -25,6 +27,10 @@ module AWS
|
|
25
27
|
:list_metrics,
|
26
28
|
]
|
27
29
|
|
30
|
+
end
|
31
|
+
|
32
|
+
class Client::V20100801 < Client
|
33
|
+
|
28
34
|
# client methods #
|
29
35
|
|
30
36
|
# @!method delete_alarms(options = {})
|
data/lib/aws/core.rb
CHANGED
@@ -494,10 +494,9 @@ module AWS
|
|
494
494
|
Core::RegionCollection.new
|
495
495
|
end
|
496
496
|
|
497
|
-
# @note Memoization is currently only supported for
|
498
|
-
#
|
499
|
-
#
|
500
|
-
# you should not enable memoization while calling non-EC2 APIs.
|
497
|
+
# @note Memoization is currently only supported for APIs which
|
498
|
+
# inherit from the "Resource" class; other APIs are unaffected
|
499
|
+
# by the status of memoization.
|
501
500
|
#
|
502
501
|
# Resets memoizing service requests made in the current thread.
|
503
502
|
# See {memoize} for a full discussion of the memoization feature.
|
@@ -506,10 +505,9 @@ module AWS
|
|
506
505
|
Thread.current[:aws_memoization] = {}
|
507
506
|
end
|
508
507
|
|
509
|
-
# @note Memoization is currently only supported for
|
510
|
-
#
|
511
|
-
#
|
512
|
-
# you should not enable memoization while calling non-EC2 APIs.
|
508
|
+
# @note Memoization is currently only supported for APIs which
|
509
|
+
# inherit from the "Resource" class; other APIs are unaffected
|
510
|
+
# by the status of memoization.
|
513
511
|
#
|
514
512
|
# Starts memoizing service requests made in the current thread.
|
515
513
|
# See {memoize} for a full discussion of the memoization feature.
|
@@ -519,10 +517,9 @@ module AWS
|
|
519
517
|
nil
|
520
518
|
end
|
521
519
|
|
522
|
-
# @note Memoization is currently only supported for
|
523
|
-
#
|
524
|
-
#
|
525
|
-
# you should not enable memoization while calling non-EC2 APIs.
|
520
|
+
# @note Memoization is currently only supported for APIs which
|
521
|
+
# inherit from the "Resource" class; other APIs are unaffected
|
522
|
+
# by the status of memoization.
|
526
523
|
#
|
527
524
|
# Stops memoizing service requests made in the current thread.
|
528
525
|
# See {memoize} for a full discussion of the memoization feature.
|
@@ -531,10 +528,9 @@ module AWS
|
|
531
528
|
Thread.current[:aws_memoization] = nil
|
532
529
|
end
|
533
530
|
|
534
|
-
# @note Memoization is currently only supported for
|
535
|
-
#
|
536
|
-
#
|
537
|
-
# you should not enable memoization while calling non-EC2 APIs.
|
531
|
+
# @note Memoization is currently only supported for APIs which
|
532
|
+
# inherit from the "Resource" class; other APIs are unaffected
|
533
|
+
# by the status of memoization.
|
538
534
|
#
|
539
535
|
# @return [Boolean] True if memoization is enabled for the current
|
540
536
|
# thread. See {memoize} for a full discussion of the
|
@@ -543,10 +539,9 @@ module AWS
|
|
543
539
|
!Thread.current[:aws_memoization].nil?
|
544
540
|
end
|
545
541
|
|
546
|
-
# @note Memoization is currently only supported for
|
547
|
-
#
|
548
|
-
#
|
549
|
-
# you should not enable memoization while calling non-EC2 APIs.
|
542
|
+
# @note Memoization is currently only supported for APIs which
|
543
|
+
# inherit from the "Resource" class; other APIs are unaffected
|
544
|
+
# by the status of memoization.
|
550
545
|
#
|
551
546
|
# Enables memoization for the current thread, within a block.
|
552
547
|
# Memoization lets you avoid making multiple requests for the same
|
data/lib/aws/core/client.rb
CHANGED
@@ -179,8 +179,14 @@ module AWS
|
|
179
179
|
nil
|
180
180
|
end
|
181
181
|
|
182
|
+
# @api private
|
183
|
+
def inspect
|
184
|
+
"#<#{self.class.name}>"
|
185
|
+
end
|
186
|
+
|
182
187
|
protected
|
183
188
|
|
189
|
+
# @api private
|
184
190
|
def new_request
|
185
191
|
eval(self.class.name.sub(/::Client.*$/, ''))::Request.new
|
186
192
|
end
|
@@ -574,6 +580,7 @@ module AWS
|
|
574
580
|
|
575
581
|
# @return [Array<Symbol>] Returns a list of service operations as
|
576
582
|
# method names supported by this client.
|
583
|
+
# @api private
|
577
584
|
def operations
|
578
585
|
@operations ||= []
|
579
586
|
end
|
@@ -588,6 +595,35 @@ module AWS
|
|
588
595
|
@response_parsers ||= {}
|
589
596
|
end
|
590
597
|
|
598
|
+
# @api private
|
599
|
+
def new(*args, &block)
|
600
|
+
options = args.last.is_a?(Hash) ? args.last : {}
|
601
|
+
client = client_class(options).allocate
|
602
|
+
client.send(:initialize, *args, &block)
|
603
|
+
client
|
604
|
+
end
|
605
|
+
|
606
|
+
private
|
607
|
+
|
608
|
+
def client_class(options)
|
609
|
+
if name =~ /Client::V\d+$/
|
610
|
+
self
|
611
|
+
else
|
612
|
+
const_get("V#{client_api_version(options).gsub(/-/, '')}")
|
613
|
+
end
|
614
|
+
end
|
615
|
+
|
616
|
+
def client_api_version(options)
|
617
|
+
api_version = options[:api_version]
|
618
|
+
api_version ||= configured_version
|
619
|
+
api_version || const_get(:API_VERSION)
|
620
|
+
end
|
621
|
+
|
622
|
+
def configured_version
|
623
|
+
svc_opt = AWS::SERVICES[name.split('::')[1]].method_name
|
624
|
+
AWS.config.send(svc_opt)[:api_version]
|
625
|
+
end
|
626
|
+
|
591
627
|
protected
|
592
628
|
|
593
629
|
# Define this in sub-classes (e.g. QueryClient, RESTClient, etc)
|
@@ -196,11 +196,56 @@ module AWS
|
|
196
196
|
credentials[key] = value
|
197
197
|
end
|
198
198
|
end
|
199
|
+
|
200
|
+
# Merge in CredentialFileProvider credentials if
|
201
|
+
# a #{@prefix}_CREDENTIAL_FILE environment(ENV) variable is set
|
202
|
+
if ENV["#{@prefix}_CREDENTIAL_FILE"]
|
203
|
+
credentials.merge! CredentialFileProvider.new(ENV["#{@prefix}_CREDENTIAL_FILE"]).get_credentials
|
204
|
+
end
|
205
|
+
|
199
206
|
credentials
|
200
207
|
end
|
201
208
|
|
202
209
|
end
|
203
210
|
|
211
|
+
# This credential provider gets credentials from a credential file
|
212
|
+
# with the following format:
|
213
|
+
#
|
214
|
+
# AWSAccessKeyId=your_key
|
215
|
+
# AWSSecretKey=your_secret
|
216
|
+
#
|
217
|
+
class CredentialFileProvider
|
218
|
+
|
219
|
+
include Provider
|
220
|
+
|
221
|
+
# Map of AWS credential file key names to accepted provider key names
|
222
|
+
CREDENTIAL_FILE_KEY_MAP = { "AWSAccessKeyId" => :access_key_id, "AWSSecretKey" => :secret_access_key }
|
223
|
+
|
224
|
+
attr_reader :credential_file
|
225
|
+
|
226
|
+
# @param [Sring] credential_file The file path of a credential file
|
227
|
+
def initialize(credential_file)
|
228
|
+
@credential_file = credential_file
|
229
|
+
end
|
230
|
+
|
231
|
+
# (see Provider#get_credentials)
|
232
|
+
def get_credentials
|
233
|
+
credentials = {}
|
234
|
+
if File.exist?(credential_file) && File.readable?(credential_file)
|
235
|
+
File.open(credential_file, 'r') do |fh|
|
236
|
+
fh.each_line do |line|
|
237
|
+
key, val = line.strip.split(%r(\s*=\s*))
|
238
|
+
if key && val && CREDENTIAL_FILE_KEY_MAP[key] && KEYS.include?(CREDENTIAL_FILE_KEY_MAP[key])
|
239
|
+
credentials[CREDENTIAL_FILE_KEY_MAP[key]] = val
|
240
|
+
end
|
241
|
+
end
|
242
|
+
fh.close
|
243
|
+
end
|
244
|
+
end
|
245
|
+
credentials
|
246
|
+
end
|
247
|
+
end
|
248
|
+
|
204
249
|
# This credential provider tries to get credentials from the EC2
|
205
250
|
# metadata service.
|
206
251
|
class EC2Provider
|
@@ -96,7 +96,10 @@ module AWS
|
|
96
96
|
#return JSON.parse(File.read(File.join(AWS::ROOT, 'endpoints.json')))
|
97
97
|
host = 'aws-sdk-configurations.amazonwebservices.com'
|
98
98
|
path = '/endpoints.json'
|
99
|
-
|
99
|
+
http = Net::HTTP
|
100
|
+
proxy = AWS.config.proxy_uri
|
101
|
+
http = Net::HTTP::Proxy(proxy.host, proxy.port) unless proxy.nil?
|
102
|
+
JSON.parse(http.get(host, path))
|
100
103
|
end
|
101
104
|
|
102
105
|
end
|
@@ -17,9 +17,15 @@ module AWS
|
|
17
17
|
# Client class for AWS Data Pipeline.
|
18
18
|
class Client < Core::JSONClient
|
19
19
|
|
20
|
+
API_VERSION = '2012-10-29'
|
21
|
+
|
20
22
|
# @api private
|
21
23
|
CACHEABLE_REQUESTS = Set[]
|
22
24
|
|
25
|
+
end
|
26
|
+
|
27
|
+
class Client::V20121029 < Client
|
28
|
+
|
23
29
|
# client methods #
|
24
30
|
|
25
31
|
# @!method activate_pipeline(options = {})
|
@@ -17,9 +17,15 @@ module AWS
|
|
17
17
|
# Client class for AWS Direct Connect.
|
18
18
|
class Client < Core::JSONClient
|
19
19
|
|
20
|
+
API_VERSION = '2012-10-25'
|
21
|
+
|
20
22
|
# @api private
|
21
23
|
CACHEABLE_REQUESTS = Set[]
|
22
24
|
|
25
|
+
end
|
26
|
+
|
27
|
+
class Client::V20121025 < Client
|
28
|
+
|
23
29
|
# client methods #
|
24
30
|
|
25
31
|
# @!method create_connection(options = {})
|
data/lib/aws/dynamo_db/client.rb
CHANGED
@@ -14,1258 +14,44 @@
|
|
14
14
|
module AWS
|
15
15
|
class DynamoDB
|
16
16
|
|
17
|
-
#
|
17
|
+
# Builds a client for Amazon DynamoDB.
|
18
|
+
#
|
19
|
+
# ddb = AWS::DynamoDB::Client.new
|
20
|
+
#
|
21
|
+
# ## API Versions
|
22
|
+
#
|
23
|
+
# Amazon DynamoDB has multiple API versions. It is important to know
|
24
|
+
# which API you are using. Each API version accepts different parameters
|
25
|
+
# and returns data in a different format.
|
26
|
+
#
|
27
|
+
# By default, the oldest API version is used. This ensures customers
|
28
|
+
# who started using DynamoDB early would not get broken by API updates.
|
29
|
+
# You can construct a client of a specific version by passing the
|
30
|
+
# `:api_version` option to the {#initialize constructor}.
|
31
|
+
#
|
32
|
+
# # defaults to the 2011-12-05 API version
|
33
|
+
# ddb = AWS::DynamoDB::Client.new
|
34
|
+
#
|
35
|
+
# # specify the API version
|
36
|
+
# ddb = AWS::DynamoDB::Client.new(:api_version => '2011-12-05')
|
37
|
+
# ddb = AWS::DynamoDB::Client.new(:api_version => '2012-08-10')
|
38
|
+
#
|
39
|
+
# You can specify a global default API version using AWS.config:
|
40
|
+
#
|
41
|
+
# AWS.config(:dynamo_db => { :api_version => '2012-08-10' })
|
42
|
+
#
|
43
|
+
# AWS::DynamoDB::Client.new
|
44
|
+
# #=> AWS::DynamoDB::Client::V20120810
|
45
|
+
#
|
46
|
+
# @see V20111205
|
47
|
+
# @see V20120810
|
48
|
+
#
|
18
49
|
class Client < ClientBase
|
19
50
|
|
20
|
-
|
51
|
+
autoload :V20111205, 'aws/dynamo_db/client/v20111205'
|
52
|
+
autoload :V20120810, 'aws/dynamo_db/client/v20120810'
|
21
53
|
|
22
|
-
|
23
|
-
# Calls the BatchGetItem API operation.
|
24
|
-
# @param [Hash] options
|
25
|
-
#
|
26
|
-
# * `:request_items` - *required* - (Hash<String,Hash>) A map of one or
|
27
|
-
# more table names and, for each table, the corresponding primary
|
28
|
-
# keys for the items to retrieve. Each table name can be invoked only
|
29
|
-
# once. Each element in the map consists of the following: Keys - An
|
30
|
-
# array of primary key attribute values that define specific items in
|
31
|
-
# the table. AttributesToGet - One or more attributes to be retrieved
|
32
|
-
# from the table or index. By default, all attributes are returned.
|
33
|
-
# If a specified attribute is not found, it does not appear in the
|
34
|
-
# result. ConsistentRead - If `true` , a strongly consistent read is
|
35
|
-
# used; if `false` (the default), an eventually consistent read is
|
36
|
-
# used.
|
37
|
-
# * `:keys` - *required* - (Array<Hash>) Represents the primary key
|
38
|
-
# attribute values that define the items and the attributes
|
39
|
-
# associated with the items.
|
40
|
-
# * `:hash_key_element` - *required* - (Hash) A hash key element is
|
41
|
-
# treated as the primary key, and can be a string or a number.
|
42
|
-
# Single attribute primary keys have one index value. The value
|
43
|
-
# can be String, Number, StringSet, NumberSet.
|
44
|
-
# * `:s` - (String) Represents a String data type
|
45
|
-
# * `:n` - (String) Represents a Number data type
|
46
|
-
# * `:b` - (String) Represents a Binary data type
|
47
|
-
# * `:ss` - (Array<String>) Represents a String set data type
|
48
|
-
# * `:ns` - (Array<String>) Represents a Number set data type
|
49
|
-
# * `:bs` - (Array<String>) Represents a Binary set data type
|
50
|
-
# * `:range_key_element` - (Hash) A range key element is treated as
|
51
|
-
# a secondary key (used in conjunction with the primary key), and
|
52
|
-
# can be a string or a number, and is only used for
|
53
|
-
# hash-and-range primary keys. The value can be String, Number,
|
54
|
-
# StringSet, NumberSet.
|
55
|
-
# * `:s` - (String) Represents a String data type
|
56
|
-
# * `:n` - (String) Represents a Number data type
|
57
|
-
# * `:b` - (String) Represents a Binary data type
|
58
|
-
# * `:ss` - (Array<String>) Represents a String set data type
|
59
|
-
# * `:ns` - (Array<String>) Represents a Number set data type
|
60
|
-
# * `:bs` - (Array<String>) Represents a Binary set data type
|
61
|
-
# * `:attributes_to_get` - (Array<String>) Represents one or more
|
62
|
-
# attributes to retrieve from the table or index. If no attribute
|
63
|
-
# names are specified then all attributes will be returned. If any
|
64
|
-
# of the specified attributes are not found, they will not appear
|
65
|
-
# in the result.
|
66
|
-
# * `:consistent_read` - (Boolean) Represents the consistency of a
|
67
|
-
# read operation. If set to `true` , then a strongly consistent
|
68
|
-
# read is used; otherwise, an eventually consistent read is used.
|
69
|
-
# @return [Core::Response]
|
70
|
-
# The #data method of the response object returns
|
71
|
-
# a hash with the following structure:
|
72
|
-
#
|
73
|
-
# * `Responses` - (Hash<String,Hash>)
|
74
|
-
# * `member` - (Hash<String,Hash>)
|
75
|
-
# * `S` - (String)
|
76
|
-
# * `N` - (String)
|
77
|
-
# * `B` - (String)
|
78
|
-
# * `SS` - (Array<String>)
|
79
|
-
# * `NS` - (Array<String>)
|
80
|
-
# * `BS` - (Array<Blob>)
|
81
|
-
# * `ConsumedCapacityUnits` - (Numeric)
|
82
|
-
# * `UnprocessedKeys` - (Hash<String,Hash>)
|
83
|
-
# * `Keys` - (Array<Hash>)
|
84
|
-
# * `HashKeyElement` - (Hash)
|
85
|
-
# * `S` - (String)
|
86
|
-
# * `N` - (String)
|
87
|
-
# * `B` - (String)
|
88
|
-
# * `SS` - (Array<String>)
|
89
|
-
# * `NS` - (Array<String>)
|
90
|
-
# * `BS` - (Array<Blob>)
|
91
|
-
# * `RangeKeyElement` - (Hash)
|
92
|
-
# * `S` - (String)
|
93
|
-
# * `N` - (String)
|
94
|
-
# * `B` - (String)
|
95
|
-
# * `SS` - (Array<String>)
|
96
|
-
# * `NS` - (Array<String>)
|
97
|
-
# * `BS` - (Array<Blob>)
|
98
|
-
# * `AttributesToGet` - (Array<String>)
|
99
|
-
# * `ConsistentRead` - (Boolean)
|
100
|
-
|
101
|
-
# @!method batch_write_item(options = {})
|
102
|
-
# Calls the BatchWriteItem API operation.
|
103
|
-
# @param [Hash] options
|
104
|
-
#
|
105
|
-
# * `:request_items` - *required* - (Hash<String,Array<Hash>>) A map of
|
106
|
-
# one or more table names and, for each table, a list of operations
|
107
|
-
# to be performed (DeleteRequest or PutRequest). Each element in the
|
108
|
-
# map consists of the following: DeleteRequest - Perform a DeleteItem
|
109
|
-
# operation on the specified item. The item to be deleted is
|
110
|
-
# identified by a Key subelement: Key - A map of primary key
|
111
|
-
# attribute values that uniquely identify the item. Each entry in
|
112
|
-
# this map consists of an attribute name and an attribute value.
|
113
|
-
# PutRequest - Perform a PutItem operation on the specified item. The
|
114
|
-
# item to be put is identified by an Item subelement: Item - A map of
|
115
|
-
# attributes and their values. Each entry in this map consists of an
|
116
|
-
# attribute name and an attribute value. Attribute values must not be
|
117
|
-
# null; string and binary type attributes must have lengths greater
|
118
|
-
# than zero; and set type attributes must not be empty. Requests that
|
119
|
-
# contain empty values will be rejected with a ValidationException.
|
120
|
-
# If you specify any attributes that are part of an index key, then
|
121
|
-
# the data types for those attributes must match those of the schema
|
122
|
-
# in the table's attribute definition.
|
123
|
-
# * `:put_request` - (Hash) Represents a request to perform a
|
124
|
-
# DeleteItem operation.
|
125
|
-
# * `:item` - *required* - (Hash<String,Hash>) A map of attribute
|
126
|
-
# name to attribute values, representing the primary key of an
|
127
|
-
# item to be processed by PutItem. All of the table's primary key
|
128
|
-
# attributes must be specified, and their data types must match
|
129
|
-
# those of the table's key schema. If any attributes are present
|
130
|
-
# in the item which are part of an index key schema for the
|
131
|
-
# table, their types must match the index key schema.
|
132
|
-
# * `:s` - (String) Represents a String data type
|
133
|
-
# * `:n` - (String) Represents a Number data type
|
134
|
-
# * `:b` - (String) Represents a Binary data type
|
135
|
-
# * `:ss` - (Array<String>) Represents a String set data type
|
136
|
-
# * `:ns` - (Array<String>) Represents a Number set data type
|
137
|
-
# * `:bs` - (Array<String>) Represents a Binary set data type
|
138
|
-
# * `:delete_request` - (Hash) Represents a request to perform a
|
139
|
-
# PutItem operation.
|
140
|
-
# * `:key` - *required* - (Hash) A map of attribute name to
|
141
|
-
# attribute values, representing the primary key of the item to
|
142
|
-
# delete. All of the table's primary key attributes must be
|
143
|
-
# specified, and their data types must match those of the table's
|
144
|
-
# key schema.
|
145
|
-
# * `:hash_key_element` - *required* - (Hash) A hash key element
|
146
|
-
# is treated as the primary key, and can be a string or a
|
147
|
-
# number. Single attribute primary keys have one index value.
|
148
|
-
# The value can be String, Number, StringSet, NumberSet.
|
149
|
-
# * `:s` - (String) Represents a String data type
|
150
|
-
# * `:n` - (String) Represents a Number data type
|
151
|
-
# * `:b` - (String) Represents a Binary data type
|
152
|
-
# * `:ss` - (Array<String>) Represents a String set data type
|
153
|
-
# * `:ns` - (Array<String>) Represents a Number set data type
|
154
|
-
# * `:bs` - (Array<String>) Represents a Binary set data type
|
155
|
-
# * `:range_key_element` - (Hash) A range key element is treated
|
156
|
-
# as a secondary key (used in conjunction with the primary
|
157
|
-
# key), and can be a string or a number, and is only used for
|
158
|
-
# hash-and-range primary keys. The value can be String, Number,
|
159
|
-
# StringSet, NumberSet.
|
160
|
-
# * `:s` - (String) Represents a String data type
|
161
|
-
# * `:n` - (String) Represents a Number data type
|
162
|
-
# * `:b` - (String) Represents a Binary data type
|
163
|
-
# * `:ss` - (Array<String>) Represents a String set data type
|
164
|
-
# * `:ns` - (Array<String>) Represents a Number set data type
|
165
|
-
# * `:bs` - (Array<String>) Represents a Binary set data type
|
166
|
-
# @return [Core::Response]
|
167
|
-
# The #data method of the response object returns
|
168
|
-
# a hash with the following structure:
|
169
|
-
#
|
170
|
-
# * `Responses` - (Hash<String,Hash>)
|
171
|
-
# * `ConsumedCapacityUnits` - (Numeric)
|
172
|
-
# * `UnprocessedItems` - (Hash<String,Hash>)
|
173
|
-
# * `value` - (Array<Hash>)
|
174
|
-
# * `PutRequest` - (Hash)
|
175
|
-
# * `Item` - (Hash<String,Hash>)
|
176
|
-
# * `S` - (String)
|
177
|
-
# * `N` - (String)
|
178
|
-
# * `B` - (String)
|
179
|
-
# * `SS` - (Array<String>)
|
180
|
-
# * `NS` - (Array<String>)
|
181
|
-
# * `BS` - (Array<Blob>)
|
182
|
-
# * `DeleteRequest` - (Hash)
|
183
|
-
# * `Key` - (Hash)
|
184
|
-
# * `HashKeyElement` - (Hash)
|
185
|
-
# * `S` - (String)
|
186
|
-
# * `N` - (String)
|
187
|
-
# * `B` - (String)
|
188
|
-
# * `SS` - (Array<String>)
|
189
|
-
# * `NS` - (Array<String>)
|
190
|
-
# * `BS` - (Array<Blob>)
|
191
|
-
# * `RangeKeyElement` - (Hash)
|
192
|
-
# * `S` - (String)
|
193
|
-
# * `N` - (String)
|
194
|
-
# * `B` - (String)
|
195
|
-
# * `SS` - (Array<String>)
|
196
|
-
# * `NS` - (Array<String>)
|
197
|
-
# * `BS` - (Array<Blob>)
|
198
|
-
|
199
|
-
# @!method create_table(options = {})
|
200
|
-
# Calls the CreateTable API operation.
|
201
|
-
# @param [Hash] options
|
202
|
-
#
|
203
|
-
# * `:table_name` - *required* - (String) The name of the table to
|
204
|
-
# create.
|
205
|
-
# * `:key_schema` - *required* - (Hash) Specifies the attributes that
|
206
|
-
# make up the primary key for the table. The attributes in KeySchema
|
207
|
-
# must also be defined in the AttributeDefinitions array. For more
|
208
|
-
# information, see Data Model . Each KeySchemaElement in the array is
|
209
|
-
# composed of: AttributeName - The name of this key attribute.
|
210
|
-
# KeyType - Determines whether the key attribute is HASH or RANGE.
|
211
|
-
# For a primary key that consists of a hash attribute, you must
|
212
|
-
# specify exactly one element with a KeyType of HASH. For a primary
|
213
|
-
# key that consists of hash and range attributes, you must specify
|
214
|
-
# exactly two elements, in this order: The first element must have a
|
215
|
-
# KeyType of HASH, and the second element must have a KeyType of
|
216
|
-
# RANGE. For more information, see Specifying the Primary Key .
|
217
|
-
# * `:hash_key_element` - *required* - (Hash) A hash key element is
|
218
|
-
# treated as the primary key, and can be a string or a number.
|
219
|
-
# Single attribute primary keys have one index value. The value can
|
220
|
-
# be String, Number, StringSet, NumberSet.
|
221
|
-
# * `:attribute_name` - *required* - (String) Represents the name
|
222
|
-
# of a key attribute.
|
223
|
-
# * `:attribute_type` - *required* - (String) The AttributeType of
|
224
|
-
# the KeySchemaElement which can be a String or a Number. Valid
|
225
|
-
# values include:
|
226
|
-
# * `S`
|
227
|
-
# * `N`
|
228
|
-
# * `B`
|
229
|
-
# * `:range_key_element` - (Hash) A range key element is treated as a
|
230
|
-
# secondary key (used in conjunction with the primary key), and can
|
231
|
-
# be a string or a number, and is only used for hash-and-range
|
232
|
-
# primary keys. The value can be String, Number, StringSet,
|
233
|
-
# NumberSet.
|
234
|
-
# * `:attribute_name` - *required* - (String) Represents the name
|
235
|
-
# of a key attribute.
|
236
|
-
# * `:attribute_type` - *required* - (String) The AttributeType of
|
237
|
-
# the KeySchemaElement which can be a String or a Number. Valid
|
238
|
-
# values include:
|
239
|
-
# * `S`
|
240
|
-
# * `N`
|
241
|
-
# * `B`
|
242
|
-
# * `:provisioned_throughput` - *required* - (Hash)
|
243
|
-
# * `:read_capacity_units` - *required* - (Integer) The maximum
|
244
|
-
# number of strongly consistent reads consumed per second before
|
245
|
-
# returns a ThrottlingException. For more information, see
|
246
|
-
# Specifying Read and Write Requirements .
|
247
|
-
# * `:write_capacity_units` - *required* - (Integer) The maximum
|
248
|
-
# number of writes consumed per second before returns a
|
249
|
-
# ThrottlingException. For more information, see Specifying Read
|
250
|
-
# and Write Requirements .
|
251
|
-
# @return [Core::Response]
|
252
|
-
# The #data method of the response object returns
|
253
|
-
# a hash with the following structure:
|
254
|
-
#
|
255
|
-
# * `TableDescription` - (Hash)
|
256
|
-
# * `TableName` - (String)
|
257
|
-
# * `KeySchema` - (Hash)
|
258
|
-
# * `HashKeyElement` - (Hash)
|
259
|
-
# * `AttributeName` - (String)
|
260
|
-
# * `AttributeType` - (String)
|
261
|
-
# * `RangeKeyElement` - (Hash)
|
262
|
-
# * `AttributeName` - (String)
|
263
|
-
# * `AttributeType` - (String)
|
264
|
-
# * `TableStatus` - (String)
|
265
|
-
# * `CreationDateTime` - (Time)
|
266
|
-
# * `ProvisionedThroughput` - (Hash)
|
267
|
-
# * `LastIncreaseDateTime` - (Time)
|
268
|
-
# * `LastDecreaseDateTime` - (Time)
|
269
|
-
# * `NumberOfDecreasesToday` - (Integer)
|
270
|
-
# * `ReadCapacityUnits` - (Integer)
|
271
|
-
# * `WriteCapacityUnits` - (Integer)
|
272
|
-
# * `TableSizeBytes` - (Integer)
|
273
|
-
# * `ItemCount` - (Integer)
|
274
|
-
|
275
|
-
# @!method delete_item(options = {})
|
276
|
-
# Calls the DeleteItem API operation.
|
277
|
-
# @param [Hash] options
|
278
|
-
#
|
279
|
-
# * `:table_name` - *required* - (String) The name of the table from
|
280
|
-
# which to delete the item.
|
281
|
-
# * `:key` - *required* - (Hash) A map of attribute names to
|
282
|
-
# AttributeValue objects, representing the primary key of the item to
|
283
|
-
# delete.
|
284
|
-
# * `:hash_key_element` - *required* - (Hash) A hash key element is
|
285
|
-
# treated as the primary key, and can be a string or a number.
|
286
|
-
# Single attribute primary keys have one index value. The value can
|
287
|
-
# be String, Number, StringSet, NumberSet.
|
288
|
-
# * `:s` - (String) Represents a String data type
|
289
|
-
# * `:n` - (String) Represents a Number data type
|
290
|
-
# * `:b` - (String) Represents a Binary data type
|
291
|
-
# * `:ss` - (Array<String>) Represents a String set data type
|
292
|
-
# * `:ns` - (Array<String>) Represents a Number set data type
|
293
|
-
# * `:bs` - (Array<String>) Represents a Binary set data type
|
294
|
-
# * `:range_key_element` - (Hash) A range key element is treated as a
|
295
|
-
# secondary key (used in conjunction with the primary key), and can
|
296
|
-
# be a string or a number, and is only used for hash-and-range
|
297
|
-
# primary keys. The value can be String, Number, StringSet,
|
298
|
-
# NumberSet.
|
299
|
-
# * `:s` - (String) Represents a String data type
|
300
|
-
# * `:n` - (String) Represents a Number data type
|
301
|
-
# * `:b` - (String) Represents a Binary data type
|
302
|
-
# * `:ss` - (Array<String>) Represents a String set data type
|
303
|
-
# * `:ns` - (Array<String>) Represents a Number set data type
|
304
|
-
# * `:bs` - (Array<String>) Represents a Binary set data type
|
305
|
-
# * `:expected` - (Hash<String,Hash>) A map of attribute/condition
|
306
|
-
# pairs. This is the conditional block for the DeleteItemoperation.
|
307
|
-
# All the conditions must be met for the operation to succeed.
|
308
|
-
# * `:value` - (Hash) Specify whether or not a value already exists
|
309
|
-
# and has a specific content for the attribute name-value pair.
|
310
|
-
# * `:s` - (String) Represents a String data type
|
311
|
-
# * `:n` - (String) Represents a Number data type
|
312
|
-
# * `:b` - (String) Represents a Binary data type
|
313
|
-
# * `:ss` - (Array<String>) Represents a String set data type
|
314
|
-
# * `:ns` - (Array<String>) Represents a Number set data type
|
315
|
-
# * `:bs` - (Array<String>) Represents a Binary set data type
|
316
|
-
# * `:exists` - (Boolean) Causes to evaluate the value before
|
317
|
-
# attempting a conditional operation: If Exists is `true` , will
|
318
|
-
# check to see if that attribute value already exists in the table.
|
319
|
-
# If it is found, then the operation succeeds. If it is not found,
|
320
|
-
# the operation fails with a ConditionalCheckFailedException. If
|
321
|
-
# Exists is `false` , assumes that the attribute value does not
|
322
|
-
# exist in the table. If in fact the value does not exist, then the
|
323
|
-
# assumption is valid and the operation succeeds. If the value is
|
324
|
-
# found, despite the assumption that it does not exist, the
|
325
|
-
# operation fails with a ConditionalCheckFailedException. The
|
326
|
-
# default setting for Exists is `true` . If you supply a Value all
|
327
|
-
# by itself, assumes the attribute exists: You don't have to set
|
328
|
-
# Exists to `true` , because it is implied. returns a
|
329
|
-
# ValidationException if: Exists is `true` but there is no Value to
|
330
|
-
# check. (You expect a value to exist, but don't specify what that
|
331
|
-
# value is.) Exists is `false` but you also specify a Value. (You
|
332
|
-
# cannot expect an attribute to have a value, while also expecting
|
333
|
-
# it not to exist.) If you specify more than one condition for
|
334
|
-
# Exists, then all of the conditions must evaluate to `true` . (In
|
335
|
-
# other words, the conditions are ANDed together.) Otherwise, the
|
336
|
-
# conditional operation will fail.
|
337
|
-
# * `:return_values` - (String) Use ReturnValues if you want to get the
|
338
|
-
# item attributes as they appeared before they were deleted. For
|
339
|
-
# DeleteItem, the valid values are: NONE - If ReturnValues is not
|
340
|
-
# specified, or if its value is NONE, then nothing is returned. (This
|
341
|
-
# is the default for ReturnValues.) ALL_OLD - The content of the old
|
342
|
-
# item is returned. Valid values include:
|
343
|
-
# * `NONE`
|
344
|
-
# * `ALL_OLD`
|
345
|
-
# * `UPDATED_OLD`
|
346
|
-
# * `ALL_NEW`
|
347
|
-
# * `UPDATED_NEW`
|
348
|
-
# @return [Core::Response]
|
349
|
-
# The #data method of the response object returns
|
350
|
-
# a hash with the following structure:
|
351
|
-
#
|
352
|
-
# * `Attributes` - (Hash<String,Hash>)
|
353
|
-
# * `S` - (String)
|
354
|
-
# * `N` - (String)
|
355
|
-
# * `B` - (String)
|
356
|
-
# * `SS` - (Array<String>)
|
357
|
-
# * `NS` - (Array<String>)
|
358
|
-
# * `BS` - (Array<Blob>)
|
359
|
-
# * `ConsumedCapacityUnits` - (Numeric)
|
360
|
-
|
361
|
-
# @!method delete_table(options = {})
|
362
|
-
# Calls the DeleteTable API operation.
|
363
|
-
# @param [Hash] options
|
364
|
-
#
|
365
|
-
# * `:table_name` - *required* - (String) The name of the table to
|
366
|
-
# delete.
|
367
|
-
# @return [Core::Response]
|
368
|
-
# The #data method of the response object returns
|
369
|
-
# a hash with the following structure:
|
370
|
-
#
|
371
|
-
# * `TableDescription` - (Hash)
|
372
|
-
# * `TableName` - (String)
|
373
|
-
# * `KeySchema` - (Hash)
|
374
|
-
# * `HashKeyElement` - (Hash)
|
375
|
-
# * `AttributeName` - (String)
|
376
|
-
# * `AttributeType` - (String)
|
377
|
-
# * `RangeKeyElement` - (Hash)
|
378
|
-
# * `AttributeName` - (String)
|
379
|
-
# * `AttributeType` - (String)
|
380
|
-
# * `TableStatus` - (String)
|
381
|
-
# * `CreationDateTime` - (Time)
|
382
|
-
# * `ProvisionedThroughput` - (Hash)
|
383
|
-
# * `LastIncreaseDateTime` - (Time)
|
384
|
-
# * `LastDecreaseDateTime` - (Time)
|
385
|
-
# * `NumberOfDecreasesToday` - (Integer)
|
386
|
-
# * `ReadCapacityUnits` - (Integer)
|
387
|
-
# * `WriteCapacityUnits` - (Integer)
|
388
|
-
# * `TableSizeBytes` - (Integer)
|
389
|
-
# * `ItemCount` - (Integer)
|
390
|
-
|
391
|
-
# @!method describe_table(options = {})
|
392
|
-
# Calls the DescribeTable API operation.
|
393
|
-
# @param [Hash] options
|
394
|
-
#
|
395
|
-
# * `:table_name` - *required* - (String) The name of the table to
|
396
|
-
# describe.
|
397
|
-
# @return [Core::Response]
|
398
|
-
# The #data method of the response object returns
|
399
|
-
# a hash with the following structure:
|
400
|
-
#
|
401
|
-
# * `Table` - (Hash)
|
402
|
-
# * `TableName` - (String)
|
403
|
-
# * `KeySchema` - (Hash)
|
404
|
-
# * `HashKeyElement` - (Hash)
|
405
|
-
# * `AttributeName` - (String)
|
406
|
-
# * `AttributeType` - (String)
|
407
|
-
# * `RangeKeyElement` - (Hash)
|
408
|
-
# * `AttributeName` - (String)
|
409
|
-
# * `AttributeType` - (String)
|
410
|
-
# * `TableStatus` - (String)
|
411
|
-
# * `CreationDateTime` - (Time)
|
412
|
-
# * `ProvisionedThroughput` - (Hash)
|
413
|
-
# * `LastIncreaseDateTime` - (Time)
|
414
|
-
# * `LastDecreaseDateTime` - (Time)
|
415
|
-
# * `NumberOfDecreasesToday` - (Integer)
|
416
|
-
# * `ReadCapacityUnits` - (Integer)
|
417
|
-
# * `WriteCapacityUnits` - (Integer)
|
418
|
-
# * `TableSizeBytes` - (Integer)
|
419
|
-
# * `ItemCount` - (Integer)
|
420
|
-
|
421
|
-
# @!method get_item(options = {})
|
422
|
-
# Calls the GetItem API operation.
|
423
|
-
# @param [Hash] options
|
424
|
-
#
|
425
|
-
# * `:table_name` - *required* - (String) The name of the table
|
426
|
-
# containing the requested item.
|
427
|
-
# * `:key` - *required* - (Hash) A map of attribute names to
|
428
|
-
# AttributeValue objects, representing the primary key of the item to
|
429
|
-
# retrieve.
|
430
|
-
# * `:hash_key_element` - *required* - (Hash) A hash key element is
|
431
|
-
# treated as the primary key, and can be a string or a number.
|
432
|
-
# Single attribute primary keys have one index value. The value can
|
433
|
-
# be String, Number, StringSet, NumberSet.
|
434
|
-
# * `:s` - (String) Represents a String data type
|
435
|
-
# * `:n` - (String) Represents a Number data type
|
436
|
-
# * `:b` - (String) Represents a Binary data type
|
437
|
-
# * `:ss` - (Array<String>) Represents a String set data type
|
438
|
-
# * `:ns` - (Array<String>) Represents a Number set data type
|
439
|
-
# * `:bs` - (Array<String>) Represents a Binary set data type
|
440
|
-
# * `:range_key_element` - (Hash) A range key element is treated as a
|
441
|
-
# secondary key (used in conjunction with the primary key), and can
|
442
|
-
# be a string or a number, and is only used for hash-and-range
|
443
|
-
# primary keys. The value can be String, Number, StringSet,
|
444
|
-
# NumberSet.
|
445
|
-
# * `:s` - (String) Represents a String data type
|
446
|
-
# * `:n` - (String) Represents a Number data type
|
447
|
-
# * `:b` - (String) Represents a Binary data type
|
448
|
-
# * `:ss` - (Array<String>) Represents a String set data type
|
449
|
-
# * `:ns` - (Array<String>) Represents a Number set data type
|
450
|
-
# * `:bs` - (Array<String>) Represents a Binary set data type
|
451
|
-
# * `:attributes_to_get` - (Array<String>)
|
452
|
-
# * `:consistent_read` - (Boolean)
|
453
|
-
# @return [Core::Response]
|
454
|
-
# The #data method of the response object returns
|
455
|
-
# a hash with the following structure:
|
456
|
-
#
|
457
|
-
# * `Item` - (Hash<String,Hash>)
|
458
|
-
# * `S` - (String)
|
459
|
-
# * `N` - (String)
|
460
|
-
# * `B` - (String)
|
461
|
-
# * `SS` - (Array<String>)
|
462
|
-
# * `NS` - (Array<String>)
|
463
|
-
# * `BS` - (Array<Blob>)
|
464
|
-
# * `ConsumedCapacityUnits` - (Numeric)
|
465
|
-
|
466
|
-
# @!method list_tables(options = {})
|
467
|
-
# Calls the ListTables API operation.
|
468
|
-
# @param [Hash] options
|
469
|
-
#
|
470
|
-
# * `:exclusive_start_table_name` - (String) The name of the table that
|
471
|
-
# starts the list. If you already ran a ListTables operation and
|
472
|
-
# received a LastEvaluatedTableName value in the response, use that
|
473
|
-
# value here to continue the list.
|
474
|
-
# * `:limit` - (Integer) A maximum number of table names to return.
|
475
|
-
# @return [Core::Response]
|
476
|
-
# The #data method of the response object returns
|
477
|
-
# a hash with the following structure:
|
478
|
-
#
|
479
|
-
# * `TableNames` - (Array<String>)
|
480
|
-
# * `LastEvaluatedTableName` - (String)
|
481
|
-
|
482
|
-
# @!method put_item(options = {})
|
483
|
-
# Calls the PutItem API operation.
|
484
|
-
# @param [Hash] options
|
485
|
-
#
|
486
|
-
# * `:table_name` - *required* - (String) The name of the table to
|
487
|
-
# contain the item.
|
488
|
-
# * `:item` - *required* - (Hash<String,Hash>) A map of attribute
|
489
|
-
# name/value pairs, one for each attribute. Only the primary key
|
490
|
-
# attributes are required; you can optionally provide other attribute
|
491
|
-
# name-value pairs for the item. If you specify any attributes that
|
492
|
-
# are part of an index key, then the data types for those attributes
|
493
|
-
# must match those of the schema in the table's attribute definition.
|
494
|
-
# For more information about primary keys, see Primary Key . Each
|
495
|
-
# element in the Item map is an AttributeValue object.
|
496
|
-
# * `:s` - (String) Represents a String data type
|
497
|
-
# * `:n` - (String) Represents a Number data type
|
498
|
-
# * `:b` - (String) Represents a Binary data type
|
499
|
-
# * `:ss` - (Array<String>) Represents a String set data type
|
500
|
-
# * `:ns` - (Array<String>) Represents a Number set data type
|
501
|
-
# * `:bs` - (Array<String>) Represents a Binary set data type
|
502
|
-
# * `:expected` - (Hash<String,Hash>) A map of attribute/condition
|
503
|
-
# pairs. This is the conditional block for the PutItem operation. All
|
504
|
-
# the conditions must be met for the operation to succeed.
|
505
|
-
# * `:value` - (Hash) Specify whether or not a value already exists
|
506
|
-
# and has a specific content for the attribute name-value pair.
|
507
|
-
# * `:s` - (String) Represents a String data type
|
508
|
-
# * `:n` - (String) Represents a Number data type
|
509
|
-
# * `:b` - (String) Represents a Binary data type
|
510
|
-
# * `:ss` - (Array<String>) Represents a String set data type
|
511
|
-
# * `:ns` - (Array<String>) Represents a Number set data type
|
512
|
-
# * `:bs` - (Array<String>) Represents a Binary set data type
|
513
|
-
# * `:exists` - (Boolean) Causes to evaluate the value before
|
514
|
-
# attempting a conditional operation: If Exists is `true` , will
|
515
|
-
# check to see if that attribute value already exists in the table.
|
516
|
-
# If it is found, then the operation succeeds. If it is not found,
|
517
|
-
# the operation fails with a ConditionalCheckFailedException. If
|
518
|
-
# Exists is `false` , assumes that the attribute value does not
|
519
|
-
# exist in the table. If in fact the value does not exist, then the
|
520
|
-
# assumption is valid and the operation succeeds. If the value is
|
521
|
-
# found, despite the assumption that it does not exist, the
|
522
|
-
# operation fails with a ConditionalCheckFailedException. The
|
523
|
-
# default setting for Exists is `true` . If you supply a Value all
|
524
|
-
# by itself, assumes the attribute exists: You don't have to set
|
525
|
-
# Exists to `true` , because it is implied. returns a
|
526
|
-
# ValidationException if: Exists is `true` but there is no Value to
|
527
|
-
# check. (You expect a value to exist, but don't specify what that
|
528
|
-
# value is.) Exists is `false` but you also specify a Value. (You
|
529
|
-
# cannot expect an attribute to have a value, while also expecting
|
530
|
-
# it not to exist.) If you specify more than one condition for
|
531
|
-
# Exists, then all of the conditions must evaluate to `true` . (In
|
532
|
-
# other words, the conditions are ANDed together.) Otherwise, the
|
533
|
-
# conditional operation will fail.
|
534
|
-
# * `:return_values` - (String) Use ReturnValues if you want to get the
|
535
|
-
# item attributes as they appeared before they were updated with the
|
536
|
-
# PutItem request. For PutItem, the valid values are: NONE - If
|
537
|
-
# ReturnValues is not specified, or if its value is NONE, then
|
538
|
-
# nothing is returned. (This is the default for ReturnValues.)
|
539
|
-
# ALL_OLD - If PutItem overwrote an attribute name-value pair, then
|
540
|
-
# the content of the old item is returned. Valid values include:
|
541
|
-
# * `NONE`
|
542
|
-
# * `ALL_OLD`
|
543
|
-
# * `UPDATED_OLD`
|
544
|
-
# * `ALL_NEW`
|
545
|
-
# * `UPDATED_NEW`
|
546
|
-
# @return [Core::Response]
|
547
|
-
# The #data method of the response object returns
|
548
|
-
# a hash with the following structure:
|
549
|
-
#
|
550
|
-
# * `Attributes` - (Hash<String,Hash>)
|
551
|
-
# * `S` - (String)
|
552
|
-
# * `N` - (String)
|
553
|
-
# * `B` - (String)
|
554
|
-
# * `SS` - (Array<String>)
|
555
|
-
# * `NS` - (Array<String>)
|
556
|
-
# * `BS` - (Array<Blob>)
|
557
|
-
# * `ConsumedCapacityUnits` - (Numeric)
|
558
|
-
|
559
|
-
# @!method query(options = {})
|
560
|
-
# Calls the Query API operation.
|
561
|
-
# @param [Hash] options
|
562
|
-
#
|
563
|
-
# * `:table_name` - *required* - (String) The name of the table
|
564
|
-
# containing the requested items.
|
565
|
-
# * `:attributes_to_get` - (Array<String>) You cannot use both
|
566
|
-
# AttributesToGet and Select together in a Query request, unless the
|
567
|
-
# value for Select is SPECIFIC_ATTRIBUTES. (This usage is equivalent
|
568
|
-
# to specifying AttributesToGet without any value for Select.)
|
569
|
-
# * `:limit` - (Integer)
|
570
|
-
# * `:consistent_read` - (Boolean)
|
571
|
-
# * `:count` - (Boolean) If set to `true` , Amazon DynamoDB returns a
|
572
|
-
# total number of items that match the query parameters, instead of a
|
573
|
-
# list of the matching items and their attributes. Do not set Count
|
574
|
-
# to `true` while providing a list of AttributesToGet, otherwise
|
575
|
-
# Amazon DynamoDB returns a validation error.
|
576
|
-
# * `:hash_key_value` - *required* - (Hash) Attribute value of the hash
|
577
|
-
# component of the composite primary key.
|
578
|
-
# * `:s` - (String) Represents a String data type
|
579
|
-
# * `:n` - (String) Represents a Number data type
|
580
|
-
# * `:b` - (String) Represents a Binary data type
|
581
|
-
# * `:ss` - (Array<String>) Represents a String set data type
|
582
|
-
# * `:ns` - (Array<String>) Represents a Number set data type
|
583
|
-
# * `:bs` - (Array<String>) Represents a Binary set data type
|
584
|
-
# * `:range_key_condition` - (Hash) A container for the attribute
|
585
|
-
# values and comparison operators to use for the query.
|
586
|
-
# * `:attribute_value_list` - (Array<Hash>) Represents one or more
|
587
|
-
# values to evaluate against the supplied attribute. This list
|
588
|
-
# contains exactly one value, except for a BETWEEN or IN
|
589
|
-
# comparison, in which case the list contains two values. For type
|
590
|
-
# Number, value comparisons are numeric. String value comparisons
|
591
|
-
# for greater than, equals, or less than are based on ASCII
|
592
|
-
# character code values. For example, a is greater than A, and aa
|
593
|
-
# is greater than B. For a list of code values, see
|
594
|
-
# http://en.wikipedia.org/wiki/ASCII#ASCII_printable_characters.
|
595
|
-
# For Binary, treats each byte of the binary data as unsigned when
|
596
|
-
# it compares binary values, for example when evaluating query
|
597
|
-
# expressions.
|
598
|
-
# * `:s` - (String) Represents a String data type
|
599
|
-
# * `:n` - (String) Represents a Number data type
|
600
|
-
# * `:b` - (String) Represents a Binary data type
|
601
|
-
# * `:ss` - (Array<String>) Represents a String set data type
|
602
|
-
# * `:ns` - (Array<String>) Represents a Number set data type
|
603
|
-
# * `:bs` - (Array<String>) Represents a Binary set data type
|
604
|
-
# * `:comparison_operator` - *required* - (String) Represents a
|
605
|
-
# comparator for evaluating attributes. For example, equals,
|
606
|
-
# greater than, less than, etc. For information on specifying data
|
607
|
-
# types in JSON, see JSON Data Format . The following are
|
608
|
-
# descriptions of each comparison operator. EQ : Equal.
|
609
|
-
# AttributeValueList can contain only one AttributeValue of type
|
610
|
-
# String, Number, or Binary (not a set). If an item contains an
|
611
|
-
# AttributeValue of a different type than the one specified in the
|
612
|
-
# request, the value does not match. For example, {"S":"6"} does
|
613
|
-
# not equal {"N":"6"}. Also, {"N":"6"} does not equal {"NS":["6",
|
614
|
-
# "2", "1"]}. NE : Not equal. AttributeValueList can contain only
|
615
|
-
# one AttributeValue of type String, Number, or Binary (not a set).
|
616
|
-
# If an item contains an AttributeValue of a different type than
|
617
|
-
# the one specified in the request, the value does not match. For
|
618
|
-
# example, {"S":"6"} does not equal {"N":"6"}. Also, {"N":"6"} does
|
619
|
-
# not equal {"NS":["6", "2", "1"]}. LE : Less than or equal.
|
620
|
-
# AttributeValueList can contain only one AttributeValue of type
|
621
|
-
# String, Number, or Binary (not a set). If an item contains an
|
622
|
-
# AttributeValue of a different type than the one specified in the
|
623
|
-
# request, the value does not match. For example, {"S":"6"} does
|
624
|
-
# not equal {"N":"6"}. Also, {"N":"6"} does not compare to
|
625
|
-
# {"NS":["6", "2", "1"]}. LT : Less than. AttributeValueList can
|
626
|
-
# contain only one AttributeValue of type String, Number, or Binary
|
627
|
-
# (not a set). If an item contains an AttributeValue of a different
|
628
|
-
# type than the one specified in the request, the value does not
|
629
|
-
# match. For example, {"S":"6"} does not equal {"N":"6"}. Also,
|
630
|
-
# {"N":"6"} does not compare to {"NS":["6", "2", "1"]}. GE :
|
631
|
-
# Greater than or equal. AttributeValueList can contain only one
|
632
|
-
# AttributeValue of type String, Number, or Binary (not a set). If
|
633
|
-
# an item contains an AttributeValue of a different type than the
|
634
|
-
# one specified in the request, the value does not match. For
|
635
|
-
# example, {"S":"6"} does not equal {"N":"6"}. Also, {"N":"6"} does
|
636
|
-
# not compare to {"NS":["6", "2", "1"]}. GT : Greater than.
|
637
|
-
# AttributeValueList can contain only one AttributeValue of type
|
638
|
-
# String, Number, or Binary (not a set). If an item contains an
|
639
|
-
# AttributeValue of a different type than the one specified in the
|
640
|
-
# request, the value does not match. For example, {"S":"6"} does
|
641
|
-
# not equal {"N":"6"}. Also, {"N":"6"} does not compare to
|
642
|
-
# {"NS":["6", "2", "1"]}. NOT_NULL : The attribute exists. NULL :
|
643
|
-
# The attribute does not exist. CONTAINS : checks for a
|
644
|
-
# subsequence, or value in a set. AttributeValueList can contain
|
645
|
-
# only one AttributeValue of type String, Number, or Binary (not a
|
646
|
-
# set). If the target attribute of the comparison is a String, then
|
647
|
-
# the operation checks for a substring match. If the target
|
648
|
-
# attribute of the comparison is Binary, then the operation looks
|
649
|
-
# for a subsequence of the target that matches the input. If the
|
650
|
-
# target attribute of the comparison is a set ("SS", "NS", or
|
651
|
-
# "BS"), then the operation checks for a member of the set (not as
|
652
|
-
# a substring). NOT_CONTAINS : checks for absence of a subsequence,
|
653
|
-
# or absence of a value in a set. AttributeValueList can contain
|
654
|
-
# only one AttributeValue of type String, Number, or Binary (not a
|
655
|
-
# set). If the target attribute of the comparison is a String, then
|
656
|
-
# the operation checks for the absence of a substring match. If the
|
657
|
-
# target attribute of the comparison is Binary, then the operation
|
658
|
-
# checks for the absence of a subsequence of the target that
|
659
|
-
# matches the input. If the target attribute of the comparison is a
|
660
|
-
# set ("SS", "NS", or "BS"), then the operation checks for the
|
661
|
-
# absence of a member of the set (not as a substring). BEGINS_WITH
|
662
|
-
# : checks for a prefix. AttributeValueList can contain only one
|
663
|
-
# AttributeValue of type String or Binary (not a Number or a set).
|
664
|
-
# The target attribute of the comparison must be a String or Binary
|
665
|
-
# (not a Number or a set). IN : checks for exact matches.
|
666
|
-
# AttributeValueList can contain more than one AttributeValue of
|
667
|
-
# type String, Number, or Binary (not a set). The target attribute
|
668
|
-
# of the comparison must be of the same type and exact value to
|
669
|
-
# match. A String never matches a String set. BETWEEN : Greater
|
670
|
-
# than or equal to the first value, and less than or equal to the
|
671
|
-
# second value. AttributeValueList must contain two AttributeValue
|
672
|
-
# elements of the same type, either String, Number, or Binary (not
|
673
|
-
# a set). A target attribute matches if the target value is greater
|
674
|
-
# than, or equal to, the first element and less than, or equal to,
|
675
|
-
# the second element. If an item contains an AttributeValue of a
|
676
|
-
# different type than the one specified in the request, the value
|
677
|
-
# does not match. For example, {"S":"6"} does not compare to
|
678
|
-
# {"N":"6"}. Also, {"N":"6"} does not compare to {"NS":["6", "2",
|
679
|
-
# "1"]} Valid values include:
|
680
|
-
# * `EQ`
|
681
|
-
# * `NE`
|
682
|
-
# * `IN`
|
683
|
-
# * `LE`
|
684
|
-
# * `LT`
|
685
|
-
# * `GE`
|
686
|
-
# * `GT`
|
687
|
-
# * `BETWEEN`
|
688
|
-
# * `NOT_NULL`
|
689
|
-
# * `NULL`
|
690
|
-
# * `CONTAINS`
|
691
|
-
# * `NOT_CONTAINS`
|
692
|
-
# * `BEGINS_WITH`
|
693
|
-
# * `:scan_index_forward` - (Boolean) Specifies ascending ( `true` ) or
|
694
|
-
# descending ( `false` ) traversal of the index. returns results
|
695
|
-
# reflecting the requested order determined by the range key. If the
|
696
|
-
# data type is Number, the results are returned in numeric order. For
|
697
|
-
# String, the results are returned in order of ASCII character code
|
698
|
-
# values. For Binary, Amazon DynamoDB treats each byte of the binary
|
699
|
-
# data as unsigned when it compares binary values. If
|
700
|
-
# ScanIndexForward is not specified, the results are returned in
|
701
|
-
# ascending order.
|
702
|
-
# * `:exclusive_start_key` - (Hash)
|
703
|
-
# * `:hash_key_element` - *required* - (Hash) A hash key element is
|
704
|
-
# treated as the primary key, and can be a string or a number.
|
705
|
-
# Single attribute primary keys have one index value. The value can
|
706
|
-
# be String, Number, StringSet, NumberSet.
|
707
|
-
# * `:s` - (String) Represents a String data type
|
708
|
-
# * `:n` - (String) Represents a Number data type
|
709
|
-
# * `:b` - (String) Represents a Binary data type
|
710
|
-
# * `:ss` - (Array<String>) Represents a String set data type
|
711
|
-
# * `:ns` - (Array<String>) Represents a Number set data type
|
712
|
-
# * `:bs` - (Array<String>) Represents a Binary set data type
|
713
|
-
# * `:range_key_element` - (Hash) A range key element is treated as a
|
714
|
-
# secondary key (used in conjunction with the primary key), and can
|
715
|
-
# be a string or a number, and is only used for hash-and-range
|
716
|
-
# primary keys. The value can be String, Number, StringSet,
|
717
|
-
# NumberSet.
|
718
|
-
# * `:s` - (String) Represents a String data type
|
719
|
-
# * `:n` - (String) Represents a Number data type
|
720
|
-
# * `:b` - (String) Represents a Binary data type
|
721
|
-
# * `:ss` - (Array<String>) Represents a String set data type
|
722
|
-
# * `:ns` - (Array<String>) Represents a Number set data type
|
723
|
-
# * `:bs` - (Array<String>) Represents a Binary set data type
|
724
|
-
# @return [Core::Response]
|
725
|
-
# The #data method of the response object returns
|
726
|
-
# a hash with the following structure:
|
727
|
-
#
|
728
|
-
# * `member` - (Hash<String,Hash>)
|
729
|
-
# * `S` - (String)
|
730
|
-
# * `N` - (String)
|
731
|
-
# * `B` - (String)
|
732
|
-
# * `SS` - (Array<String>)
|
733
|
-
# * `NS` - (Array<String>)
|
734
|
-
# * `BS` - (Array<Blob>)
|
735
|
-
# * `Count` - (Integer)
|
736
|
-
# * `LastEvaluatedKey` - (Hash)
|
737
|
-
# * `HashKeyElement` - (Hash)
|
738
|
-
# * `S` - (String)
|
739
|
-
# * `N` - (String)
|
740
|
-
# * `B` - (String)
|
741
|
-
# * `SS` - (Array<String>)
|
742
|
-
# * `NS` - (Array<String>)
|
743
|
-
# * `BS` - (Array<Blob>)
|
744
|
-
# * `RangeKeyElement` - (Hash)
|
745
|
-
# * `S` - (String)
|
746
|
-
# * `N` - (String)
|
747
|
-
# * `B` - (String)
|
748
|
-
# * `SS` - (Array<String>)
|
749
|
-
# * `NS` - (Array<String>)
|
750
|
-
# * `BS` - (Array<Blob>)
|
751
|
-
# * `ConsumedCapacityUnits` - (Numeric)
|
752
|
-
|
753
|
-
# @!method scan(options = {})
|
754
|
-
# Calls the Scan API operation.
|
755
|
-
# @param [Hash] options
|
756
|
-
#
|
757
|
-
# * `:table_name` - *required* - (String) The name of the table
|
758
|
-
# containing the requested items.
|
759
|
-
# * `:attributes_to_get` - (Array<String>)
|
760
|
-
# * `:limit` - (Integer)
|
761
|
-
# * `:count` - (Boolean) If set to `true` , Amazon DynamoDB returns a
|
762
|
-
# total number of items for the Scan operation, even if the operation
|
763
|
-
# has no matching items for the assigned filter. Do not set Count to
|
764
|
-
# `true` while providing a list of AttributesToGet, otherwise Amazon
|
765
|
-
# DynamoDB returns a validation error.
|
766
|
-
# * `:scan_filter` - (Hash<String,Hash>) Evaluates the scan results and
|
767
|
-
# returns only the desired values. Multiple conditions are treated as
|
768
|
-
# "AND" operations: all conditions must be met to be included in the
|
769
|
-
# results. Each ScanConditions element consists of an attribute name
|
770
|
-
# to compare, along with the following: AttributeValueList - One or
|
771
|
-
# more values to evaluate against the supplied attribute. This list
|
772
|
-
# contains exactly one value, except for a BETWEEN or IN comparison,
|
773
|
-
# in which case the list contains two values. For type Number, value
|
774
|
-
# comparisons are numeric. String value comparisons for greater than,
|
775
|
-
# equals, or less than are based on ASCII character code values. For
|
776
|
-
# example, a is greater than A, and aa is greater than B. For a list
|
777
|
-
# of code values, see
|
778
|
-
# http://en.wikipedia.org/wiki/ASCII#ASCII_printable_characters. For
|
779
|
-
# Binary, treats each byte of the binary data as unsigned when it
|
780
|
-
# compares binary values, for example when evaluating query
|
781
|
-
# expressions. ComparisonOperator - A comparator for evaluating
|
782
|
-
# attributes. For example, equals, greater than, less than, etc. For
|
783
|
-
# information on specifying data types in JSON, see JSON Data Format
|
784
|
-
# . The following are descriptions of each comparison operator. EQ :
|
785
|
-
# Equal. AttributeValueList can contain only one AttributeValue of
|
786
|
-
# type String, Number, or Binary (not a set). If an item contains an
|
787
|
-
# AttributeValue of a different type than the one specified in the
|
788
|
-
# request, the value does not match. For example, {"S":"6"} does not
|
789
|
-
# equal {"N":"6"}. Also, {"N":"6"} does not equal {"NS":["6", "2",
|
790
|
-
# "1"]}. NE : Not equal. AttributeValueList can contain only one
|
791
|
-
# AttributeValue of type String, Number, or Binary (not a set). If an
|
792
|
-
# item contains an AttributeValue of a different type than the one
|
793
|
-
# specified in the request, the value does not match. For example,
|
794
|
-
# {"S":"6"} does not equal {"N":"6"}. Also, {"N":"6"} does not equal
|
795
|
-
# {"NS":["6", "2", "1"]}. LE : Less than or equal. AttributeValueList
|
796
|
-
# can contain only one AttributeValue of type String, Number, or
|
797
|
-
# Binary (not a set). If an item contains an AttributeValue of a
|
798
|
-
# different type than the one specified in the request, the value
|
799
|
-
# does not match. For example, {"S":"6"} does not equal {"N":"6"}.
|
800
|
-
# Also, {"N":"6"} does not compare to {"NS":["6", "2", "1"]}. LT :
|
801
|
-
# Less than. AttributeValueList can contain only one AttributeValue
|
802
|
-
# of type String, Number, or Binary (not a set). If an item contains
|
803
|
-
# an AttributeValue of a different type than the one specified in the
|
804
|
-
# request, the value does not match. For example, {"S":"6"} does not
|
805
|
-
# equal {"N":"6"}. Also, {"N":"6"} does not compare to {"NS":["6",
|
806
|
-
# "2", "1"]}. GE : Greater than or equal. AttributeValueList can
|
807
|
-
# contain only one AttributeValue of type String, Number, or Binary
|
808
|
-
# (not a set). If an item contains an AttributeValue of a different
|
809
|
-
# type than the one specified in the request, the value does not
|
810
|
-
# match. For example, {"S":"6"} does not equal {"N":"6"}. Also,
|
811
|
-
# {"N":"6"} does not compare to {"NS":["6", "2", "1"]}. GT : Greater
|
812
|
-
# than. AttributeValueList can contain only one AttributeValue of
|
813
|
-
# type String, Number, or Binary (not a set). If an item contains an
|
814
|
-
# AttributeValue of a different type than the one specified in the
|
815
|
-
# request, the value does not match. For example, {"S":"6"} does not
|
816
|
-
# equal {"N":"6"}. Also, {"N":"6"} does not compare to {"NS":["6",
|
817
|
-
# "2", "1"]}. NOT_NULL : The attribute exists. NULL : The attribute
|
818
|
-
# does not exist. CONTAINS : checks for a subsequence, or value in a
|
819
|
-
# set. AttributeValueList can contain only one AttributeValue of type
|
820
|
-
# String, Number, or Binary (not a set). If the target attribute of
|
821
|
-
# the comparison is a String, then the operation checks for a
|
822
|
-
# substring match. If the target attribute of the comparison is
|
823
|
-
# Binary, then the operation looks for a subsequence of the target
|
824
|
-
# that matches the input. If the target attribute of the comparison
|
825
|
-
# is a set ("SS", "NS", or "BS"), then the operation checks for a
|
826
|
-
# member of the set (not as a substring). NOT_CONTAINS : checks for
|
827
|
-
# absence of a subsequence, or absence of a value in a set.
|
828
|
-
# AttributeValueList can contain only one AttributeValue of type
|
829
|
-
# String, Number, or Binary (not a set). If the target attribute of
|
830
|
-
# the comparison is a String, then the operation checks for the
|
831
|
-
# absence of a substring match. If the target attribute of the
|
832
|
-
# comparison is Binary, then the operation checks for the absence of
|
833
|
-
# a subsequence of the target that matches the input. If the target
|
834
|
-
# attribute of the comparison is a set ("SS", "NS", or "BS"), then
|
835
|
-
# the operation checks for the absence of a member of the set (not as
|
836
|
-
# a substring). BEGINS_WITH : checks for a prefix. AttributeValueList
|
837
|
-
# can contain only one AttributeValue of type String or Binary (not a
|
838
|
-
# Number or a set). The target attribute of the comparison must be a
|
839
|
-
# String or Binary (not a Number or a set). IN : checks for exact
|
840
|
-
# matches. AttributeValueList can contain more than one
|
841
|
-
# AttributeValue of type String, Number, or Binary (not a set). The
|
842
|
-
# target attribute of the comparison must be of the same type and
|
843
|
-
# exact value to match. A String never matches a String set. BETWEEN
|
844
|
-
# : Greater than or equal to the first value, and less than or equal
|
845
|
-
# to the second value. AttributeValueList must contain two
|
846
|
-
# AttributeValue elements of the same type, either String, Number, or
|
847
|
-
# Binary (not a set). A target attribute matches if the target value
|
848
|
-
# is greater than, or equal to, the first element and less than, or
|
849
|
-
# equal to, the second element. If an item contains an AttributeValue
|
850
|
-
# of a different type than the one specified in the request, the
|
851
|
-
# value does not match. For example, {"S":"6"} does not compare to
|
852
|
-
# {"N":"6"}. Also, {"N":"6"} does not compare to {"NS":["6", "2",
|
853
|
-
# "1"]}
|
854
|
-
# * `:attribute_value_list` - (Array<Hash>) Represents one or more
|
855
|
-
# values to evaluate against the supplied attribute. This list
|
856
|
-
# contains exactly one value, except for a BETWEEN or IN
|
857
|
-
# comparison, in which case the list contains two values. For type
|
858
|
-
# Number, value comparisons are numeric. String value comparisons
|
859
|
-
# for greater than, equals, or less than are based on ASCII
|
860
|
-
# character code values. For example, a is greater than A, and aa
|
861
|
-
# is greater than B. For a list of code values, see
|
862
|
-
# http://en.wikipedia.org/wiki/ASCII#ASCII_printable_characters.
|
863
|
-
# For Binary, treats each byte of the binary data as unsigned when
|
864
|
-
# it compares binary values, for example when evaluating query
|
865
|
-
# expressions.
|
866
|
-
# * `:s` - (String) Represents a String data type
|
867
|
-
# * `:n` - (String) Represents a Number data type
|
868
|
-
# * `:b` - (String) Represents a Binary data type
|
869
|
-
# * `:ss` - (Array<String>) Represents a String set data type
|
870
|
-
# * `:ns` - (Array<String>) Represents a Number set data type
|
871
|
-
# * `:bs` - (Array<String>) Represents a Binary set data type
|
872
|
-
# * `:comparison_operator` - *required* - (String) Represents a
|
873
|
-
# comparator for evaluating attributes. For example, equals,
|
874
|
-
# greater than, less than, etc. For information on specifying data
|
875
|
-
# types in JSON, see JSON Data Format . The following are
|
876
|
-
# descriptions of each comparison operator. EQ : Equal.
|
877
|
-
# AttributeValueList can contain only one AttributeValue of type
|
878
|
-
# String, Number, or Binary (not a set). If an item contains an
|
879
|
-
# AttributeValue of a different type than the one specified in the
|
880
|
-
# request, the value does not match. For example, {"S":"6"} does
|
881
|
-
# not equal {"N":"6"}. Also, {"N":"6"} does not equal {"NS":["6",
|
882
|
-
# "2", "1"]}. NE : Not equal. AttributeValueList can contain only
|
883
|
-
# one AttributeValue of type String, Number, or Binary (not a set).
|
884
|
-
# If an item contains an AttributeValue of a different type than
|
885
|
-
# the one specified in the request, the value does not match. For
|
886
|
-
# example, {"S":"6"} does not equal {"N":"6"}. Also, {"N":"6"} does
|
887
|
-
# not equal {"NS":["6", "2", "1"]}. LE : Less than or equal.
|
888
|
-
# AttributeValueList can contain only one AttributeValue of type
|
889
|
-
# String, Number, or Binary (not a set). If an item contains an
|
890
|
-
# AttributeValue of a different type than the one specified in the
|
891
|
-
# request, the value does not match. For example, {"S":"6"} does
|
892
|
-
# not equal {"N":"6"}. Also, {"N":"6"} does not compare to
|
893
|
-
# {"NS":["6", "2", "1"]}. LT : Less than. AttributeValueList can
|
894
|
-
# contain only one AttributeValue of type String, Number, or Binary
|
895
|
-
# (not a set). If an item contains an AttributeValue of a different
|
896
|
-
# type than the one specified in the request, the value does not
|
897
|
-
# match. For example, {"S":"6"} does not equal {"N":"6"}. Also,
|
898
|
-
# {"N":"6"} does not compare to {"NS":["6", "2", "1"]}. GE :
|
899
|
-
# Greater than or equal. AttributeValueList can contain only one
|
900
|
-
# AttributeValue of type String, Number, or Binary (not a set). If
|
901
|
-
# an item contains an AttributeValue of a different type than the
|
902
|
-
# one specified in the request, the value does not match. For
|
903
|
-
# example, {"S":"6"} does not equal {"N":"6"}. Also, {"N":"6"} does
|
904
|
-
# not compare to {"NS":["6", "2", "1"]}. GT : Greater than.
|
905
|
-
# AttributeValueList can contain only one AttributeValue of type
|
906
|
-
# String, Number, or Binary (not a set). If an item contains an
|
907
|
-
# AttributeValue of a different type than the one specified in the
|
908
|
-
# request, the value does not match. For example, {"S":"6"} does
|
909
|
-
# not equal {"N":"6"}. Also, {"N":"6"} does not compare to
|
910
|
-
# {"NS":["6", "2", "1"]}. NOT_NULL : The attribute exists. NULL :
|
911
|
-
# The attribute does not exist. CONTAINS : checks for a
|
912
|
-
# subsequence, or value in a set. AttributeValueList can contain
|
913
|
-
# only one AttributeValue of type String, Number, or Binary (not a
|
914
|
-
# set). If the target attribute of the comparison is a String, then
|
915
|
-
# the operation checks for a substring match. If the target
|
916
|
-
# attribute of the comparison is Binary, then the operation looks
|
917
|
-
# for a subsequence of the target that matches the input. If the
|
918
|
-
# target attribute of the comparison is a set ("SS", "NS", or
|
919
|
-
# "BS"), then the operation checks for a member of the set (not as
|
920
|
-
# a substring). NOT_CONTAINS : checks for absence of a subsequence,
|
921
|
-
# or absence of a value in a set. AttributeValueList can contain
|
922
|
-
# only one AttributeValue of type String, Number, or Binary (not a
|
923
|
-
# set). If the target attribute of the comparison is a String, then
|
924
|
-
# the operation checks for the absence of a substring match. If the
|
925
|
-
# target attribute of the comparison is Binary, then the operation
|
926
|
-
# checks for the absence of a subsequence of the target that
|
927
|
-
# matches the input. If the target attribute of the comparison is a
|
928
|
-
# set ("SS", "NS", or "BS"), then the operation checks for the
|
929
|
-
# absence of a member of the set (not as a substring). BEGINS_WITH
|
930
|
-
# : checks for a prefix. AttributeValueList can contain only one
|
931
|
-
# AttributeValue of type String or Binary (not a Number or a set).
|
932
|
-
# The target attribute of the comparison must be a String or Binary
|
933
|
-
# (not a Number or a set). IN : checks for exact matches.
|
934
|
-
# AttributeValueList can contain more than one AttributeValue of
|
935
|
-
# type String, Number, or Binary (not a set). The target attribute
|
936
|
-
# of the comparison must be of the same type and exact value to
|
937
|
-
# match. A String never matches a String set. BETWEEN : Greater
|
938
|
-
# than or equal to the first value, and less than or equal to the
|
939
|
-
# second value. AttributeValueList must contain two AttributeValue
|
940
|
-
# elements of the same type, either String, Number, or Binary (not
|
941
|
-
# a set). A target attribute matches if the target value is greater
|
942
|
-
# than, or equal to, the first element and less than, or equal to,
|
943
|
-
# the second element. If an item contains an AttributeValue of a
|
944
|
-
# different type than the one specified in the request, the value
|
945
|
-
# does not match. For example, {"S":"6"} does not compare to
|
946
|
-
# {"N":"6"}. Also, {"N":"6"} does not compare to {"NS":["6", "2",
|
947
|
-
# "1"]} Valid values include:
|
948
|
-
# * `EQ`
|
949
|
-
# * `NE`
|
950
|
-
# * `IN`
|
951
|
-
# * `LE`
|
952
|
-
# * `LT`
|
953
|
-
# * `GE`
|
954
|
-
# * `GT`
|
955
|
-
# * `BETWEEN`
|
956
|
-
# * `NOT_NULL`
|
957
|
-
# * `NULL`
|
958
|
-
# * `CONTAINS`
|
959
|
-
# * `NOT_CONTAINS`
|
960
|
-
# * `BEGINS_WITH`
|
961
|
-
# * `:exclusive_start_key` - (Hash) In a parallel scan, a Scan request
|
962
|
-
# that includes ExclusiveStartKey must specify the same segment whose
|
963
|
-
# previous Scan returned the corresponding value of LastEvaluatedKey.
|
964
|
-
# * `:hash_key_element` - *required* - (Hash) A hash key element is
|
965
|
-
# treated as the primary key, and can be a string or a number.
|
966
|
-
# Single attribute primary keys have one index value. The value can
|
967
|
-
# be String, Number, StringSet, NumberSet.
|
968
|
-
# * `:s` - (String) Represents a String data type
|
969
|
-
# * `:n` - (String) Represents a Number data type
|
970
|
-
# * `:b` - (String) Represents a Binary data type
|
971
|
-
# * `:ss` - (Array<String>) Represents a String set data type
|
972
|
-
# * `:ns` - (Array<String>) Represents a Number set data type
|
973
|
-
# * `:bs` - (Array<String>) Represents a Binary set data type
|
974
|
-
# * `:range_key_element` - (Hash) A range key element is treated as a
|
975
|
-
# secondary key (used in conjunction with the primary key), and can
|
976
|
-
# be a string or a number, and is only used for hash-and-range
|
977
|
-
# primary keys. The value can be String, Number, StringSet,
|
978
|
-
# NumberSet.
|
979
|
-
# * `:s` - (String) Represents a String data type
|
980
|
-
# * `:n` - (String) Represents a Number data type
|
981
|
-
# * `:b` - (String) Represents a Binary data type
|
982
|
-
# * `:ss` - (Array<String>) Represents a String set data type
|
983
|
-
# * `:ns` - (Array<String>) Represents a Number set data type
|
984
|
-
# * `:bs` - (Array<String>) Represents a Binary set data type
|
985
|
-
# @return [Core::Response]
|
986
|
-
# The #data method of the response object returns
|
987
|
-
# a hash with the following structure:
|
988
|
-
#
|
989
|
-
# * `member` - (Hash<String,Hash>)
|
990
|
-
# * `S` - (String)
|
991
|
-
# * `N` - (String)
|
992
|
-
# * `B` - (String)
|
993
|
-
# * `SS` - (Array<String>)
|
994
|
-
# * `NS` - (Array<String>)
|
995
|
-
# * `BS` - (Array<Blob>)
|
996
|
-
# * `Count` - (Integer)
|
997
|
-
# * `ScannedCount` - (Integer)
|
998
|
-
# * `LastEvaluatedKey` - (Hash)
|
999
|
-
# * `HashKeyElement` - (Hash)
|
1000
|
-
# * `S` - (String)
|
1001
|
-
# * `N` - (String)
|
1002
|
-
# * `B` - (String)
|
1003
|
-
# * `SS` - (Array<String>)
|
1004
|
-
# * `NS` - (Array<String>)
|
1005
|
-
# * `BS` - (Array<Blob>)
|
1006
|
-
# * `RangeKeyElement` - (Hash)
|
1007
|
-
# * `S` - (String)
|
1008
|
-
# * `N` - (String)
|
1009
|
-
# * `B` - (String)
|
1010
|
-
# * `SS` - (Array<String>)
|
1011
|
-
# * `NS` - (Array<String>)
|
1012
|
-
# * `BS` - (Array<Blob>)
|
1013
|
-
# * `ConsumedCapacityUnits` - (Numeric)
|
1014
|
-
|
1015
|
-
# @!method update_item(options = {})
|
1016
|
-
# Calls the UpdateItem API operation.
|
1017
|
-
# @param [Hash] options
|
1018
|
-
#
|
1019
|
-
# * `:table_name` - *required* - (String) The name of the table
|
1020
|
-
# containing the item to update.
|
1021
|
-
# * `:key` - *required* - (Hash) The primary key that defines the item.
|
1022
|
-
# Each element consists of an attribute name and a value for that
|
1023
|
-
# attribute.
|
1024
|
-
# * `:hash_key_element` - *required* - (Hash) A hash key element is
|
1025
|
-
# treated as the primary key, and can be a string or a number.
|
1026
|
-
# Single attribute primary keys have one index value. The value can
|
1027
|
-
# be String, Number, StringSet, NumberSet.
|
1028
|
-
# * `:s` - (String) Represents a String data type
|
1029
|
-
# * `:n` - (String) Represents a Number data type
|
1030
|
-
# * `:b` - (String) Represents a Binary data type
|
1031
|
-
# * `:ss` - (Array<String>) Represents a String set data type
|
1032
|
-
# * `:ns` - (Array<String>) Represents a Number set data type
|
1033
|
-
# * `:bs` - (Array<String>) Represents a Binary set data type
|
1034
|
-
# * `:range_key_element` - (Hash) A range key element is treated as a
|
1035
|
-
# secondary key (used in conjunction with the primary key), and can
|
1036
|
-
# be a string or a number, and is only used for hash-and-range
|
1037
|
-
# primary keys. The value can be String, Number, StringSet,
|
1038
|
-
# NumberSet.
|
1039
|
-
# * `:s` - (String) Represents a String data type
|
1040
|
-
# * `:n` - (String) Represents a Number data type
|
1041
|
-
# * `:b` - (String) Represents a Binary data type
|
1042
|
-
# * `:ss` - (Array<String>) Represents a String set data type
|
1043
|
-
# * `:ns` - (Array<String>) Represents a Number set data type
|
1044
|
-
# * `:bs` - (Array<String>) Represents a Binary set data type
|
1045
|
-
# * `:attribute_updates` - *required* - (Hash<String,Hash>) The names
|
1046
|
-
# of attributes to be modified, the action to perform on each, and
|
1047
|
-
# the new value for each. If you are updating an attribute that is an
|
1048
|
-
# index key attribute for any indexes on that table, the attribute
|
1049
|
-
# type must match the index key type defined in the
|
1050
|
-
# AttributesDefinition of the table description. You can use
|
1051
|
-
# UpdateItem to update any non-key attributes. Attribute values
|
1052
|
-
# cannot be null. String and binary type attributes must have lengths
|
1053
|
-
# greater than zero. Set type attributes must not be empty. Requests
|
1054
|
-
# with empty values will be rejected with a ValidationException. Each
|
1055
|
-
# AttributeUpdates element consists of an attribute name to modify,
|
1056
|
-
# along with the following: Value - The new value, if applicable, for
|
1057
|
-
# this attribute. Action - Specifies how to perform the update. Valid
|
1058
|
-
# values for Action are PUT, DELETE, and ADD. The behavior depends on
|
1059
|
-
# whether the specified primary key already exists in the table. If
|
1060
|
-
# an item with the specified Key is found in the table: PUT - Adds
|
1061
|
-
# the specified attribute to the item. If the attribute already
|
1062
|
-
# exists, it is replaced by the new value. DELETE - If no value is
|
1063
|
-
# specified, the attribute and its value are removed from the item.
|
1064
|
-
# The data type of the specified value must match the existing
|
1065
|
-
# value's data type. If a set of values is specified, then those
|
1066
|
-
# values are subtracted from the old set. For example, if the
|
1067
|
-
# attribute value was the set [a,b,c] and the DELETE action specified
|
1068
|
-
# [a,c], then the final attribute value would be [b]. Specifying an
|
1069
|
-
# empty set is an error. ADD - If the attribute does not already
|
1070
|
-
# exist, then the attribute and its values are added to the item. If
|
1071
|
-
# the attribute does exist, then the behavior of ADD depends on the
|
1072
|
-
# data type of the attribute: If the existing attribute is a number,
|
1073
|
-
# and if Value is also a number, then the Value is mathematically
|
1074
|
-
# added to the existing attribute. If Value is a negative number,
|
1075
|
-
# then it is subtracted from the existing attribute. If you use ADD
|
1076
|
-
# to increment or decrement a number value for an item that doesn't
|
1077
|
-
# exist before the update, uses 0 as the initial value. In addition,
|
1078
|
-
# if you use ADD to update an existing item, and intend to increment
|
1079
|
-
# or decrement an attribute value which does not yet exist, uses 0 as
|
1080
|
-
# the initial value. For example, suppose that the item you want to
|
1081
|
-
# update does not yet have an attribute named itemcount, but you
|
1082
|
-
# decide to ADD the number 3 to this attribute anyway, even though it
|
1083
|
-
# currently does not exist. will create the itemcount attribute, set
|
1084
|
-
# its initial value to 0, and finally add 3 to it. The result will be
|
1085
|
-
# a new itemcount attribute in the item, with a value of 3. If the
|
1086
|
-
# existing data type is a set, and if the Value is also a set, then
|
1087
|
-
# the Value is added to the existing set. (This is a set operation,
|
1088
|
-
# not mathematical addition.) For example, if the attribute value was
|
1089
|
-
# the set [1,2], and the ADD action specified [3], then the final
|
1090
|
-
# attribute value would be [1,2,3]. An error occurs if an Add action
|
1091
|
-
# is specified for a set attribute and the attribute type specified
|
1092
|
-
# does not match the existing set type. Both sets must have the same
|
1093
|
-
# primitive data type. For example, if the existing data type is a
|
1094
|
-
# set of strings, the Value must also be a set of strings. The same
|
1095
|
-
# holds `true` for number sets and binary sets. This action is only
|
1096
|
-
# valid for an existing attribute whose data type is number or is a
|
1097
|
-
# set. Do not use ADD for any other data types. If no item with the
|
1098
|
-
# specified Key is found: PUT - creates a new item with the specified
|
1099
|
-
# primary key, and then adds the attribute. DELETE - Nothing happens;
|
1100
|
-
# there is no attribute to delete. ADD - creates an item with the
|
1101
|
-
# supplied primary key and number (or set of numbers) for the
|
1102
|
-
# attribute value. The only data types allowed are number and number
|
1103
|
-
# set; no other data types can be specified. If you specify any
|
1104
|
-
# attributes that are part of an index key, then the data types for
|
1105
|
-
# those attributes must match those of the schema in the table's
|
1106
|
-
# attribute definition.
|
1107
|
-
# * `:value` - (Hash)
|
1108
|
-
# * `:s` - (String) Represents a String data type
|
1109
|
-
# * `:n` - (String) Represents a Number data type
|
1110
|
-
# * `:b` - (String) Represents a Binary data type
|
1111
|
-
# * `:ss` - (Array<String>) Represents a String set data type
|
1112
|
-
# * `:ns` - (Array<String>) Represents a Number set data type
|
1113
|
-
# * `:bs` - (Array<String>) Represents a Binary set data type
|
1114
|
-
# * `:action` - (String) Specifies how to perform the update. Valid
|
1115
|
-
# values are PUT, DELETE, and ADD. The behavior depends on whether
|
1116
|
-
# the specified primary key already exists in the table. If an item
|
1117
|
-
# with the specified Key is found in the table: PUT - Adds the
|
1118
|
-
# specified attribute to the item. If the attribute already exists,
|
1119
|
-
# it is replaced by the new value. DELETE - If no value is
|
1120
|
-
# specified, the attribute and its value are removed from the item.
|
1121
|
-
# The data type of the specified value must match the existing
|
1122
|
-
# value's data type. If a set of values is specified, then those
|
1123
|
-
# values are subtracted from the old set. For example, if the
|
1124
|
-
# attribute value was the set [a,b,c] and the DELETE action
|
1125
|
-
# specified [a,c], then the final attribute value would be [b].
|
1126
|
-
# Specifying an empty set is an error. ADD - If the attribute does
|
1127
|
-
# not already exist, then the attribute and its values are added to
|
1128
|
-
# the item. If the attribute does exist, then the behavior of ADD
|
1129
|
-
# depends on the data type of the attribute: If the existing
|
1130
|
-
# attribute is a number, and if Value is also a number, then the
|
1131
|
-
# Value is mathematically added to the existing attribute. If Value
|
1132
|
-
# is a negative number, then it is subtracted from the existing
|
1133
|
-
# attribute. If you use ADD to increment or decrement a number
|
1134
|
-
# value for an item that doesn't exist before the update, uses 0 as
|
1135
|
-
# the initial value. In addition, if you use ADD to update an
|
1136
|
-
# existing item, and intend to increment or decrement an attribute
|
1137
|
-
# value which does not yet exist, uses 0 as the initial value. For
|
1138
|
-
# example, suppose that the item you want to update does not yet
|
1139
|
-
# have an attribute named itemcount, but you decide to ADD the
|
1140
|
-
# number 3 to this attribute anyway, even though it currently does
|
1141
|
-
# not exist. will create the itemcount attribute, set its initial
|
1142
|
-
# value to 0, and finally add 3 to it. The result will be a new
|
1143
|
-
# itemcount attribute in the item, with a value of 3. If the
|
1144
|
-
# existing data type is a set, and if the Value is also a set, then
|
1145
|
-
# the Value is added to the existing set. (This is a set operation,
|
1146
|
-
# not mathematical addition.) For example, if the attribute value
|
1147
|
-
# was the set [1,2], and the ADD action specified [3], then the
|
1148
|
-
# final attribute value would be [1,2,3]. An error occurs if an Add
|
1149
|
-
# action is specified for a set attribute and the attribute type
|
1150
|
-
# specified does not match the existing set type. Both sets must
|
1151
|
-
# have the same primitive data type. For example, if the existing
|
1152
|
-
# data type is a set of strings, the Value must also be a set of
|
1153
|
-
# strings. The same holds `true` for number sets and binary sets.
|
1154
|
-
# This action is only valid for an existing attribute whose data
|
1155
|
-
# type is number or is a set. Do not use ADD for any other data
|
1156
|
-
# types. If no item with the specified Key is found: PUT - creates
|
1157
|
-
# a new item with the specified primary key, and then adds the
|
1158
|
-
# attribute. DELETE - Nothing happens; there is no attribute to
|
1159
|
-
# delete. ADD - creates an item with the supplied primary key and
|
1160
|
-
# number (or set of numbers) for the attribute value. The only data
|
1161
|
-
# types allowed are number and number set; no other data types can
|
1162
|
-
# be specified. Valid values include:
|
1163
|
-
# * `ADD`
|
1164
|
-
# * `PUT`
|
1165
|
-
# * `DELETE`
|
1166
|
-
# * `:expected` - (Hash<String,Hash>) A map of attribute/condition
|
1167
|
-
# pairs. This is the conditional block for the UpdateItem operation.
|
1168
|
-
# All the conditions must be met for the operation to succeed.
|
1169
|
-
# * `:value` - (Hash) Specify whether or not a value already exists
|
1170
|
-
# and has a specific content for the attribute name-value pair.
|
1171
|
-
# * `:s` - (String) Represents a String data type
|
1172
|
-
# * `:n` - (String) Represents a Number data type
|
1173
|
-
# * `:b` - (String) Represents a Binary data type
|
1174
|
-
# * `:ss` - (Array<String>) Represents a String set data type
|
1175
|
-
# * `:ns` - (Array<String>) Represents a Number set data type
|
1176
|
-
# * `:bs` - (Array<String>) Represents a Binary set data type
|
1177
|
-
# * `:exists` - (Boolean) Causes to evaluate the value before
|
1178
|
-
# attempting a conditional operation: If Exists is `true` , will
|
1179
|
-
# check to see if that attribute value already exists in the table.
|
1180
|
-
# If it is found, then the operation succeeds. If it is not found,
|
1181
|
-
# the operation fails with a ConditionalCheckFailedException. If
|
1182
|
-
# Exists is `false` , assumes that the attribute value does not
|
1183
|
-
# exist in the table. If in fact the value does not exist, then the
|
1184
|
-
# assumption is valid and the operation succeeds. If the value is
|
1185
|
-
# found, despite the assumption that it does not exist, the
|
1186
|
-
# operation fails with a ConditionalCheckFailedException. The
|
1187
|
-
# default setting for Exists is `true` . If you supply a Value all
|
1188
|
-
# by itself, assumes the attribute exists: You don't have to set
|
1189
|
-
# Exists to `true` , because it is implied. returns a
|
1190
|
-
# ValidationException if: Exists is `true` but there is no Value to
|
1191
|
-
# check. (You expect a value to exist, but don't specify what that
|
1192
|
-
# value is.) Exists is `false` but you also specify a Value. (You
|
1193
|
-
# cannot expect an attribute to have a value, while also expecting
|
1194
|
-
# it not to exist.) If you specify more than one condition for
|
1195
|
-
# Exists, then all of the conditions must evaluate to `true` . (In
|
1196
|
-
# other words, the conditions are ANDed together.) Otherwise, the
|
1197
|
-
# conditional operation will fail.
|
1198
|
-
# * `:return_values` - (String) Use ReturnValues if you want to get the
|
1199
|
-
# item attributes as they appeared either before or after they were
|
1200
|
-
# updated. For UpdateItem, the valid values are: NONE - If
|
1201
|
-
# ReturnValues is not specified, or if its value is NONE, then
|
1202
|
-
# nothing is returned. (This is the default for ReturnValues.)
|
1203
|
-
# ALL_OLD - If UpdateItem overwrote an attribute name-value pair,
|
1204
|
-
# then the content of the old item is returned. UPDATED_OLD - The old
|
1205
|
-
# versions of only the updated attributes are returned. ALL_NEW - All
|
1206
|
-
# of the attributes of the new version of the item are returned.
|
1207
|
-
# UPDATED_NEW - The new versions of only the updated attributes are
|
1208
|
-
# returned. Valid values include:
|
1209
|
-
# * `NONE`
|
1210
|
-
# * `ALL_OLD`
|
1211
|
-
# * `UPDATED_OLD`
|
1212
|
-
# * `ALL_NEW`
|
1213
|
-
# * `UPDATED_NEW`
|
1214
|
-
# @return [Core::Response]
|
1215
|
-
# The #data method of the response object returns
|
1216
|
-
# a hash with the following structure:
|
1217
|
-
#
|
1218
|
-
# * `Attributes` - (Hash<String,Hash>)
|
1219
|
-
# * `S` - (String)
|
1220
|
-
# * `N` - (String)
|
1221
|
-
# * `B` - (String)
|
1222
|
-
# * `SS` - (Array<String>)
|
1223
|
-
# * `NS` - (Array<String>)
|
1224
|
-
# * `BS` - (Array<Blob>)
|
1225
|
-
# * `ConsumedCapacityUnits` - (Numeric)
|
1226
|
-
|
1227
|
-
# @!method update_table(options = {})
|
1228
|
-
# Calls the UpdateTable API operation.
|
1229
|
-
# @param [Hash] options
|
1230
|
-
#
|
1231
|
-
# * `:table_name` - *required* - (String) The name of the table to be
|
1232
|
-
# updated.
|
1233
|
-
# * `:provisioned_throughput` - *required* - (Hash)
|
1234
|
-
# * `:read_capacity_units` - *required* - (Integer) The maximum
|
1235
|
-
# number of strongly consistent reads consumed per second before
|
1236
|
-
# returns a ThrottlingException. For more information, see
|
1237
|
-
# Specifying Read and Write Requirements .
|
1238
|
-
# * `:write_capacity_units` - *required* - (Integer) The maximum
|
1239
|
-
# number of writes consumed per second before returns a
|
1240
|
-
# ThrottlingException. For more information, see Specifying Read
|
1241
|
-
# and Write Requirements .
|
1242
|
-
# @return [Core::Response]
|
1243
|
-
# The #data method of the response object returns
|
1244
|
-
# a hash with the following structure:
|
1245
|
-
#
|
1246
|
-
# * `TableDescription` - (Hash)
|
1247
|
-
# * `TableName` - (String)
|
1248
|
-
# * `KeySchema` - (Hash)
|
1249
|
-
# * `HashKeyElement` - (Hash)
|
1250
|
-
# * `AttributeName` - (String)
|
1251
|
-
# * `AttributeType` - (String)
|
1252
|
-
# * `RangeKeyElement` - (Hash)
|
1253
|
-
# * `AttributeName` - (String)
|
1254
|
-
# * `AttributeType` - (String)
|
1255
|
-
# * `TableStatus` - (String)
|
1256
|
-
# * `CreationDateTime` - (Time)
|
1257
|
-
# * `ProvisionedThroughput` - (Hash)
|
1258
|
-
# * `LastIncreaseDateTime` - (Time)
|
1259
|
-
# * `LastDecreaseDateTime` - (Time)
|
1260
|
-
# * `NumberOfDecreasesToday` - (Integer)
|
1261
|
-
# * `ReadCapacityUnits` - (Integer)
|
1262
|
-
# * `WriteCapacityUnits` - (Integer)
|
1263
|
-
# * `TableSizeBytes` - (Integer)
|
1264
|
-
# * `ItemCount` - (Integer)
|
1265
|
-
|
1266
|
-
# end client methods #
|
1267
|
-
|
1268
|
-
define_client_methods('2011-12-05')
|
54
|
+
API_VERSION = '2011-12-05'
|
1269
55
|
|
1270
56
|
end
|
1271
57
|
end
|