aws-sdk-dynamodb 1.93.0 → 1.110.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 +4 -4
- data/CHANGELOG.md +92 -0
- data/VERSION +1 -1
- data/lib/aws-sdk-dynamodb/client.rb +778 -279
- data/lib/aws-sdk-dynamodb/client_api.rb +195 -34
- data/lib/aws-sdk-dynamodb/customizations/client.rb +5 -3
- data/lib/aws-sdk-dynamodb/endpoint_provider.rb +2 -2
- data/lib/aws-sdk-dynamodb/endpoints.rb +56 -0
- data/lib/aws-sdk-dynamodb/errors.rb +16 -0
- data/lib/aws-sdk-dynamodb/plugins/endpoints.rb +12 -2
- data/lib/aws-sdk-dynamodb/plugins/simple_attributes.rb +21 -7
- data/lib/aws-sdk-dynamodb/resource.rb +44 -14
- data/lib/aws-sdk-dynamodb/table.rb +48 -16
- data/lib/aws-sdk-dynamodb/types.rb +677 -105
- data/lib/aws-sdk-dynamodb.rb +1 -1
- data/sig/client.rbs +1494 -0
- data/sig/errors.rbs +114 -0
- data/sig/resource.rbs +205 -0
- data/sig/table.rbs +359 -0
- data/sig/types.rbs +1811 -0
- data/sig/waiters.rbs +33 -0
- metadata +15 -9
@@ -21,9 +21,11 @@ module Aws
|
|
21
21
|
def data_to_http_resp(operation_name, data)
|
22
22
|
api = config.api
|
23
23
|
operation = api.operation(operation_name)
|
24
|
-
|
25
|
-
|
26
|
-
|
24
|
+
if config.simple_attributes
|
25
|
+
translator = Plugins::SimpleAttributes::ValueTranslator
|
26
|
+
translator = translator.new(operation.output, :marshal)
|
27
|
+
data = translator.apply(data)
|
28
|
+
end
|
27
29
|
ParamValidator.validate!(operation.output, data)
|
28
30
|
protocol_helper.stub_data(api, operation, data)
|
29
31
|
end
|
@@ -32,8 +32,8 @@ module Aws::DynamoDB
|
|
32
32
|
raise ArgumentError, "FIPS and DualStack are enabled, but this partition does not support one or both"
|
33
33
|
end
|
34
34
|
if Aws::Endpoints::Matchers.boolean_equals?(use_fips, true)
|
35
|
-
if Aws::Endpoints::Matchers.boolean_equals?(
|
36
|
-
if Aws::Endpoints::Matchers.string_equals?(
|
35
|
+
if Aws::Endpoints::Matchers.boolean_equals?(Aws::Endpoints::Matchers.attr(partition_result, "supportsFIPS"), true)
|
36
|
+
if Aws::Endpoints::Matchers.string_equals?(Aws::Endpoints::Matchers.attr(partition_result, "name"), "aws-us-gov")
|
37
37
|
return Aws::Endpoints::Endpoint.new(url: "https://dynamodb.#{region}.amazonaws.com", headers: {}, properties: {})
|
38
38
|
end
|
39
39
|
return Aws::Endpoints::Endpoint.new(url: "https://dynamodb-fips.#{region}.#{partition_result['dnsSuffix']}", headers: {}, properties: {})
|
@@ -124,6 +124,20 @@ module Aws::DynamoDB
|
|
124
124
|
end
|
125
125
|
end
|
126
126
|
|
127
|
+
class DeleteResourcePolicy
|
128
|
+
def self.build(context)
|
129
|
+
unless context.config.regional_endpoint
|
130
|
+
endpoint = context.config.endpoint.to_s
|
131
|
+
end
|
132
|
+
Aws::DynamoDB::EndpointParameters.new(
|
133
|
+
region: context.config.region,
|
134
|
+
use_dual_stack: context.config.use_dualstack_endpoint,
|
135
|
+
use_fips: context.config.use_fips_endpoint,
|
136
|
+
endpoint: endpoint,
|
137
|
+
)
|
138
|
+
end
|
139
|
+
end
|
140
|
+
|
127
141
|
class DeleteTable
|
128
142
|
def self.build(context)
|
129
143
|
unless context.config.regional_endpoint
|
@@ -404,6 +418,20 @@ module Aws::DynamoDB
|
|
404
418
|
end
|
405
419
|
end
|
406
420
|
|
421
|
+
class GetResourcePolicy
|
422
|
+
def self.build(context)
|
423
|
+
unless context.config.regional_endpoint
|
424
|
+
endpoint = context.config.endpoint.to_s
|
425
|
+
end
|
426
|
+
Aws::DynamoDB::EndpointParameters.new(
|
427
|
+
region: context.config.region,
|
428
|
+
use_dual_stack: context.config.use_dualstack_endpoint,
|
429
|
+
use_fips: context.config.use_fips_endpoint,
|
430
|
+
endpoint: endpoint,
|
431
|
+
)
|
432
|
+
end
|
433
|
+
end
|
434
|
+
|
407
435
|
class ImportTable
|
408
436
|
def self.build(context)
|
409
437
|
unless context.config.regional_endpoint
|
@@ -530,6 +558,20 @@ module Aws::DynamoDB
|
|
530
558
|
end
|
531
559
|
end
|
532
560
|
|
561
|
+
class PutResourcePolicy
|
562
|
+
def self.build(context)
|
563
|
+
unless context.config.regional_endpoint
|
564
|
+
endpoint = context.config.endpoint.to_s
|
565
|
+
end
|
566
|
+
Aws::DynamoDB::EndpointParameters.new(
|
567
|
+
region: context.config.region,
|
568
|
+
use_dual_stack: context.config.use_dualstack_endpoint,
|
569
|
+
use_fips: context.config.use_fips_endpoint,
|
570
|
+
endpoint: endpoint,
|
571
|
+
)
|
572
|
+
end
|
573
|
+
end
|
574
|
+
|
533
575
|
class Query
|
534
576
|
def self.build(context)
|
535
577
|
unless context.config.regional_endpoint
|
@@ -712,6 +754,20 @@ module Aws::DynamoDB
|
|
712
754
|
end
|
713
755
|
end
|
714
756
|
|
757
|
+
class UpdateKinesisStreamingDestination
|
758
|
+
def self.build(context)
|
759
|
+
unless context.config.regional_endpoint
|
760
|
+
endpoint = context.config.endpoint.to_s
|
761
|
+
end
|
762
|
+
Aws::DynamoDB::EndpointParameters.new(
|
763
|
+
region: context.config.region,
|
764
|
+
use_dual_stack: context.config.use_dualstack_endpoint,
|
765
|
+
use_fips: context.config.use_fips_endpoint,
|
766
|
+
endpoint: endpoint,
|
767
|
+
)
|
768
|
+
end
|
769
|
+
end
|
770
|
+
|
715
771
|
class UpdateTable
|
716
772
|
def self.build(context)
|
717
773
|
unless context.config.regional_endpoint
|
@@ -46,6 +46,7 @@ module Aws::DynamoDB
|
|
46
46
|
# * {ItemCollectionSizeLimitExceededException}
|
47
47
|
# * {LimitExceededException}
|
48
48
|
# * {PointInTimeRecoveryUnavailableException}
|
49
|
+
# * {PolicyNotFoundException}
|
49
50
|
# * {ProvisionedThroughputExceededException}
|
50
51
|
# * {ReplicaAlreadyExistsException}
|
51
52
|
# * {ReplicaNotFoundException}
|
@@ -355,6 +356,21 @@ module Aws::DynamoDB
|
|
355
356
|
end
|
356
357
|
end
|
357
358
|
|
359
|
+
class PolicyNotFoundException < ServiceError
|
360
|
+
|
361
|
+
# @param [Seahorse::Client::RequestContext] context
|
362
|
+
# @param [String] message
|
363
|
+
# @param [Aws::DynamoDB::Types::PolicyNotFoundException] data
|
364
|
+
def initialize(context, message, data = Aws::EmptyStructure.new)
|
365
|
+
super(context, message, data)
|
366
|
+
end
|
367
|
+
|
368
|
+
# @return [String]
|
369
|
+
def message
|
370
|
+
@message || @data[:message]
|
371
|
+
end
|
372
|
+
end
|
373
|
+
|
358
374
|
class ProvisionedThroughputExceededException < ServiceError
|
359
375
|
|
360
376
|
# @param [Seahorse::Client::RequestContext] context
|
@@ -14,6 +14,7 @@ module Aws::DynamoDB
|
|
14
14
|
option(
|
15
15
|
:endpoint_provider,
|
16
16
|
doc_type: 'Aws::DynamoDB::EndpointProvider',
|
17
|
+
rbs_type: 'untyped',
|
17
18
|
docstring: 'The endpoint provider used to resolve endpoints. Any '\
|
18
19
|
'object that responds to `#resolve_endpoint(parameters)` '\
|
19
20
|
'where `parameters` is a Struct similar to '\
|
@@ -25,16 +26,17 @@ module Aws::DynamoDB
|
|
25
26
|
# @api private
|
26
27
|
class Handler < Seahorse::Client::Handler
|
27
28
|
def call(context)
|
28
|
-
# If endpoint was discovered, do not resolve or apply the endpoint.
|
29
29
|
unless context[:discovered_endpoint]
|
30
30
|
params = parameters_for_operation(context)
|
31
31
|
endpoint = context.config.endpoint_provider.resolve_endpoint(params)
|
32
32
|
|
33
33
|
context.http_request.endpoint = endpoint.url
|
34
34
|
apply_endpoint_headers(context, endpoint.headers)
|
35
|
+
|
36
|
+
context[:endpoint_params] = params
|
37
|
+
context[:endpoint_properties] = endpoint.properties
|
35
38
|
end
|
36
39
|
|
37
|
-
context[:endpoint_params] = params
|
38
40
|
context[:auth_scheme] =
|
39
41
|
Aws::Endpoints.resolve_auth_scheme(context, endpoint)
|
40
42
|
|
@@ -72,6 +74,8 @@ module Aws::DynamoDB
|
|
72
74
|
Aws::DynamoDB::Endpoints::DeleteBackup.build(context)
|
73
75
|
when :delete_item
|
74
76
|
Aws::DynamoDB::Endpoints::DeleteItem.build(context)
|
77
|
+
when :delete_resource_policy
|
78
|
+
Aws::DynamoDB::Endpoints::DeleteResourcePolicy.build(context)
|
75
79
|
when :delete_table
|
76
80
|
Aws::DynamoDB::Endpoints::DeleteTable.build(context)
|
77
81
|
when :describe_backup
|
@@ -112,6 +116,8 @@ module Aws::DynamoDB
|
|
112
116
|
Aws::DynamoDB::Endpoints::ExportTableToPointInTime.build(context)
|
113
117
|
when :get_item
|
114
118
|
Aws::DynamoDB::Endpoints::GetItem.build(context)
|
119
|
+
when :get_resource_policy
|
120
|
+
Aws::DynamoDB::Endpoints::GetResourcePolicy.build(context)
|
115
121
|
when :import_table
|
116
122
|
Aws::DynamoDB::Endpoints::ImportTable.build(context)
|
117
123
|
when :list_backups
|
@@ -130,6 +136,8 @@ module Aws::DynamoDB
|
|
130
136
|
Aws::DynamoDB::Endpoints::ListTagsOfResource.build(context)
|
131
137
|
when :put_item
|
132
138
|
Aws::DynamoDB::Endpoints::PutItem.build(context)
|
139
|
+
when :put_resource_policy
|
140
|
+
Aws::DynamoDB::Endpoints::PutResourcePolicy.build(context)
|
133
141
|
when :query
|
134
142
|
Aws::DynamoDB::Endpoints::Query.build(context)
|
135
143
|
when :restore_table_from_backup
|
@@ -156,6 +164,8 @@ module Aws::DynamoDB
|
|
156
164
|
Aws::DynamoDB::Endpoints::UpdateGlobalTableSettings.build(context)
|
157
165
|
when :update_item
|
158
166
|
Aws::DynamoDB::Endpoints::UpdateItem.build(context)
|
167
|
+
when :update_kinesis_streaming_destination
|
168
|
+
Aws::DynamoDB::Endpoints::UpdateKinesisStreamingDestination.build(context)
|
159
169
|
when :update_table
|
160
170
|
Aws::DynamoDB::Endpoints::UpdateTable.build(context)
|
161
171
|
when :update_table_replica_auto_scaling
|
@@ -83,11 +83,11 @@ module Aws
|
|
83
83
|
# # note that the request `:key` had to be type prefixed
|
84
84
|
# resp = dynamodb.get(table_name: 'aws-sdk', key: { 'id' => { s: 'uuid' }})
|
85
85
|
# resp.item
|
86
|
-
#
|
87
|
-
#
|
88
|
-
#
|
89
|
-
#
|
90
|
-
#
|
86
|
+
# {
|
87
|
+
# "id"=> <struct s='uuid', n=nil, b=nil, ss=nil, ns=nil, bs=nil, m=nil, l=nil, null=nil, bool=nil>
|
88
|
+
# "age"=> <struct s=nil, n="35", b=nil, ss=nil, ns=nil, bs=nil, m=nil, l=nil, null=nil, bool=nil>
|
89
|
+
# ...
|
90
|
+
# }
|
91
91
|
#
|
92
92
|
class SimpleAttributes < Seahorse::Client::Plugin
|
93
93
|
|
@@ -119,12 +119,15 @@ their types specified, e.g. `{ s: 'abc' }` instead of simply
|
|
119
119
|
@handler.call(context).on(200) do |response|
|
120
120
|
response.data = translate_output(response)
|
121
121
|
end
|
122
|
+
rescue Aws::Errors::ServiceError => e
|
123
|
+
e.data = translate_error_data(context, e.data)
|
124
|
+
raise e
|
122
125
|
end
|
123
126
|
|
124
127
|
private
|
125
128
|
|
126
129
|
def translate_input(context)
|
127
|
-
if shape = context.operation.input
|
130
|
+
if (shape = context.operation.input)
|
128
131
|
ValueTranslator.new(shape, :marshal).apply(context.params)
|
129
132
|
else
|
130
133
|
context.params
|
@@ -132,13 +135,24 @@ their types specified, e.g. `{ s: 'abc' }` instead of simply
|
|
132
135
|
end
|
133
136
|
|
134
137
|
def translate_output(response)
|
135
|
-
if shape = response.context.operation.output
|
138
|
+
if (shape = response.context.operation.output)
|
136
139
|
ValueTranslator.new(shape, :unmarshal).apply(response.data)
|
137
140
|
else
|
138
141
|
response.data
|
139
142
|
end
|
140
143
|
end
|
141
144
|
|
145
|
+
def translate_error_data(context, error_data)
|
146
|
+
shape = context.operation.errors.find do |e|
|
147
|
+
error_data.is_a?(e.shape.struct_class)
|
148
|
+
end
|
149
|
+
if shape
|
150
|
+
ValueTranslator.new(shape, :unmarshal).apply(error_data)
|
151
|
+
else
|
152
|
+
error_data
|
153
|
+
end
|
154
|
+
end
|
155
|
+
|
142
156
|
end
|
143
157
|
|
144
158
|
# @api private
|
@@ -39,7 +39,7 @@ module Aws::DynamoDB
|
|
39
39
|
#
|
40
40
|
# dynamo_db.batch_get_item({
|
41
41
|
# request_items: { # required
|
42
|
-
# "
|
42
|
+
# "TableArn" => {
|
43
43
|
# keys: [ # required
|
44
44
|
# {
|
45
45
|
# "AttributeName" => "value", # value <Hash,Array,String,Numeric,Boolean,IO,Set,nil>
|
@@ -57,9 +57,9 @@ module Aws::DynamoDB
|
|
57
57
|
# })
|
58
58
|
# @param [Hash] options ({})
|
59
59
|
# @option options [required, Hash<String,Types::KeysAndAttributes>] :request_items
|
60
|
-
# A map of one or more table names and, for each table, a
|
61
|
-
# describes one or more items to retrieve from that table. Each
|
62
|
-
# name can be used only once per `BatchGetItem` request.
|
60
|
+
# A map of one or more table names or table ARNs and, for each table, a
|
61
|
+
# map that describes one or more items to retrieve from that table. Each
|
62
|
+
# table name or ARN can be used only once per `BatchGetItem` request.
|
63
63
|
#
|
64
64
|
# Each element in the map of items to retrieve consists of the
|
65
65
|
# following:
|
@@ -170,7 +170,7 @@ module Aws::DynamoDB
|
|
170
170
|
#
|
171
171
|
# dynamo_db.batch_write_item({
|
172
172
|
# request_items: { # required
|
173
|
-
# "
|
173
|
+
# "TableArn" => [
|
174
174
|
# {
|
175
175
|
# put_request: {
|
176
176
|
# item: { # required
|
@@ -190,9 +190,9 @@ module Aws::DynamoDB
|
|
190
190
|
# })
|
191
191
|
# @param [Hash] options ({})
|
192
192
|
# @option options [required, Hash<String,Array>] :request_items
|
193
|
-
# A map of one or more table names and, for each table, a
|
194
|
-
# operations to be performed (`DeleteRequest` or `PutRequest`).
|
195
|
-
# element in the map consists of the following:
|
193
|
+
# A map of one or more table names or table ARNs and, for each table, a
|
194
|
+
# list of operations to be performed (`DeleteRequest` or `PutRequest`).
|
195
|
+
# Each element in the map consists of the following:
|
196
196
|
#
|
197
197
|
# * `DeleteRequest` - Perform a `DeleteItem` operation on the specified
|
198
198
|
# item. The item to be deleted is identified by a `Key` subelement:
|
@@ -258,7 +258,7 @@ module Aws::DynamoDB
|
|
258
258
|
# attribute_type: "S", # required, accepts S, N, B
|
259
259
|
# },
|
260
260
|
# ],
|
261
|
-
# table_name: "
|
261
|
+
# table_name: "TableArn", # required
|
262
262
|
# key_schema: [ # required
|
263
263
|
# {
|
264
264
|
# attribute_name: "KeySchemaAttributeName", # required
|
@@ -297,6 +297,10 @@ module Aws::DynamoDB
|
|
297
297
|
# read_capacity_units: 1, # required
|
298
298
|
# write_capacity_units: 1, # required
|
299
299
|
# },
|
300
|
+
# on_demand_throughput: {
|
301
|
+
# max_read_request_units: 1,
|
302
|
+
# max_write_request_units: 1,
|
303
|
+
# },
|
300
304
|
# },
|
301
305
|
# ],
|
302
306
|
# billing_mode: "PROVISIONED", # accepts PROVISIONED, PAY_PER_REQUEST
|
@@ -321,13 +325,19 @@ module Aws::DynamoDB
|
|
321
325
|
# ],
|
322
326
|
# table_class: "STANDARD", # accepts STANDARD, STANDARD_INFREQUENT_ACCESS
|
323
327
|
# deletion_protection_enabled: false,
|
328
|
+
# resource_policy: "ResourcePolicy",
|
329
|
+
# on_demand_throughput: {
|
330
|
+
# max_read_request_units: 1,
|
331
|
+
# max_write_request_units: 1,
|
332
|
+
# },
|
324
333
|
# })
|
325
334
|
# @param [Hash] options ({})
|
326
335
|
# @option options [required, Array<Types::AttributeDefinition>] :attribute_definitions
|
327
336
|
# An array of attributes that describe the key schema for the table and
|
328
337
|
# indexes.
|
329
338
|
# @option options [required, String] :table_name
|
330
|
-
# The name of the table to create.
|
339
|
+
# The name of the table to create. You can also provide the Amazon
|
340
|
+
# Resource Name (ARN) of the table in this parameter.
|
331
341
|
# @option options [required, Array<Types::KeySchemaElement>] :key_schema
|
332
342
|
# Specifies the attributes that make up the primary key for a table or
|
333
343
|
# an index. The attributes in `KeySchema` must also be defined in the
|
@@ -457,16 +467,16 @@ module Aws::DynamoDB
|
|
457
467
|
#
|
458
468
|
# * `PROVISIONED` - We recommend using `PROVISIONED` for predictable
|
459
469
|
# workloads. `PROVISIONED` sets the billing mode to [Provisioned
|
460
|
-
#
|
470
|
+
# capacity mode][1].
|
461
471
|
#
|
462
472
|
# * `PAY_PER_REQUEST` - We recommend using `PAY_PER_REQUEST` for
|
463
473
|
# unpredictable workloads. `PAY_PER_REQUEST` sets the billing mode to
|
464
|
-
# [On-
|
474
|
+
# [On-demand capacity mode][2].
|
465
475
|
#
|
466
476
|
#
|
467
477
|
#
|
468
|
-
# [1]: https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/
|
469
|
-
# [2]: https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/
|
478
|
+
# [1]: https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/provisioned-capacity-mode.html
|
479
|
+
# [2]: https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/on-demand-capacity-mode.html
|
470
480
|
# @option options [Types::ProvisionedThroughput] :provisioned_throughput
|
471
481
|
# Represents the provisioned throughput settings for a specified table
|
472
482
|
# or index. The settings can be modified using the `UpdateTable`
|
@@ -520,6 +530,26 @@ module Aws::DynamoDB
|
|
520
530
|
# @option options [Boolean] :deletion_protection_enabled
|
521
531
|
# Indicates whether deletion protection is to be enabled (true) or
|
522
532
|
# disabled (false) on the table.
|
533
|
+
# @option options [String] :resource_policy
|
534
|
+
# An Amazon Web Services resource-based policy document in JSON format
|
535
|
+
# that will be attached to the table.
|
536
|
+
#
|
537
|
+
# When you attach a resource-based policy while creating a table, the
|
538
|
+
# policy application is *strongly consistent*.
|
539
|
+
#
|
540
|
+
# The maximum size supported for a resource-based policy document is 20
|
541
|
+
# KB. DynamoDB counts whitespaces when calculating the size of a policy
|
542
|
+
# against this limit. For a full list of all considerations that apply
|
543
|
+
# for resource-based policies, see [Resource-based policy
|
544
|
+
# considerations][1].
|
545
|
+
#
|
546
|
+
#
|
547
|
+
#
|
548
|
+
# [1]: https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/rbac-considerations.html
|
549
|
+
# @option options [Types::OnDemandThroughput] :on_demand_throughput
|
550
|
+
# Sets the maximum number of read and write units for the specified
|
551
|
+
# table in on-demand capacity mode. If you use this parameter, you must
|
552
|
+
# specify `MaxReadRequestUnits`, `MaxWriteRequestUnits`, or both.
|
523
553
|
# @return [Table]
|
524
554
|
def create_table(options = {})
|
525
555
|
resp = Aws::Plugins::UserAgent.feature('resource') do
|
@@ -370,6 +370,14 @@ module Aws::DynamoDB
|
|
370
370
|
data[:deletion_protection_enabled]
|
371
371
|
end
|
372
372
|
|
373
|
+
# The maximum number of read and write units for the specified on-demand
|
374
|
+
# table. If you use this parameter, you must specify
|
375
|
+
# `MaxReadRequestUnits`, `MaxWriteRequestUnits`, or both.
|
376
|
+
# @return [Types::OnDemandThroughput]
|
377
|
+
def on_demand_throughput
|
378
|
+
data[:on_demand_throughput]
|
379
|
+
end
|
380
|
+
|
373
381
|
# @!endgroup
|
374
382
|
|
375
383
|
# @return [Client]
|
@@ -1298,7 +1306,7 @@ module Aws::DynamoDB
|
|
1298
1306
|
#
|
1299
1307
|
#
|
1300
1308
|
#
|
1301
|
-
# [1]: https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/
|
1309
|
+
# [1]: https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Query.FilterExpression.html
|
1302
1310
|
# @option options [String] :key_condition_expression
|
1303
1311
|
# The condition that specifies the key values for items to be retrieved
|
1304
1312
|
# by the `Query` action.
|
@@ -1681,7 +1689,7 @@ module Aws::DynamoDB
|
|
1681
1689
|
#
|
1682
1690
|
#
|
1683
1691
|
#
|
1684
|
-
# [1]: https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/
|
1692
|
+
# [1]: https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Scan.html#Scan.FilterExpression
|
1685
1693
|
# @option options [Hash<String,String>] :expression_attribute_names
|
1686
1694
|
# One or more substitution tokens for attribute names in an expression.
|
1687
1695
|
# The following are some use cases for using `ExpressionAttributeNames`:
|
@@ -1800,10 +1808,14 @@ module Aws::DynamoDB
|
|
1800
1808
|
# {
|
1801
1809
|
# update: {
|
1802
1810
|
# index_name: "IndexName", # required
|
1803
|
-
# provisioned_throughput: {
|
1811
|
+
# provisioned_throughput: {
|
1804
1812
|
# read_capacity_units: 1, # required
|
1805
1813
|
# write_capacity_units: 1, # required
|
1806
1814
|
# },
|
1815
|
+
# on_demand_throughput: {
|
1816
|
+
# max_read_request_units: 1,
|
1817
|
+
# max_write_request_units: 1,
|
1818
|
+
# },
|
1807
1819
|
# },
|
1808
1820
|
# create: {
|
1809
1821
|
# index_name: "IndexName", # required
|
@@ -1821,6 +1833,10 @@ module Aws::DynamoDB
|
|
1821
1833
|
# read_capacity_units: 1, # required
|
1822
1834
|
# write_capacity_units: 1, # required
|
1823
1835
|
# },
|
1836
|
+
# on_demand_throughput: {
|
1837
|
+
# max_read_request_units: 1,
|
1838
|
+
# max_write_request_units: 1,
|
1839
|
+
# },
|
1824
1840
|
# },
|
1825
1841
|
# delete: {
|
1826
1842
|
# index_name: "IndexName", # required
|
@@ -1844,12 +1860,18 @@ module Aws::DynamoDB
|
|
1844
1860
|
# provisioned_throughput_override: {
|
1845
1861
|
# read_capacity_units: 1,
|
1846
1862
|
# },
|
1863
|
+
# on_demand_throughput_override: {
|
1864
|
+
# max_read_request_units: 1,
|
1865
|
+
# },
|
1847
1866
|
# global_secondary_indexes: [
|
1848
1867
|
# {
|
1849
1868
|
# index_name: "IndexName", # required
|
1850
1869
|
# provisioned_throughput_override: {
|
1851
1870
|
# read_capacity_units: 1,
|
1852
1871
|
# },
|
1872
|
+
# on_demand_throughput_override: {
|
1873
|
+
# max_read_request_units: 1,
|
1874
|
+
# },
|
1853
1875
|
# },
|
1854
1876
|
# ],
|
1855
1877
|
# table_class_override: "STANDARD", # accepts STANDARD, STANDARD_INFREQUENT_ACCESS
|
@@ -1860,12 +1882,18 @@ module Aws::DynamoDB
|
|
1860
1882
|
# provisioned_throughput_override: {
|
1861
1883
|
# read_capacity_units: 1,
|
1862
1884
|
# },
|
1885
|
+
# on_demand_throughput_override: {
|
1886
|
+
# max_read_request_units: 1,
|
1887
|
+
# },
|
1863
1888
|
# global_secondary_indexes: [
|
1864
1889
|
# {
|
1865
1890
|
# index_name: "IndexName", # required
|
1866
1891
|
# provisioned_throughput_override: {
|
1867
1892
|
# read_capacity_units: 1,
|
1868
1893
|
# },
|
1894
|
+
# on_demand_throughput_override: {
|
1895
|
+
# max_read_request_units: 1,
|
1896
|
+
# },
|
1869
1897
|
# },
|
1870
1898
|
# ],
|
1871
1899
|
# table_class_override: "STANDARD", # accepts STANDARD, STANDARD_INFREQUENT_ACCESS
|
@@ -1877,6 +1905,10 @@ module Aws::DynamoDB
|
|
1877
1905
|
# ],
|
1878
1906
|
# table_class: "STANDARD", # accepts STANDARD, STANDARD_INFREQUENT_ACCESS
|
1879
1907
|
# deletion_protection_enabled: false,
|
1908
|
+
# on_demand_throughput: {
|
1909
|
+
# max_read_request_units: 1,
|
1910
|
+
# max_write_request_units: 1,
|
1911
|
+
# },
|
1880
1912
|
# })
|
1881
1913
|
# @param [Hash] options ({})
|
1882
1914
|
# @option options [Array<Types::AttributeDefinition>] :attribute_definitions
|
@@ -1894,16 +1926,16 @@ module Aws::DynamoDB
|
|
1894
1926
|
#
|
1895
1927
|
# * `PROVISIONED` - We recommend using `PROVISIONED` for predictable
|
1896
1928
|
# workloads. `PROVISIONED` sets the billing mode to [Provisioned
|
1897
|
-
#
|
1929
|
+
# capacity mode][1].
|
1898
1930
|
#
|
1899
1931
|
# * `PAY_PER_REQUEST` - We recommend using `PAY_PER_REQUEST` for
|
1900
1932
|
# unpredictable workloads. `PAY_PER_REQUEST` sets the billing mode to
|
1901
|
-
# [On-
|
1933
|
+
# [On-demand capacity mode][2].
|
1902
1934
|
#
|
1903
1935
|
#
|
1904
1936
|
#
|
1905
|
-
# [1]: https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/
|
1906
|
-
# [2]: https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/
|
1937
|
+
# [1]: https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/provisioned-capacity-mode.html
|
1938
|
+
# [2]: https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/on-demand-capacity-mode.html
|
1907
1939
|
# @option options [Types::ProvisionedThroughput] :provisioned_throughput
|
1908
1940
|
# The new provisioned throughput settings for the specified table or
|
1909
1941
|
# index.
|
@@ -1930,9 +1962,9 @@ module Aws::DynamoDB
|
|
1930
1962
|
# @option options [Types::StreamSpecification] :stream_specification
|
1931
1963
|
# Represents the DynamoDB Streams configuration for the table.
|
1932
1964
|
#
|
1933
|
-
# <note markdown="1"> You receive a `
|
1934
|
-
#
|
1935
|
-
#
|
1965
|
+
# <note markdown="1"> You receive a `ValidationException` if you try to enable a stream on a
|
1966
|
+
# table that already has a stream, or if you try to disable a stream on
|
1967
|
+
# a table that doesn't have a stream.
|
1936
1968
|
#
|
1937
1969
|
# </note>
|
1938
1970
|
# @option options [Types::SSESpecification] :sse_specification
|
@@ -1941,20 +1973,20 @@ module Aws::DynamoDB
|
|
1941
1973
|
# A list of replica update actions (create, delete, or update) for the
|
1942
1974
|
# table.
|
1943
1975
|
#
|
1944
|
-
# <note markdown="1">
|
1945
|
-
#
|
1976
|
+
# <note markdown="1"> For global tables, this property only applies to global tables using
|
1977
|
+
# Version 2019.11.21 (Current version).
|
1946
1978
|
#
|
1947
1979
|
# </note>
|
1948
|
-
#
|
1949
|
-
#
|
1950
|
-
#
|
1951
|
-
# [1]: https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/globaltables.V2.html
|
1952
1980
|
# @option options [String] :table_class
|
1953
1981
|
# The table class of the table to be updated. Valid values are
|
1954
1982
|
# `STANDARD` and `STANDARD_INFREQUENT_ACCESS`.
|
1955
1983
|
# @option options [Boolean] :deletion_protection_enabled
|
1956
1984
|
# Indicates whether deletion protection is to be enabled (true) or
|
1957
1985
|
# disabled (false) on the table.
|
1986
|
+
# @option options [Types::OnDemandThroughput] :on_demand_throughput
|
1987
|
+
# Updates the maximum number of read and write units for the specified
|
1988
|
+
# table in on-demand capacity mode. If you use this parameter, you must
|
1989
|
+
# specify `MaxReadRequestUnits`, `MaxWriteRequestUnits`, or both.
|
1958
1990
|
# @return [Table]
|
1959
1991
|
def update(options = {})
|
1960
1992
|
options = options.merge(table_name: @name)
|