aws-sdk-dynamodb 1.74.0 → 1.82.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -37,6 +37,8 @@ module Aws::DynamoDB
37
37
  # * {GlobalTableAlreadyExistsException}
38
38
  # * {GlobalTableNotFoundException}
39
39
  # * {IdempotentParameterMismatchException}
40
+ # * {ImportConflictException}
41
+ # * {ImportNotFoundException}
40
42
  # * {IndexNotFoundException}
41
43
  # * {InternalServerError}
42
44
  # * {InvalidExportTimeException}
@@ -213,6 +215,36 @@ module Aws::DynamoDB
213
215
  end
214
216
  end
215
217
 
218
+ class ImportConflictException < ServiceError
219
+
220
+ # @param [Seahorse::Client::RequestContext] context
221
+ # @param [String] message
222
+ # @param [Aws::DynamoDB::Types::ImportConflictException] data
223
+ def initialize(context, message, data = Aws::EmptyStructure.new)
224
+ super(context, message, data)
225
+ end
226
+
227
+ # @return [String]
228
+ def message
229
+ @message || @data[:message]
230
+ end
231
+ end
232
+
233
+ class ImportNotFoundException < ServiceError
234
+
235
+ # @param [Seahorse::Client::RequestContext] context
236
+ # @param [String] message
237
+ # @param [Aws::DynamoDB::Types::ImportNotFoundException] data
238
+ def initialize(context, message, data = Aws::EmptyStructure.new)
239
+ super(context, message, data)
240
+ end
241
+
242
+ # @return [String]
243
+ def message
244
+ @message || @data[:message]
245
+ end
246
+ end
247
+
216
248
  class IndexNotFoundException < ServiceError
217
249
 
218
250
  # @param [Seahorse::Client::RequestContext] context
@@ -0,0 +1,174 @@
1
+ # frozen_string_literal: true
2
+
3
+ # WARNING ABOUT GENERATED CODE
4
+ #
5
+ # This file is generated. See the contributing guide for more information:
6
+ # https://github.com/aws/aws-sdk-ruby/blob/version-3/CONTRIBUTING.md
7
+ #
8
+ # WARNING ABOUT GENERATED CODE
9
+
10
+
11
+ module Aws::DynamoDB
12
+ module Plugins
13
+ class Endpoints < Seahorse::Client::Plugin
14
+ option(
15
+ :endpoint_provider,
16
+ doc_type: 'Aws::DynamoDB::EndpointProvider',
17
+ docstring: 'The endpoint provider used to resolve endpoints. Any '\
18
+ 'object that responds to `#resolve_endpoint(parameters)` '\
19
+ 'where `parameters` is a Struct similar to '\
20
+ '`Aws::DynamoDB::EndpointParameters`'
21
+ ) do |cfg|
22
+ Aws::DynamoDB::EndpointProvider.new
23
+ end
24
+
25
+ # @api private
26
+ class Handler < Seahorse::Client::Handler
27
+ def call(context)
28
+ # If endpoint was discovered, do not resolve or apply the endpoint.
29
+ unless context[:discovered_endpoint]
30
+ params = parameters_for_operation(context)
31
+ endpoint = context.config.endpoint_provider.resolve_endpoint(params)
32
+
33
+ context.http_request.endpoint = endpoint.url
34
+ apply_endpoint_headers(context, endpoint.headers)
35
+ end
36
+
37
+ context[:endpoint_params] = params
38
+ context[:auth_scheme] =
39
+ Aws::Endpoints.resolve_auth_scheme(context, endpoint)
40
+
41
+ @handler.call(context)
42
+ end
43
+
44
+ private
45
+
46
+ def apply_endpoint_headers(context, headers)
47
+ headers.each do |key, values|
48
+ value = values
49
+ .compact
50
+ .map { |s| Seahorse::Util.escape_header_list_string(s.to_s) }
51
+ .join(',')
52
+
53
+ context.http_request.headers[key] = value
54
+ end
55
+ end
56
+
57
+ def parameters_for_operation(context)
58
+ case context.operation_name
59
+ when :batch_execute_statement
60
+ Aws::DynamoDB::Endpoints::BatchExecuteStatement.build(context)
61
+ when :batch_get_item
62
+ Aws::DynamoDB::Endpoints::BatchGetItem.build(context)
63
+ when :batch_write_item
64
+ Aws::DynamoDB::Endpoints::BatchWriteItem.build(context)
65
+ when :create_backup
66
+ Aws::DynamoDB::Endpoints::CreateBackup.build(context)
67
+ when :create_global_table
68
+ Aws::DynamoDB::Endpoints::CreateGlobalTable.build(context)
69
+ when :create_table
70
+ Aws::DynamoDB::Endpoints::CreateTable.build(context)
71
+ when :delete_backup
72
+ Aws::DynamoDB::Endpoints::DeleteBackup.build(context)
73
+ when :delete_item
74
+ Aws::DynamoDB::Endpoints::DeleteItem.build(context)
75
+ when :delete_table
76
+ Aws::DynamoDB::Endpoints::DeleteTable.build(context)
77
+ when :describe_backup
78
+ Aws::DynamoDB::Endpoints::DescribeBackup.build(context)
79
+ when :describe_continuous_backups
80
+ Aws::DynamoDB::Endpoints::DescribeContinuousBackups.build(context)
81
+ when :describe_contributor_insights
82
+ Aws::DynamoDB::Endpoints::DescribeContributorInsights.build(context)
83
+ when :describe_endpoints
84
+ Aws::DynamoDB::Endpoints::DescribeEndpoints.build(context)
85
+ when :describe_export
86
+ Aws::DynamoDB::Endpoints::DescribeExport.build(context)
87
+ when :describe_global_table
88
+ Aws::DynamoDB::Endpoints::DescribeGlobalTable.build(context)
89
+ when :describe_global_table_settings
90
+ Aws::DynamoDB::Endpoints::DescribeGlobalTableSettings.build(context)
91
+ when :describe_import
92
+ Aws::DynamoDB::Endpoints::DescribeImport.build(context)
93
+ when :describe_kinesis_streaming_destination
94
+ Aws::DynamoDB::Endpoints::DescribeKinesisStreamingDestination.build(context)
95
+ when :describe_limits
96
+ Aws::DynamoDB::Endpoints::DescribeLimits.build(context)
97
+ when :describe_table
98
+ Aws::DynamoDB::Endpoints::DescribeTable.build(context)
99
+ when :describe_table_replica_auto_scaling
100
+ Aws::DynamoDB::Endpoints::DescribeTableReplicaAutoScaling.build(context)
101
+ when :describe_time_to_live
102
+ Aws::DynamoDB::Endpoints::DescribeTimeToLive.build(context)
103
+ when :disable_kinesis_streaming_destination
104
+ Aws::DynamoDB::Endpoints::DisableKinesisStreamingDestination.build(context)
105
+ when :enable_kinesis_streaming_destination
106
+ Aws::DynamoDB::Endpoints::EnableKinesisStreamingDestination.build(context)
107
+ when :execute_statement
108
+ Aws::DynamoDB::Endpoints::ExecuteStatement.build(context)
109
+ when :execute_transaction
110
+ Aws::DynamoDB::Endpoints::ExecuteTransaction.build(context)
111
+ when :export_table_to_point_in_time
112
+ Aws::DynamoDB::Endpoints::ExportTableToPointInTime.build(context)
113
+ when :get_item
114
+ Aws::DynamoDB::Endpoints::GetItem.build(context)
115
+ when :import_table
116
+ Aws::DynamoDB::Endpoints::ImportTable.build(context)
117
+ when :list_backups
118
+ Aws::DynamoDB::Endpoints::ListBackups.build(context)
119
+ when :list_contributor_insights
120
+ Aws::DynamoDB::Endpoints::ListContributorInsights.build(context)
121
+ when :list_exports
122
+ Aws::DynamoDB::Endpoints::ListExports.build(context)
123
+ when :list_global_tables
124
+ Aws::DynamoDB::Endpoints::ListGlobalTables.build(context)
125
+ when :list_imports
126
+ Aws::DynamoDB::Endpoints::ListImports.build(context)
127
+ when :list_tables
128
+ Aws::DynamoDB::Endpoints::ListTables.build(context)
129
+ when :list_tags_of_resource
130
+ Aws::DynamoDB::Endpoints::ListTagsOfResource.build(context)
131
+ when :put_item
132
+ Aws::DynamoDB::Endpoints::PutItem.build(context)
133
+ when :query
134
+ Aws::DynamoDB::Endpoints::Query.build(context)
135
+ when :restore_table_from_backup
136
+ Aws::DynamoDB::Endpoints::RestoreTableFromBackup.build(context)
137
+ when :restore_table_to_point_in_time
138
+ Aws::DynamoDB::Endpoints::RestoreTableToPointInTime.build(context)
139
+ when :scan
140
+ Aws::DynamoDB::Endpoints::Scan.build(context)
141
+ when :tag_resource
142
+ Aws::DynamoDB::Endpoints::TagResource.build(context)
143
+ when :transact_get_items
144
+ Aws::DynamoDB::Endpoints::TransactGetItems.build(context)
145
+ when :transact_write_items
146
+ Aws::DynamoDB::Endpoints::TransactWriteItems.build(context)
147
+ when :untag_resource
148
+ Aws::DynamoDB::Endpoints::UntagResource.build(context)
149
+ when :update_continuous_backups
150
+ Aws::DynamoDB::Endpoints::UpdateContinuousBackups.build(context)
151
+ when :update_contributor_insights
152
+ Aws::DynamoDB::Endpoints::UpdateContributorInsights.build(context)
153
+ when :update_global_table
154
+ Aws::DynamoDB::Endpoints::UpdateGlobalTable.build(context)
155
+ when :update_global_table_settings
156
+ Aws::DynamoDB::Endpoints::UpdateGlobalTableSettings.build(context)
157
+ when :update_item
158
+ Aws::DynamoDB::Endpoints::UpdateItem.build(context)
159
+ when :update_table
160
+ Aws::DynamoDB::Endpoints::UpdateTable.build(context)
161
+ when :update_table_replica_auto_scaling
162
+ Aws::DynamoDB::Endpoints::UpdateTableReplicaAutoScaling.build(context)
163
+ when :update_time_to_live
164
+ Aws::DynamoDB::Endpoints::UpdateTimeToLive.build(context)
165
+ end
166
+ end
167
+ end
168
+
169
+ def add_handlers(handlers, _config)
170
+ handlers.add(Handler, step: :build, priority: 75)
171
+ end
172
+ end
173
+ end
174
+ end
@@ -86,7 +86,8 @@ module Aws::DynamoDB
86
86
  #
87
87
  # * `CREATING` - The table is being created.
88
88
  #
89
- # * `UPDATING` - The table is being updated.
89
+ # * `UPDATING` - The table/index configuration is being updated. The
90
+ # table/index remains available for data operations when `UPDATING`.
90
91
  #
91
92
  # * `DELETING` - The table is being deleted.
92
93
  #
@@ -194,9 +195,9 @@ module Aws::DynamoDB
194
195
  # * `NonKeyAttributes` - A list of one or more non-key attribute names
195
196
  # that are projected into the secondary index. The total count of
196
197
  # attributes provided in `NonKeyAttributes`, summed across all of
197
- # the secondary indexes, must not exceed 20. If you project the same
198
- # attribute into two different indexes, this counts as two distinct
199
- # attributes when determining the total.
198
+ # the secondary indexes, must not exceed 100. If you project the
199
+ # same attribute into two different indexes, this counts as two
200
+ # distinct attributes when determining the total.
200
201
  #
201
202
  # * `IndexSizeBytes` - Represents the total size of the index, in bytes.
202
203
  # DynamoDB updates this value approximately every six hours. Recent
@@ -275,9 +276,9 @@ module Aws::DynamoDB
275
276
  # * `NonKeyAttributes` - A list of one or more non-key attribute names
276
277
  # that are projected into the secondary index. The total count of
277
278
  # attributes provided in `NonKeyAttributes`, summed across all of
278
- # the secondary indexes, must not exceed 20. If you project the same
279
- # attribute into two different indexes, this counts as two distinct
280
- # attributes when determining the total.
279
+ # the secondary indexes, must not exceed 100. If you project the
280
+ # same attribute into two different indexes, this counts as two
281
+ # distinct attributes when determining the total.
281
282
  #
282
283
  # * `ProvisionedThroughput` - The provisioned throughput settings for
283
284
  # the global secondary index, consisting of read and write capacity
@@ -538,7 +539,7 @@ module Aws::DynamoDB
538
539
  # A map of attribute names to `AttributeValue` objects, representing the
539
540
  # primary key of the item to delete.
540
541
  #
541
- # For the primary key, you must provide all of the attributes. For
542
+ # For the primary key, you must provide all of the key attributes. For
542
543
  # example, with a simple primary key, you only need to provide a value
543
544
  # for the partition key. For a composite primary key, you must provide
544
545
  # values for both the partition key and the sort key.
@@ -569,6 +570,10 @@ module Aws::DynamoDB
569
570
  #
570
571
  # * `ALL_OLD` - The content of the old item is returned.
571
572
  #
573
+ # There is no additional cost associated with requesting a return value
574
+ # aside from the small network and processing overhead of receiving a
575
+ # larger response. No read capacity units are consumed.
576
+ #
572
577
  # <note markdown="1"> The `ReturnValues` parameter is used by several DynamoDB operations;
573
578
  # however, `DeleteItem` does not recognize any values other than `NONE`
574
579
  # or `ALL_OLD`.
@@ -897,6 +902,10 @@ module Aws::DynamoDB
897
902
  #
898
903
  # The values returned are strongly consistent.
899
904
  #
905
+ # There is no additional cost associated with requesting a return value
906
+ # aside from the small network and processing overhead of receiving a
907
+ # larger response. No read capacity units are consumed.
908
+ #
900
909
  # <note markdown="1"> The `ReturnValues` parameter is used by several DynamoDB operations;
901
910
  # however, `PutItem` does not recognize any values other than `NONE` or
902
911
  # `ALL_OLD`.
@@ -1094,11 +1103,14 @@ module Aws::DynamoDB
1094
1103
  # is equivalent to specifying `ALL_ATTRIBUTES`.
1095
1104
  #
1096
1105
  # * `COUNT` - Returns the number of matching items, rather than the
1097
- # matching items themselves.
1106
+ # matching items themselves. Note that this uses the same quantity of
1107
+ # read capacity units as getting the items, and is subject to the same
1108
+ # item size calculations.
1098
1109
  #
1099
1110
  # * `SPECIFIC_ATTRIBUTES` - Returns only the attributes listed in
1100
- # `AttributesToGet`. This return value is equivalent to specifying
1101
- # `AttributesToGet` without specifying any value for `Select`.
1111
+ # `ProjectionExpression`. This return value is equivalent to
1112
+ # specifying `ProjectionExpression` without specifying any value for
1113
+ # `Select`.
1102
1114
  #
1103
1115
  # If you query or scan a local secondary index and request only
1104
1116
  # attributes that are projected into that index, the operation will
@@ -1111,12 +1123,12 @@ module Aws::DynamoDB
1111
1123
  # attributes that are projected into the index. Global secondary index
1112
1124
  # queries cannot fetch attributes from the parent table.
1113
1125
  #
1114
- # If neither `Select` nor `AttributesToGet` are specified, DynamoDB
1126
+ # If neither `Select` nor `ProjectionExpression` are specified, DynamoDB
1115
1127
  # defaults to `ALL_ATTRIBUTES` when accessing a table, and
1116
1128
  # `ALL_PROJECTED_ATTRIBUTES` when accessing an index. You cannot use
1117
- # both `Select` and `AttributesToGet` together in a single request,
1129
+ # both `Select` and `ProjectionExpression` together in a single request,
1118
1130
  # unless the value for `Select` is `SPECIFIC_ATTRIBUTES`. (This usage is
1119
- # equivalent to specifying `AttributesToGet` without any value for
1131
+ # equivalent to specifying `ProjectionExpression` without any value for
1120
1132
  # `Select`.)
1121
1133
  #
1122
1134
  # <note markdown="1"> If you use the `ProjectionExpression` parameter, then the value for
@@ -1254,7 +1266,7 @@ module Aws::DynamoDB
1254
1266
  #
1255
1267
  #
1256
1268
  #
1257
- # [1]: https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/QueryAndScan.html#FilteringResults
1269
+ # [1]: https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/QueryAndScan.html#Query.FilterExpression
1258
1270
  # @option options [String] :key_condition_expression
1259
1271
  # The condition that specifies the key values for items to be retrieved
1260
1272
  # by the `Query` action.
@@ -1498,11 +1510,14 @@ module Aws::DynamoDB
1498
1510
  # is equivalent to specifying `ALL_ATTRIBUTES`.
1499
1511
  #
1500
1512
  # * `COUNT` - Returns the number of matching items, rather than the
1501
- # matching items themselves.
1513
+ # matching items themselves. Note that this uses the same quantity of
1514
+ # read capacity units as getting the items, and is subject to the same
1515
+ # item size calculations.
1502
1516
  #
1503
1517
  # * `SPECIFIC_ATTRIBUTES` - Returns only the attributes listed in
1504
- # `AttributesToGet`. This return value is equivalent to specifying
1505
- # `AttributesToGet` without specifying any value for `Select`.
1518
+ # `ProjectionExpression`. This return value is equivalent to
1519
+ # specifying `ProjectionExpression` without specifying any value for
1520
+ # `Select`.
1506
1521
  #
1507
1522
  # If you query or scan a local secondary index and request only
1508
1523
  # attributes that are projected into that index, the operation reads
@@ -1515,12 +1530,12 @@ module Aws::DynamoDB
1515
1530
  # attributes that are projected into the index. Global secondary index
1516
1531
  # queries cannot fetch attributes from the parent table.
1517
1532
  #
1518
- # If neither `Select` nor `AttributesToGet` are specified, DynamoDB
1533
+ # If neither `Select` nor `ProjectionExpression` are specified, DynamoDB
1519
1534
  # defaults to `ALL_ATTRIBUTES` when accessing a table, and
1520
1535
  # `ALL_PROJECTED_ATTRIBUTES` when accessing an index. You cannot use
1521
- # both `Select` and `AttributesToGet` together in a single request,
1536
+ # both `Select` and `ProjectionExpression` together in a single request,
1522
1537
  # unless the value for `Select` is `SPECIFIC_ATTRIBUTES`. (This usage is
1523
- # equivalent to specifying `AttributesToGet` without any value for
1538
+ # equivalent to specifying `ProjectionExpression` without any value for
1524
1539
  # `Select`.)
1525
1540
  #
1526
1541
  # <note markdown="1"> If you use the `ProjectionExpression` parameter, then the value for
@@ -1633,7 +1648,7 @@ module Aws::DynamoDB
1633
1648
  #
1634
1649
  #
1635
1650
  #
1636
- # [1]: https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/QueryAndScan.html#FilteringResults
1651
+ # [1]: https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/QueryAndScan.html#Query.FilterExpression
1637
1652
  # @option options [Hash<String,String>] :expression_attribute_names
1638
1653
  # One or more substitution tokens for attribute names in an expression.
1639
1654
  # The following are some use cases for using
@@ -1891,8 +1906,8 @@ module Aws::DynamoDB
1891
1906
  # A list of replica update actions (create, delete, or update) for the
1892
1907
  # table.
1893
1908
  #
1894
- # <note markdown="1"> This property only applies to [Version 2019.11.21][1] of global
1895
- # tables.
1909
+ # <note markdown="1"> This property only applies to [Version 2019.11.21 (Current)][1] of
1910
+ # global tables.
1896
1911
  #
1897
1912
  # </note>
1898
1913
  #
@@ -1981,8 +1996,8 @@ module Aws::DynamoDB
1981
1996
  # [1]: https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/LegacyConditionalParameters.ConditionalOperator.html
1982
1997
  # @option options [String] :return_values
1983
1998
  # Use `ReturnValues` if you want to get the item attributes as they
1984
- # appear before or after they are updated. For `UpdateItem`, the valid
1985
- # values are:
1999
+ # appear before or after they are successfully updated. For
2000
+ # `UpdateItem`, the valid values are:
1986
2001
  #
1987
2002
  # * `NONE` - If `ReturnValues` is not specified, or if its value is
1988
2003
  # `NONE`, then nothing is returned. (This setting is the default for