aws-sdk 1.11.3 → 1.12.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/bin/aws-rb +151 -0
- data/lib/aws/api_config/ElasticTranscoder-2012-09-25.yml +257 -0
- data/lib/aws/auto_scaling/group.rb +2 -0
- data/lib/aws/auto_scaling/group_options.rb +9 -0
- data/lib/aws/cloud_watch/metric_collection.rb +1 -3
- data/lib/aws/core.rb +107 -166
- data/lib/aws/core/configuration.rb +22 -4
- data/lib/aws/core/http/curb_handler.rb +2 -9
- data/lib/aws/core/http/net_http_handler.rb +15 -15
- data/lib/aws/core/region.rb +11 -7
- data/lib/aws/dynamo_db/client.rb +766 -400
- data/lib/aws/dynamo_db/client_v2.rb +125 -23
- data/lib/aws/elastic_transcoder/client.rb +578 -54
- data/lib/aws/iam/virtual_mfa_device.rb +1 -1
- data/lib/aws/route_53/change_batch.rb +3 -1
- data/lib/aws/route_53/resource_record_set.rb +17 -3
- data/lib/aws/s3/client.rb +10 -5
- data/lib/aws/s3/encryption_utils.rb +8 -1
- data/lib/aws/s3/object_collection.rb +7 -4
- data/lib/aws/simple_email_service.rb +5 -2
- data/lib/aws/sns.rb +1 -0
- data/lib/aws/sns/message.rb +175 -0
- data/lib/aws/sns/originators/from_auto_scaling.rb +68 -0
- data/lib/aws/version.rb +1 -1
- metadata +12 -16
@@ -12,7 +12,6 @@
|
|
12
12
|
# language governing permissions and limitations under the License.
|
13
13
|
|
14
14
|
require 'thread'
|
15
|
-
require 'stringio'
|
16
15
|
|
17
16
|
module AWS
|
18
17
|
module Core
|
@@ -96,11 +95,6 @@ module AWS
|
|
96
95
|
# curl.verbose = true
|
97
96
|
request.headers.each {|k, v| curl.headers[k] = v}
|
98
97
|
|
99
|
-
if proxy = request.proxy_uri
|
100
|
-
curl.proxy_url = proxy.to_s
|
101
|
-
curl.proxy_port = proxy.port
|
102
|
-
end
|
103
|
-
|
104
98
|
curl.on_header {|header_data|
|
105
99
|
if header_data =~ /:\s+/
|
106
100
|
name, value = header_data.strip.split(/:\s+/, 2)
|
@@ -123,7 +117,7 @@ module AWS
|
|
123
117
|
curl.delete = true
|
124
118
|
end
|
125
119
|
|
126
|
-
buffer =
|
120
|
+
buffer = []
|
127
121
|
|
128
122
|
if read_block
|
129
123
|
curl.on_body do |chunk|
|
@@ -140,8 +134,7 @@ module AWS
|
|
140
134
|
curl.on_complete do
|
141
135
|
response.status = curl.response_code
|
142
136
|
unless read_block
|
143
|
-
buffer.
|
144
|
-
response.body = buffer.read
|
137
|
+
response.body = buffer.join("")
|
145
138
|
end
|
146
139
|
thread.run if thread
|
147
140
|
end
|
@@ -24,12 +24,10 @@ module AWS
|
|
24
24
|
class NetHttpHandler
|
25
25
|
|
26
26
|
# @api private
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
LocalJumpError, SignalException, ScriptError,
|
32
|
-
SystemStackError, RegexpError, IndexError,
|
27
|
+
NETWORK_ERRORS = [
|
28
|
+
SocketError, EOFError, IOError, Timeout::Error,
|
29
|
+
Errno::ECONNABORTED, Errno::ECONNRESET, Errno::EPIPE,
|
30
|
+
Errno::EINVAL, Errno::ETIMEDOUT, OpenSSL::SSL::SSLError,
|
33
31
|
]
|
34
32
|
|
35
33
|
# (see ConnectionPool.new)
|
@@ -47,6 +45,8 @@ module AWS
|
|
47
45
|
# @param [Response] response
|
48
46
|
# @return [nil]
|
49
47
|
def handle request, response, &read_block
|
48
|
+
retry_possible = true
|
49
|
+
|
50
50
|
begin
|
51
51
|
|
52
52
|
@pool.session_for(request.endpoint) do |http|
|
@@ -59,7 +59,13 @@ module AWS
|
|
59
59
|
response.status = net_http_resp.code.to_i
|
60
60
|
response.headers = net_http_resp.to_hash
|
61
61
|
if block_given? and response.status < 300
|
62
|
-
net_http_resp.read_body
|
62
|
+
net_http_resp.read_body do |data|
|
63
|
+
begin
|
64
|
+
yield data
|
65
|
+
ensure
|
66
|
+
retry_possible = false
|
67
|
+
end
|
68
|
+
end
|
63
69
|
else
|
64
70
|
response.body = net_http_resp.read_body
|
65
71
|
end
|
@@ -67,14 +73,8 @@ module AWS
|
|
67
73
|
|
68
74
|
end
|
69
75
|
|
70
|
-
|
71
|
-
|
72
|
-
# should not be retried, except for timeout errors.
|
73
|
-
rescue Timeout::Error => error
|
74
|
-
response.network_error = error
|
75
|
-
rescue *PASS_THROUGH_ERRORS => error
|
76
|
-
raise error
|
77
|
-
rescue Exception => error
|
76
|
+
rescue *NETWORK_ERRORS => error
|
77
|
+
raise error unless retry_possible
|
78
78
|
response.network_error = error
|
79
79
|
end
|
80
80
|
nil
|
data/lib/aws/core/region.rb
CHANGED
@@ -22,18 +22,20 @@ module AWS
|
|
22
22
|
# aws.dynamo_db.tables.map(&:name)
|
23
23
|
# aws.ec2.instances.map(&:id)
|
24
24
|
#
|
25
|
+
# Regions provide helper methods for each service.
|
26
|
+
#
|
25
27
|
# @attr_reader [AutoScaling] auto_scaling
|
26
28
|
# @attr_reader [CloudFormation] cloud_formation
|
27
29
|
# @attr_reader [CloudFront] cloud_front
|
28
30
|
# @attr_reader [CloudSearch] cloud_search
|
29
31
|
# @attr_reader [CloudWatch] cloud_watch
|
30
|
-
# @attr_reader [DynamoDB] dynamo_db
|
31
32
|
# @attr_reader [DataPipeline] data_pipeline
|
32
33
|
# @attr_reader [DirectConnect] direct_connect
|
34
|
+
# @attr_reader [DynamoDB] dynamo_db
|
33
35
|
# @attr_reader [EC2] ec2
|
34
|
-
# @attr_reader [ElastiCache] elasticache
|
35
36
|
# @attr_reader [ElasticBeanstalk] elastic_beanstalk
|
36
37
|
# @attr_reader [ElasticTranscoder] elastic_transcoder
|
38
|
+
# @attr_reader [ElastiCache] elasticache
|
37
39
|
# @attr_reader [ELB] elb
|
38
40
|
# @attr_reader [EMR] emr
|
39
41
|
# @attr_reader [Glacier] glacier
|
@@ -44,13 +46,14 @@ module AWS
|
|
44
46
|
# @attr_reader [Redshift] redshift
|
45
47
|
# @attr_reader [Route53] route_53
|
46
48
|
# @attr_reader [S3] s3
|
49
|
+
# @attr_reader [SimpleEmailService] ses
|
47
50
|
# @attr_reader [SimpleDB] simple_db
|
48
|
-
# @attr_reader [SimpleEmailService] simple_email_service
|
49
|
-
# @attr_reader [SimpleWorkflow] simple_workflow
|
50
51
|
# @attr_reader [SNS] sns
|
51
52
|
# @attr_reader [SQS] sqs
|
52
53
|
# @attr_reader [StorageGateway] storage_gateway
|
53
54
|
# @attr_reader [STS] sts
|
55
|
+
# @attr_reader [Support] support
|
56
|
+
# @attr_reader [SimpleWorkflow] swf
|
54
57
|
#
|
55
58
|
class Region
|
56
59
|
|
@@ -68,10 +71,11 @@ module AWS
|
|
68
71
|
# @return [Configuration]
|
69
72
|
attr_reader :config
|
70
73
|
|
71
|
-
AWS::SERVICES.
|
72
|
-
define_method(
|
73
|
-
AWS.const_get(
|
74
|
+
AWS::SERVICES.values.each do |svc|
|
75
|
+
define_method(svc.method_name) do
|
76
|
+
AWS.const_get(svc.class_name).new(:config => config)
|
74
77
|
end
|
78
|
+
alias_method(svc.method_alias, svc.method_name) if svc.method_alias
|
75
79
|
end
|
76
80
|
|
77
81
|
end
|
data/lib/aws/dynamo_db/client.rb
CHANGED
@@ -22,43 +22,50 @@ module AWS
|
|
22
22
|
# @!method batch_get_item(options = {})
|
23
23
|
# Calls the BatchGetItem API operation.
|
24
24
|
# @param [Hash] options
|
25
|
-
#
|
26
|
-
#
|
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.
|
27
40
|
# * `:hash_key_element` - *required* - (Hash) A hash key element is
|
28
41
|
# treated as the primary key, and can be a string or a number.
|
29
42
|
# Single attribute primary keys have one index value. The value
|
30
43
|
# can be String, Number, StringSet, NumberSet.
|
31
|
-
# * `:s` - (String)
|
32
|
-
#
|
33
|
-
#
|
34
|
-
#
|
35
|
-
# * `:
|
36
|
-
#
|
37
|
-
# precision and can be between 10^-128 to 10^+126.
|
38
|
-
# * `:b` - (String) Binary attributes are sequences of unsigned
|
39
|
-
# bytes.
|
40
|
-
# * `:ss` - (Array<String>) A set of strings.
|
41
|
-
# * `:ns` - (Array<String>) A set of numbers.
|
42
|
-
# * `:bs` - (Array<String>) A set of binary attributes.
|
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
|
43
50
|
# * `:range_key_element` - (Hash) A range key element is treated as
|
44
51
|
# a secondary key (used in conjunction with the primary key), and
|
45
52
|
# can be a string or a number, and is only used for
|
46
53
|
# hash-and-range primary keys. The value can be String, Number,
|
47
54
|
# StringSet, NumberSet.
|
48
|
-
# * `:s` - (String)
|
49
|
-
#
|
50
|
-
#
|
51
|
-
#
|
52
|
-
# * `:
|
53
|
-
#
|
54
|
-
#
|
55
|
-
#
|
56
|
-
#
|
57
|
-
#
|
58
|
-
#
|
59
|
-
#
|
60
|
-
#
|
61
|
-
#
|
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.
|
62
69
|
# @return [Core::Response]
|
63
70
|
# The #data method of the response object returns
|
64
71
|
# a hash with the following structure:
|
@@ -94,58 +101,68 @@ module AWS
|
|
94
101
|
# @!method batch_write_item(options = {})
|
95
102
|
# Calls the BatchWriteItem API operation.
|
96
103
|
# @param [Hash] options
|
104
|
+
#
|
97
105
|
# * `:request_items` - *required* - (Hash<String,Array<Hash>>) A map of
|
98
|
-
# table
|
99
|
-
#
|
100
|
-
#
|
101
|
-
#
|
102
|
-
#
|
103
|
-
#
|
104
|
-
#
|
105
|
-
#
|
106
|
-
#
|
107
|
-
#
|
108
|
-
#
|
109
|
-
#
|
110
|
-
#
|
111
|
-
#
|
112
|
-
#
|
113
|
-
#
|
114
|
-
#
|
115
|
-
#
|
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.
|
116
145
|
# * `:hash_key_element` - *required* - (Hash) A hash key element
|
117
146
|
# is treated as the primary key, and can be a string or a
|
118
147
|
# number. Single attribute primary keys have one index value.
|
119
148
|
# The value can be String, Number, StringSet, NumberSet.
|
120
|
-
# * `:s` - (String)
|
121
|
-
#
|
122
|
-
#
|
123
|
-
#
|
124
|
-
# * `:
|
125
|
-
#
|
126
|
-
# 38 digits precision and can be between 10^-128 to 10^+126.
|
127
|
-
# * `:b` - (String) Binary attributes are sequences of unsigned
|
128
|
-
# bytes.
|
129
|
-
# * `:ss` - (Array<String>) A set of strings.
|
130
|
-
# * `:ns` - (Array<String>) A set of numbers.
|
131
|
-
# * `:bs` - (Array<String>) A set of binary attributes.
|
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
|
132
155
|
# * `:range_key_element` - (Hash) A range key element is treated
|
133
156
|
# as a secondary key (used in conjunction with the primary
|
134
157
|
# key), and can be a string or a number, and is only used for
|
135
158
|
# hash-and-range primary keys. The value can be String, Number,
|
136
159
|
# StringSet, NumberSet.
|
137
|
-
# * `:s` - (String)
|
138
|
-
#
|
139
|
-
#
|
140
|
-
#
|
141
|
-
# * `:
|
142
|
-
#
|
143
|
-
# 38 digits precision and can be between 10^-128 to 10^+126.
|
144
|
-
# * `:b` - (String) Binary attributes are sequences of unsigned
|
145
|
-
# bytes.
|
146
|
-
# * `:ss` - (Array<String>) A set of strings.
|
147
|
-
# * `:ns` - (Array<String>) A set of numbers.
|
148
|
-
# * `:bs` - (Array<String>) A set of binary attributes.
|
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
|
149
166
|
# @return [Core::Response]
|
150
167
|
# The #data method of the response object returns
|
151
168
|
# a hash with the following structure:
|
@@ -182,16 +199,27 @@ module AWS
|
|
182
199
|
# @!method create_table(options = {})
|
183
200
|
# Calls the CreateTable API operation.
|
184
201
|
# @param [Hash] options
|
185
|
-
#
|
186
|
-
#
|
187
|
-
#
|
188
|
-
# * `:key_schema` - *required* - (Hash)
|
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 .
|
189
217
|
# * `:hash_key_element` - *required* - (Hash) A hash key element is
|
190
218
|
# treated as the primary key, and can be a string or a number.
|
191
219
|
# Single attribute primary keys have one index value. The value can
|
192
220
|
# be String, Number, StringSet, NumberSet.
|
193
|
-
# * `:attribute_name` - *required* - (String)
|
194
|
-
#
|
221
|
+
# * `:attribute_name` - *required* - (String) Represents the name
|
222
|
+
# of a key attribute.
|
195
223
|
# * `:attribute_type` - *required* - (String) The AttributeType of
|
196
224
|
# the KeySchemaElement which can be a String or a Number. Valid
|
197
225
|
# values include:
|
@@ -203,8 +231,8 @@ module AWS
|
|
203
231
|
# be a string or a number, and is only used for hash-and-range
|
204
232
|
# primary keys. The value can be String, Number, StringSet,
|
205
233
|
# NumberSet.
|
206
|
-
# * `:attribute_name` - *required* - (String)
|
207
|
-
#
|
234
|
+
# * `:attribute_name` - *required* - (String) Represents the name
|
235
|
+
# of a key attribute.
|
208
236
|
# * `:attribute_type` - *required* - (String) The AttributeType of
|
209
237
|
# the KeySchemaElement which can be a String or a Number. Valid
|
210
238
|
# values include:
|
@@ -212,15 +240,14 @@ module AWS
|
|
212
240
|
# * `N`
|
213
241
|
# * `B`
|
214
242
|
# * `:provisioned_throughput` - *required* - (Hash)
|
215
|
-
# * `:read_capacity_units` - *required* - (Integer)
|
216
|
-
#
|
217
|
-
#
|
218
|
-
#
|
219
|
-
#
|
220
|
-
#
|
221
|
-
#
|
222
|
-
#
|
223
|
-
# WriteCapacityUnits.
|
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 .
|
224
251
|
# @return [Core::Response]
|
225
252
|
# The #data method of the response object returns
|
226
253
|
# a hash with the following structure:
|
@@ -248,61 +275,71 @@ module AWS
|
|
248
275
|
# @!method delete_item(options = {})
|
249
276
|
# Calls the DeleteItem API operation.
|
250
277
|
# @param [Hash] options
|
251
|
-
#
|
252
|
-
#
|
253
|
-
#
|
254
|
-
# * `:key` - *required* - (Hash)
|
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.
|
255
284
|
# * `:hash_key_element` - *required* - (Hash) A hash key element is
|
256
285
|
# treated as the primary key, and can be a string or a number.
|
257
286
|
# Single attribute primary keys have one index value. The value can
|
258
287
|
# be String, Number, StringSet, NumberSet.
|
259
|
-
# * `:s` - (String)
|
260
|
-
#
|
261
|
-
#
|
262
|
-
#
|
263
|
-
# * `:
|
264
|
-
#
|
265
|
-
# precision and can be between 10^-128 to 10^+126.
|
266
|
-
# * `:b` - (String) Binary attributes are sequences of unsigned
|
267
|
-
# bytes.
|
268
|
-
# * `:ss` - (Array<String>) A set of strings.
|
269
|
-
# * `:ns` - (Array<String>) A set of numbers.
|
270
|
-
# * `:bs` - (Array<String>) A set of binary attributes.
|
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
|
271
294
|
# * `:range_key_element` - (Hash) A range key element is treated as a
|
272
295
|
# secondary key (used in conjunction with the primary key), and can
|
273
296
|
# be a string or a number, and is only used for hash-and-range
|
274
297
|
# primary keys. The value can be String, Number, StringSet,
|
275
298
|
# NumberSet.
|
276
|
-
# * `:s` - (String)
|
277
|
-
#
|
278
|
-
#
|
279
|
-
#
|
280
|
-
# * `:
|
281
|
-
#
|
282
|
-
#
|
283
|
-
#
|
284
|
-
#
|
285
|
-
# * `:ss` - (Array<String>) A set of strings.
|
286
|
-
# * `:ns` - (Array<String>) A set of numbers.
|
287
|
-
# * `:bs` - (Array<String>) A set of binary attributes.
|
288
|
-
# * `:expected` - (Hash<String,Hash>)
|
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.
|
289
308
|
# * `:value` - (Hash) Specify whether or not a value already exists
|
290
309
|
# and has a specific content for the attribute name-value pair.
|
291
|
-
# * `:s` - (String)
|
292
|
-
#
|
293
|
-
#
|
294
|
-
#
|
295
|
-
# * `:
|
296
|
-
#
|
297
|
-
#
|
298
|
-
#
|
299
|
-
#
|
300
|
-
#
|
301
|
-
#
|
302
|
-
#
|
303
|
-
#
|
304
|
-
#
|
305
|
-
#
|
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:
|
306
343
|
# * `NONE`
|
307
344
|
# * `ALL_OLD`
|
308
345
|
# * `UPDATED_OLD`
|
@@ -324,9 +361,9 @@ module AWS
|
|
324
361
|
# @!method delete_table(options = {})
|
325
362
|
# Calls the DeleteTable API operation.
|
326
363
|
# @param [Hash] options
|
327
|
-
#
|
328
|
-
#
|
329
|
-
#
|
364
|
+
#
|
365
|
+
# * `:table_name` - *required* - (String) The name of the table to
|
366
|
+
# delete.
|
330
367
|
# @return [Core::Response]
|
331
368
|
# The #data method of the response object returns
|
332
369
|
# a hash with the following structure:
|
@@ -354,9 +391,9 @@ module AWS
|
|
354
391
|
# @!method describe_table(options = {})
|
355
392
|
# Calls the DescribeTable API operation.
|
356
393
|
# @param [Hash] options
|
357
|
-
#
|
358
|
-
#
|
359
|
-
#
|
394
|
+
#
|
395
|
+
# * `:table_name` - *required* - (String) The name of the table to
|
396
|
+
# describe.
|
360
397
|
# @return [Core::Response]
|
361
398
|
# The #data method of the response object returns
|
362
399
|
# a hash with the following structure:
|
@@ -384,43 +421,33 @@ module AWS
|
|
384
421
|
# @!method get_item(options = {})
|
385
422
|
# Calls the GetItem API operation.
|
386
423
|
# @param [Hash] options
|
387
|
-
#
|
388
|
-
#
|
389
|
-
#
|
390
|
-
# * `:key` - *required* - (Hash)
|
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.
|
391
430
|
# * `:hash_key_element` - *required* - (Hash) A hash key element is
|
392
431
|
# treated as the primary key, and can be a string or a number.
|
393
432
|
# Single attribute primary keys have one index value. The value can
|
394
433
|
# be String, Number, StringSet, NumberSet.
|
395
|
-
# * `:s` - (String)
|
396
|
-
#
|
397
|
-
#
|
398
|
-
#
|
399
|
-
# * `:
|
400
|
-
#
|
401
|
-
# precision and can be between 10^-128 to 10^+126.
|
402
|
-
# * `:b` - (String) Binary attributes are sequences of unsigned
|
403
|
-
# bytes.
|
404
|
-
# * `:ss` - (Array<String>) A set of strings.
|
405
|
-
# * `:ns` - (Array<String>) A set of numbers.
|
406
|
-
# * `:bs` - (Array<String>) A set of binary attributes.
|
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
|
407
440
|
# * `:range_key_element` - (Hash) A range key element is treated as a
|
408
441
|
# secondary key (used in conjunction with the primary key), and can
|
409
442
|
# be a string or a number, and is only used for hash-and-range
|
410
443
|
# primary keys. The value can be String, Number, StringSet,
|
411
444
|
# NumberSet.
|
412
|
-
# * `:s` - (String)
|
413
|
-
#
|
414
|
-
#
|
415
|
-
#
|
416
|
-
# * `:
|
417
|
-
#
|
418
|
-
# precision and can be between 10^-128 to 10^+126.
|
419
|
-
# * `:b` - (String) Binary attributes are sequences of unsigned
|
420
|
-
# bytes.
|
421
|
-
# * `:ss` - (Array<String>) A set of strings.
|
422
|
-
# * `:ns` - (Array<String>) A set of numbers.
|
423
|
-
# * `:bs` - (Array<String>) A set of binary attributes.
|
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
|
424
451
|
# * `:attributes_to_get` - (Array<String>)
|
425
452
|
# * `:consistent_read` - (Boolean)
|
426
453
|
# @return [Core::Response]
|
@@ -439,11 +466,12 @@ module AWS
|
|
439
466
|
# @!method list_tables(options = {})
|
440
467
|
# Calls the ListTables API operation.
|
441
468
|
# @param [Hash] options
|
469
|
+
#
|
442
470
|
# * `:exclusive_start_table_name` - (String) The name of the table that
|
443
471
|
# starts the list. If you already ran a ListTables operation and
|
444
|
-
#
|
472
|
+
# received a LastEvaluatedTableName value in the response, use that
|
445
473
|
# value here to continue the list.
|
446
|
-
# * `:limit` - (Integer)
|
474
|
+
# * `:limit` - (Integer) A maximum number of table names to return.
|
447
475
|
# @return [Core::Response]
|
448
476
|
# The #data method of the response object returns
|
449
477
|
# a hash with the following structure:
|
@@ -454,40 +482,62 @@ module AWS
|
|
454
482
|
# @!method put_item(options = {})
|
455
483
|
# Calls the PutItem API operation.
|
456
484
|
# @param [Hash] options
|
457
|
-
#
|
458
|
-
#
|
459
|
-
#
|
460
|
-
# * `:item` - *required* - (Hash<String,Hash>)
|
461
|
-
#
|
462
|
-
#
|
463
|
-
#
|
464
|
-
#
|
465
|
-
#
|
466
|
-
#
|
467
|
-
#
|
468
|
-
# * `:
|
469
|
-
#
|
470
|
-
# * `:
|
471
|
-
# * `:
|
472
|
-
# * `:
|
473
|
-
#
|
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.
|
474
505
|
# * `:value` - (Hash) Specify whether or not a value already exists
|
475
506
|
# and has a specific content for the attribute name-value pair.
|
476
|
-
# * `:s` - (String)
|
477
|
-
#
|
478
|
-
#
|
479
|
-
#
|
480
|
-
# * `:
|
481
|
-
#
|
482
|
-
#
|
483
|
-
#
|
484
|
-
#
|
485
|
-
#
|
486
|
-
#
|
487
|
-
#
|
488
|
-
#
|
489
|
-
#
|
490
|
-
#
|
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:
|
491
541
|
# * `NONE`
|
492
542
|
# * `ALL_OLD`
|
493
543
|
# * `UPDATED_OLD`
|
@@ -509,18 +559,14 @@ module AWS
|
|
509
559
|
# @!method query(options = {})
|
510
560
|
# Calls the Query API operation.
|
511
561
|
# @param [Hash] options
|
512
|
-
#
|
513
|
-
#
|
514
|
-
#
|
515
|
-
# * `:attributes_to_get` - (Array<String>)
|
516
|
-
#
|
517
|
-
#
|
518
|
-
#
|
519
|
-
#
|
520
|
-
# query. Also, if the result set size exceeds 1MB before Amazon
|
521
|
-
# DynamoDB hits this limit, it stops the query and returns the
|
522
|
-
# matching values, and a LastEvaluatedKey to apply in a subsequent
|
523
|
-
# operation to continue the query.
|
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)
|
524
570
|
# * `:consistent_read` - (Boolean)
|
525
571
|
# * `:count` - (Boolean) If set to `true` , Amazon DynamoDB returns a
|
526
572
|
# total number of items that match the query parameters, instead of a
|
@@ -529,35 +575,108 @@ module AWS
|
|
529
575
|
# Amazon DynamoDB returns a validation error.
|
530
576
|
# * `:hash_key_value` - *required* - (Hash) Attribute value of the hash
|
531
577
|
# component of the composite primary key.
|
532
|
-
# * `:s` - (String)
|
533
|
-
#
|
534
|
-
#
|
535
|
-
#
|
536
|
-
# * `:
|
537
|
-
#
|
538
|
-
# precision and can be between 10^-128 to 10^+126.
|
539
|
-
# * `:b` - (String) Binary attributes are sequences of unsigned
|
540
|
-
# bytes.
|
541
|
-
# * `:ss` - (Array<String>) A set of strings.
|
542
|
-
# * `:ns` - (Array<String>) A set of numbers.
|
543
|
-
# * `:bs` - (Array<String>) A set of binary attributes.
|
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
|
544
584
|
# * `:range_key_condition` - (Hash) A container for the attribute
|
545
585
|
# values and comparison operators to use for the query.
|
546
|
-
# * `:attribute_value_list` - (Array<Hash>)
|
547
|
-
#
|
548
|
-
#
|
549
|
-
#
|
550
|
-
#
|
551
|
-
#
|
552
|
-
#
|
553
|
-
#
|
554
|
-
#
|
555
|
-
#
|
556
|
-
#
|
557
|
-
#
|
558
|
-
# * `:
|
559
|
-
#
|
560
|
-
#
|
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:
|
561
680
|
# * `EQ`
|
562
681
|
# * `NE`
|
563
682
|
# * `IN`
|
@@ -571,50 +690,37 @@ module AWS
|
|
571
690
|
# * `CONTAINS`
|
572
691
|
# * `NOT_CONTAINS`
|
573
692
|
# * `BEGINS_WITH`
|
574
|
-
# * `:scan_index_forward` - (Boolean) Specifies
|
575
|
-
# traversal of the index.
|
576
|
-
# the requested order
|
577
|
-
#
|
578
|
-
#
|
579
|
-
#
|
580
|
-
#
|
581
|
-
#
|
582
|
-
#
|
583
|
-
#
|
584
|
-
# that point.
|
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)
|
585
703
|
# * `:hash_key_element` - *required* - (Hash) A hash key element is
|
586
704
|
# treated as the primary key, and can be a string or a number.
|
587
705
|
# Single attribute primary keys have one index value. The value can
|
588
706
|
# be String, Number, StringSet, NumberSet.
|
589
|
-
# * `:s` - (String)
|
590
|
-
#
|
591
|
-
#
|
592
|
-
#
|
593
|
-
# * `:
|
594
|
-
#
|
595
|
-
# precision and can be between 10^-128 to 10^+126.
|
596
|
-
# * `:b` - (String) Binary attributes are sequences of unsigned
|
597
|
-
# bytes.
|
598
|
-
# * `:ss` - (Array<String>) A set of strings.
|
599
|
-
# * `:ns` - (Array<String>) A set of numbers.
|
600
|
-
# * `:bs` - (Array<String>) A set of binary attributes.
|
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
|
601
713
|
# * `:range_key_element` - (Hash) A range key element is treated as a
|
602
714
|
# secondary key (used in conjunction with the primary key), and can
|
603
715
|
# be a string or a number, and is only used for hash-and-range
|
604
716
|
# primary keys. The value can be String, Number, StringSet,
|
605
717
|
# NumberSet.
|
606
|
-
# * `:s` - (String)
|
607
|
-
#
|
608
|
-
#
|
609
|
-
#
|
610
|
-
# * `:
|
611
|
-
#
|
612
|
-
# precision and can be between 10^-128 to 10^+126.
|
613
|
-
# * `:b` - (String) Binary attributes are sequences of unsigned
|
614
|
-
# bytes.
|
615
|
-
# * `:ss` - (Array<String>) A set of strings.
|
616
|
-
# * `:ns` - (Array<String>) A set of numbers.
|
617
|
-
# * `:bs` - (Array<String>) A set of binary attributes.
|
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
|
618
724
|
# @return [Core::Response]
|
619
725
|
# The #data method of the response object returns
|
620
726
|
# a hash with the following structure:
|
@@ -647,40 +753,198 @@ module AWS
|
|
647
753
|
# @!method scan(options = {})
|
648
754
|
# Calls the Scan API operation.
|
649
755
|
# @param [Hash] options
|
650
|
-
#
|
651
|
-
#
|
652
|
-
#
|
756
|
+
#
|
757
|
+
# * `:table_name` - *required* - (String) The name of the table
|
758
|
+
# containing the requested items.
|
653
759
|
# * `:attributes_to_get` - (Array<String>)
|
654
|
-
# * `:limit` - (Integer)
|
655
|
-
# Amazon DynamoDB hits this limit while scanning the table, it stops
|
656
|
-
# the scan and returns the matching values up to the limit, and a
|
657
|
-
# LastEvaluatedKey to apply in a subsequent operation to continue the
|
658
|
-
# scan. Also, if the scanned data set size exceeds 1MB before Amazon
|
659
|
-
# DynamoDB hits this limit, it stops the scan and returns the
|
660
|
-
# matching values up to the limit, and a LastEvaluatedKey to apply in
|
661
|
-
# a subsequent operation to continue the scan.
|
760
|
+
# * `:limit` - (Integer)
|
662
761
|
# * `:count` - (Boolean) If set to `true` , Amazon DynamoDB returns a
|
663
762
|
# total number of items for the Scan operation, even if the operation
|
664
763
|
# has no matching items for the assigned filter. Do not set Count to
|
665
764
|
# `true` while providing a list of AttributesToGet, otherwise Amazon
|
666
765
|
# DynamoDB returns a validation error.
|
667
766
|
# * `:scan_filter` - (Hash<String,Hash>) Evaluates the scan results and
|
668
|
-
# returns only the desired values.
|
669
|
-
#
|
670
|
-
#
|
671
|
-
#
|
672
|
-
#
|
673
|
-
#
|
674
|
-
#
|
675
|
-
#
|
676
|
-
#
|
677
|
-
#
|
678
|
-
#
|
679
|
-
#
|
680
|
-
#
|
681
|
-
#
|
682
|
-
#
|
683
|
-
#
|
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:
|
684
948
|
# * `EQ`
|
685
949
|
# * `NE`
|
686
950
|
# * `IN`
|
@@ -694,45 +958,30 @@ module AWS
|
|
694
958
|
# * `CONTAINS`
|
695
959
|
# * `NOT_CONTAINS`
|
696
960
|
# * `BEGINS_WITH`
|
697
|
-
# * `:exclusive_start_key` - (Hash)
|
698
|
-
#
|
699
|
-
#
|
700
|
-
# entire table; either because of the result set size or the Limit
|
701
|
-
# parameter. The LastEvaluatedKey can be passed back in a new scan
|
702
|
-
# request to continue the operation from that point.
|
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.
|
703
964
|
# * `:hash_key_element` - *required* - (Hash) A hash key element is
|
704
965
|
# treated as the primary key, and can be a string or a number.
|
705
966
|
# Single attribute primary keys have one index value. The value can
|
706
967
|
# be String, Number, StringSet, NumberSet.
|
707
|
-
# * `:s` - (String)
|
708
|
-
#
|
709
|
-
#
|
710
|
-
#
|
711
|
-
# * `:
|
712
|
-
#
|
713
|
-
# precision and can be between 10^-128 to 10^+126.
|
714
|
-
# * `:b` - (String) Binary attributes are sequences of unsigned
|
715
|
-
# bytes.
|
716
|
-
# * `:ss` - (Array<String>) A set of strings.
|
717
|
-
# * `:ns` - (Array<String>) A set of numbers.
|
718
|
-
# * `:bs` - (Array<String>) A set of binary attributes.
|
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
|
719
974
|
# * `:range_key_element` - (Hash) A range key element is treated as a
|
720
975
|
# secondary key (used in conjunction with the primary key), and can
|
721
976
|
# be a string or a number, and is only used for hash-and-range
|
722
977
|
# primary keys. The value can be String, Number, StringSet,
|
723
978
|
# NumberSet.
|
724
|
-
# * `:s` - (String)
|
725
|
-
#
|
726
|
-
#
|
727
|
-
#
|
728
|
-
# * `:
|
729
|
-
#
|
730
|
-
# precision and can be between 10^-128 to 10^+126.
|
731
|
-
# * `:b` - (String) Binary attributes are sequences of unsigned
|
732
|
-
# bytes.
|
733
|
-
# * `:ss` - (Array<String>) A set of strings.
|
734
|
-
# * `:ns` - (Array<String>) A set of numbers.
|
735
|
-
# * `:bs` - (Array<String>) A set of binary attributes.
|
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
|
736
985
|
# @return [Core::Response]
|
737
986
|
# The #data method of the response object returns
|
738
987
|
# a hash with the following structure:
|
@@ -766,79 +1015,197 @@ module AWS
|
|
766
1015
|
# @!method update_item(options = {})
|
767
1016
|
# Calls the UpdateItem API operation.
|
768
1017
|
# @param [Hash] options
|
769
|
-
#
|
770
|
-
#
|
771
|
-
#
|
772
|
-
# * `:key` - *required* - (Hash)
|
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.
|
773
1024
|
# * `:hash_key_element` - *required* - (Hash) A hash key element is
|
774
1025
|
# treated as the primary key, and can be a string or a number.
|
775
1026
|
# Single attribute primary keys have one index value. The value can
|
776
1027
|
# be String, Number, StringSet, NumberSet.
|
777
|
-
# * `:s` - (String)
|
778
|
-
#
|
779
|
-
#
|
780
|
-
#
|
781
|
-
# * `:
|
782
|
-
#
|
783
|
-
# precision and can be between 10^-128 to 10^+126.
|
784
|
-
# * `:b` - (String) Binary attributes are sequences of unsigned
|
785
|
-
# bytes.
|
786
|
-
# * `:ss` - (Array<String>) A set of strings.
|
787
|
-
# * `:ns` - (Array<String>) A set of numbers.
|
788
|
-
# * `:bs` - (Array<String>) A set of binary attributes.
|
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
|
789
1034
|
# * `:range_key_element` - (Hash) A range key element is treated as a
|
790
1035
|
# secondary key (used in conjunction with the primary key), and can
|
791
1036
|
# be a string or a number, and is only used for hash-and-range
|
792
1037
|
# primary keys. The value can be String, Number, StringSet,
|
793
1038
|
# NumberSet.
|
794
|
-
# * `:s` - (String)
|
795
|
-
#
|
796
|
-
#
|
797
|
-
#
|
798
|
-
# * `:
|
799
|
-
#
|
800
|
-
#
|
801
|
-
#
|
802
|
-
#
|
803
|
-
#
|
804
|
-
#
|
805
|
-
#
|
806
|
-
#
|
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.
|
807
1107
|
# * `:value` - (Hash)
|
808
|
-
# * `:s` - (String)
|
809
|
-
#
|
810
|
-
#
|
811
|
-
#
|
812
|
-
# * `:
|
813
|
-
#
|
814
|
-
#
|
815
|
-
#
|
816
|
-
#
|
817
|
-
#
|
818
|
-
#
|
819
|
-
#
|
820
|
-
#
|
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:
|
821
1163
|
# * `ADD`
|
822
1164
|
# * `PUT`
|
823
1165
|
# * `DELETE`
|
824
|
-
# * `:expected` - (Hash<String,Hash>)
|
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.
|
825
1169
|
# * `:value` - (Hash) Specify whether or not a value already exists
|
826
1170
|
# and has a specific content for the attribute name-value pair.
|
827
|
-
# * `:s` - (String)
|
828
|
-
#
|
829
|
-
#
|
830
|
-
#
|
831
|
-
# * `:
|
832
|
-
#
|
833
|
-
#
|
834
|
-
#
|
835
|
-
#
|
836
|
-
#
|
837
|
-
#
|
838
|
-
#
|
839
|
-
#
|
840
|
-
#
|
841
|
-
#
|
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:
|
842
1209
|
# * `NONE`
|
843
1210
|
# * `ALL_OLD`
|
844
1211
|
# * `UPDATED_OLD`
|
@@ -860,19 +1227,18 @@ module AWS
|
|
860
1227
|
# @!method update_table(options = {})
|
861
1228
|
# Calls the UpdateTable API operation.
|
862
1229
|
# @param [Hash] options
|
863
|
-
#
|
864
|
-
#
|
865
|
-
#
|
1230
|
+
#
|
1231
|
+
# * `:table_name` - *required* - (String) The name of the table to be
|
1232
|
+
# updated.
|
866
1233
|
# * `:provisioned_throughput` - *required* - (Hash)
|
867
|
-
# * `:read_capacity_units` - *required* - (Integer)
|
868
|
-
#
|
869
|
-
#
|
870
|
-
#
|
871
|
-
#
|
872
|
-
#
|
873
|
-
#
|
874
|
-
#
|
875
|
-
# WriteCapacityUnits.
|
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 .
|
876
1242
|
# @return [Core::Response]
|
877
1243
|
# The #data method of the response object returns
|
878
1244
|
# a hash with the following structure:
|