aws-sdk-dynamodb 1.74.0 → 1.81.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +38 -1
- data/VERSION +1 -1
- data/lib/aws-sdk-dynamodb/client.rb +360 -63
- data/lib/aws-sdk-dynamodb/client_api.rb +153 -0
- data/lib/aws-sdk-dynamodb/endpoint_parameters.rb +69 -0
- data/lib/aws-sdk-dynamodb/endpoint_provider.rb +57 -0
- data/lib/aws-sdk-dynamodb/endpoints.rb +757 -0
- data/lib/aws-sdk-dynamodb/errors.rb +32 -0
- data/lib/aws-sdk-dynamodb/plugins/endpoints.rb +174 -0
- data/lib/aws-sdk-dynamodb/table.rb +30 -19
- data/lib/aws-sdk-dynamodb/types.rb +543 -1922
- data/lib/aws-sdk-dynamodb.rb +5 -1
- metadata +8 -4
@@ -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
|
198
|
-
# attribute into two different indexes, this counts as two
|
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
|
279
|
-
# attribute into two different indexes, this counts as two
|
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
|
@@ -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`.
|
@@ -1097,8 +1106,9 @@ module Aws::DynamoDB
|
|
1097
1106
|
# matching items themselves.
|
1098
1107
|
#
|
1099
1108
|
# * `SPECIFIC_ATTRIBUTES` - Returns only the attributes listed in
|
1100
|
-
# `
|
1101
|
-
# `
|
1109
|
+
# `ProjectionExpression`. This return value is equivalent to
|
1110
|
+
# specifying `ProjectionExpression` without specifying any value for
|
1111
|
+
# `Select`.
|
1102
1112
|
#
|
1103
1113
|
# If you query or scan a local secondary index and request only
|
1104
1114
|
# attributes that are projected into that index, the operation will
|
@@ -1111,12 +1121,12 @@ module Aws::DynamoDB
|
|
1111
1121
|
# attributes that are projected into the index. Global secondary index
|
1112
1122
|
# queries cannot fetch attributes from the parent table.
|
1113
1123
|
#
|
1114
|
-
# If neither `Select` nor `
|
1124
|
+
# If neither `Select` nor `ProjectionExpression` are specified, DynamoDB
|
1115
1125
|
# defaults to `ALL_ATTRIBUTES` when accessing a table, and
|
1116
1126
|
# `ALL_PROJECTED_ATTRIBUTES` when accessing an index. You cannot use
|
1117
|
-
# both `Select` and `
|
1127
|
+
# both `Select` and `ProjectionExpression` together in a single request,
|
1118
1128
|
# unless the value for `Select` is `SPECIFIC_ATTRIBUTES`. (This usage is
|
1119
|
-
# equivalent to specifying `
|
1129
|
+
# equivalent to specifying `ProjectionExpression` without any value for
|
1120
1130
|
# `Select`.)
|
1121
1131
|
#
|
1122
1132
|
# <note markdown="1"> If you use the `ProjectionExpression` parameter, then the value for
|
@@ -1254,7 +1264,7 @@ module Aws::DynamoDB
|
|
1254
1264
|
#
|
1255
1265
|
#
|
1256
1266
|
#
|
1257
|
-
# [1]: https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/QueryAndScan.html#
|
1267
|
+
# [1]: https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/QueryAndScan.html#Query.FilterExpression
|
1258
1268
|
# @option options [String] :key_condition_expression
|
1259
1269
|
# The condition that specifies the key values for items to be retrieved
|
1260
1270
|
# by the `Query` action.
|
@@ -1501,8 +1511,9 @@ module Aws::DynamoDB
|
|
1501
1511
|
# matching items themselves.
|
1502
1512
|
#
|
1503
1513
|
# * `SPECIFIC_ATTRIBUTES` - Returns only the attributes listed in
|
1504
|
-
# `
|
1505
|
-
# `
|
1514
|
+
# `ProjectionExpression`. This return value is equivalent to
|
1515
|
+
# specifying `ProjectionExpression` without specifying any value for
|
1516
|
+
# `Select`.
|
1506
1517
|
#
|
1507
1518
|
# If you query or scan a local secondary index and request only
|
1508
1519
|
# attributes that are projected into that index, the operation reads
|
@@ -1515,12 +1526,12 @@ module Aws::DynamoDB
|
|
1515
1526
|
# attributes that are projected into the index. Global secondary index
|
1516
1527
|
# queries cannot fetch attributes from the parent table.
|
1517
1528
|
#
|
1518
|
-
# If neither `Select` nor `
|
1529
|
+
# If neither `Select` nor `ProjectionExpression` are specified, DynamoDB
|
1519
1530
|
# defaults to `ALL_ATTRIBUTES` when accessing a table, and
|
1520
1531
|
# `ALL_PROJECTED_ATTRIBUTES` when accessing an index. You cannot use
|
1521
|
-
# both `Select` and `
|
1532
|
+
# both `Select` and `ProjectionExpression` together in a single request,
|
1522
1533
|
# unless the value for `Select` is `SPECIFIC_ATTRIBUTES`. (This usage is
|
1523
|
-
# equivalent to specifying `
|
1534
|
+
# equivalent to specifying `ProjectionExpression` without any value for
|
1524
1535
|
# `Select`.)
|
1525
1536
|
#
|
1526
1537
|
# <note markdown="1"> If you use the `ProjectionExpression` parameter, then the value for
|
@@ -1633,7 +1644,7 @@ module Aws::DynamoDB
|
|
1633
1644
|
#
|
1634
1645
|
#
|
1635
1646
|
#
|
1636
|
-
# [1]: https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/QueryAndScan.html#
|
1647
|
+
# [1]: https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/QueryAndScan.html#Query.FilterExpression
|
1637
1648
|
# @option options [Hash<String,String>] :expression_attribute_names
|
1638
1649
|
# One or more substitution tokens for attribute names in an expression.
|
1639
1650
|
# The following are some use cases for using
|