rusoto_dynamodb/generated.rs
1// =================================================================
2//
3// * WARNING *
4//
5// This file is generated!
6//
7// Changes made to this file will be overwritten. If changes are
8// required to the generated code, the service_crategen project
9// must be updated to generate the changes.
10//
11// =================================================================
12
13use std::error::Error;
14use std::fmt;
15
16use async_trait::async_trait;
17use rusoto_core::credential::ProvideAwsCredentials;
18use rusoto_core::region;
19use rusoto_core::request::{BufferedHttpResponse, DispatchSignedRequest};
20use rusoto_core::{Client, RusotoError};
21
22use rusoto_core::proto;
23use rusoto_core::request::HttpResponse;
24use rusoto_core::signature::SignedRequest;
25#[allow(unused_imports)]
26use serde::{Deserialize, Serialize};
27
28impl DynamoDbClient {
29 fn new_signed_request(&self, http_method: &str, request_uri: &str) -> SignedRequest {
30 let mut request = SignedRequest::new(http_method, "dynamodb", &self.region, request_uri);
31
32 request.set_content_type("application/x-amz-json-1.0".to_owned());
33
34 request
35 }
36
37 async fn sign_and_dispatch<E>(
38 &self,
39 request: SignedRequest,
40 from_response: fn(BufferedHttpResponse) -> RusotoError<E>,
41 ) -> Result<HttpResponse, RusotoError<E>> {
42 let mut response = self.client.sign_and_dispatch(request).await?;
43 if !response.status.is_success() {
44 let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
45 return Err(from_response(response));
46 }
47
48 Ok(response)
49 }
50}
51
52use serde_json;
53/// <p>Contains details of a table archival operation.</p>
54#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
55#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
56pub struct ArchivalSummary {
57 /// <p>The Amazon Resource Name (ARN) of the backup the table was archived to, when applicable in the archival reason. If you wish to restore this backup to the same table name, you will need to delete the original table.</p>
58 #[serde(rename = "ArchivalBackupArn")]
59 #[serde(skip_serializing_if = "Option::is_none")]
60 pub archival_backup_arn: Option<String>,
61 /// <p>The date and time when table archival was initiated by DynamoDB, in UNIX epoch time format.</p>
62 #[serde(rename = "ArchivalDateTime")]
63 #[serde(skip_serializing_if = "Option::is_none")]
64 pub archival_date_time: Option<f64>,
65 /// <p><p>The reason DynamoDB archived the table. Currently, the only possible value is:</p> <ul> <li> <p> <code>INACCESSIBLE<em>ENCRYPTION</em>CREDENTIALS</code> - The table was archived due to the table's AWS KMS key being inaccessible for more than seven days. An On-Demand backup was created at the archival time.</p> </li> </ul></p>
66 #[serde(rename = "ArchivalReason")]
67 #[serde(skip_serializing_if = "Option::is_none")]
68 pub archival_reason: Option<String>,
69}
70
71/// <p>Represents an attribute for describing the key schema for the table and indexes.</p>
72#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
73pub struct AttributeDefinition {
74 /// <p>A name for the attribute.</p>
75 #[serde(rename = "AttributeName")]
76 pub attribute_name: String,
77 /// <p><p>The data type for the attribute, where:</p> <ul> <li> <p> <code>S</code> - the attribute is of type String</p> </li> <li> <p> <code>N</code> - the attribute is of type Number</p> </li> <li> <p> <code>B</code> - the attribute is of type Binary</p> </li> </ul></p>
78 #[serde(rename = "AttributeType")]
79 pub attribute_type: String,
80}
81
82/// <p>Represents the data for an attribute.</p> <p>Each attribute value is described as a name-value pair. The name is the data type, and the value is the data itself.</p> <p>For more information, see <a href="https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/HowItWorks.NamingRulesDataTypes.html#HowItWorks.DataTypes">Data Types</a> in the <i>Amazon DynamoDB Developer Guide</i>.</p>
83#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
84pub struct AttributeValue {
85 /// <p>An attribute of type Binary. For example:</p> <p> <code>"B": "dGhpcyB0ZXh0IGlzIGJhc2U2NC1lbmNvZGVk"</code> </p>
86 #[serde(rename = "B")]
87 #[serde(
88 deserialize_with = "::rusoto_core::serialization::SerdeBlob::deserialize_blob",
89 serialize_with = "::rusoto_core::serialization::SerdeBlob::serialize_blob",
90 default
91 )]
92 #[serde(skip_serializing_if = "Option::is_none")]
93 pub b: Option<bytes::Bytes>,
94 /// <p>An attribute of type Boolean. For example:</p> <p> <code>"BOOL": true</code> </p>
95 #[serde(rename = "BOOL")]
96 #[serde(skip_serializing_if = "Option::is_none")]
97 pub bool: Option<bool>,
98 /// <p>An attribute of type Binary Set. For example:</p> <p> <code>"BS": ["U3Vubnk=", "UmFpbnk=", "U25vd3k="]</code> </p>
99 #[serde(rename = "BS")]
100 #[serde(
101 deserialize_with = "::rusoto_core::serialization::SerdeBlobList::deserialize_blob_list",
102 serialize_with = "::rusoto_core::serialization::SerdeBlobList::serialize_blob_list",
103 default
104 )]
105 #[serde(skip_serializing_if = "Option::is_none")]
106 pub bs: Option<Vec<bytes::Bytes>>,
107 /// <p>An attribute of type List. For example:</p> <p> <code>"L": [ {"S": "Cookies"} , {"S": "Coffee"}, {"N", "3.14159"}]</code> </p>
108 #[serde(rename = "L")]
109 #[serde(skip_serializing_if = "Option::is_none")]
110 pub l: Option<Vec<AttributeValue>>,
111 /// <p>An attribute of type Map. For example:</p> <p> <code>"M": {"Name": {"S": "Joe"}, "Age": {"N": "35"}}</code> </p>
112 #[serde(rename = "M")]
113 #[serde(skip_serializing_if = "Option::is_none")]
114 pub m: Option<::std::collections::HashMap<String, AttributeValue>>,
115 /// <p>An attribute of type Number. For example:</p> <p> <code>"N": "123.45"</code> </p> <p>Numbers are sent across the network to DynamoDB as strings, to maximize compatibility across languages and libraries. However, DynamoDB treats them as number type attributes for mathematical operations.</p>
116 #[serde(rename = "N")]
117 #[serde(skip_serializing_if = "Option::is_none")]
118 pub n: Option<String>,
119 /// <p>An attribute of type Number Set. For example:</p> <p> <code>"NS": ["42.2", "-19", "7.5", "3.14"]</code> </p> <p>Numbers are sent across the network to DynamoDB as strings, to maximize compatibility across languages and libraries. However, DynamoDB treats them as number type attributes for mathematical operations.</p>
120 #[serde(rename = "NS")]
121 #[serde(skip_serializing_if = "Option::is_none")]
122 pub ns: Option<Vec<String>>,
123 /// <p>An attribute of type Null. For example:</p> <p> <code>"NULL": true</code> </p>
124 #[serde(rename = "NULL")]
125 #[serde(skip_serializing_if = "Option::is_none")]
126 pub null: Option<bool>,
127 /// <p>An attribute of type String. For example:</p> <p> <code>"S": "Hello"</code> </p>
128 #[serde(rename = "S")]
129 #[serde(skip_serializing_if = "Option::is_none")]
130 pub s: Option<String>,
131 /// <p>An attribute of type String Set. For example:</p> <p> <code>"SS": ["Giraffe", "Hippo" ,"Zebra"]</code> </p>
132 #[serde(rename = "SS")]
133 #[serde(skip_serializing_if = "Option::is_none")]
134 pub ss: Option<Vec<String>>,
135}
136
137/// <p>For the <code>UpdateItem</code> operation, represents the attributes to be modified, the action to perform on each, and the new value for each.</p> <note> <p>You cannot use <code>UpdateItem</code> to update any primary key attributes. Instead, you will need to delete the item, and then use <code>PutItem</code> to create a new item with new attributes.</p> </note> <p>Attribute values cannot be null; string and binary type attributes must have lengths greater than zero; and set type attributes must not be empty. Requests with empty values will be rejected with a <code>ValidationException</code> exception.</p>
138#[derive(Clone, Debug, Default, PartialEq, Serialize)]
139#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
140pub struct AttributeValueUpdate {
141 /// <p><p>Specifies how to perform the update. Valid values are <code>PUT</code> (default), <code>DELETE</code>, and <code>ADD</code>. The behavior depends on whether the specified primary key already exists in the table.</p> <p> <b>If an item with the specified <i>Key</i> is found in the table:</b> </p> <ul> <li> <p> <code>PUT</code> - Adds the specified attribute to the item. If the attribute already exists, it is replaced by the new value. </p> </li> <li> <p> <code>DELETE</code> - If no value is specified, the attribute and its value are removed from the item. The data type of the specified value must match the existing value's data type.</p> <p>If a <i>set</i> of values is specified, then those values are subtracted from the old set. For example, if the attribute value was the set <code>[a,b,c]</code> and the <code>DELETE</code> action specified <code>[a,c]</code>, then the final attribute value would be <code>[b]</code>. Specifying an empty set is an error.</p> </li> <li> <p> <code>ADD</code> - If the attribute does not already exist, then the attribute and its values are added to the item. If the attribute does exist, then the behavior of <code>ADD</code> depends on the data type of the attribute:</p> <ul> <li> <p>If the existing attribute is a number, and if <code>Value</code> is also a number, then the <code>Value</code> is mathematically added to the existing attribute. If <code>Value</code> is a negative number, then it is subtracted from the existing attribute.</p> <note> <p> If you use <code>ADD</code> to increment or decrement a number value for an item that doesn't exist before the update, DynamoDB uses 0 as the initial value.</p> <p>In addition, if you use <code>ADD</code> to update an existing item, and intend to increment or decrement an attribute value which does not yet exist, DynamoDB uses <code>0</code> as the initial value. For example, suppose that the item you want to update does not yet have an attribute named <i>itemcount</i>, but you decide to <code>ADD</code> the number <code>3</code> to this attribute anyway, even though it currently does not exist. DynamoDB will create the <i>itemcount</i> attribute, set its initial value to <code>0</code>, and finally add <code>3</code> to it. The result will be a new <i>itemcount</i> attribute in the item, with a value of <code>3</code>.</p> </note> </li> <li> <p>If the existing data type is a set, and if the <code>Value</code> is also a set, then the <code>Value</code> is added to the existing set. (This is a <i>set</i> operation, not mathematical addition.) For example, if the attribute value was the set <code>[1,2]</code>, and the <code>ADD</code> action specified <code>[3]</code>, then the final attribute value would be <code>[1,2,3]</code>. An error occurs if an Add action is specified for a set attribute and the attribute type specified does not match the existing set type. </p> <p>Both sets must have the same primitive data type. For example, if the existing data type is a set of strings, the <code>Value</code> must also be a set of strings. The same holds true for number sets and binary sets.</p> </li> </ul> <p>This action is only valid for an existing attribute whose data type is number or is a set. Do not use <code>ADD</code> for any other data types.</p> </li> </ul> <p> <b>If no item with the specified <i>Key</i> is found:</b> </p> <ul> <li> <p> <code>PUT</code> - DynamoDB creates a new item with the specified primary key, and then adds the attribute. </p> </li> <li> <p> <code>DELETE</code> - Nothing happens; there is no attribute to delete.</p> </li> <li> <p> <code>ADD</code> - DynamoDB creates an item with the supplied primary key and number (or set of numbers) for the attribute value. The only data types allowed are number and number set; no other data types can be specified.</p> </li> </ul></p>
142 #[serde(rename = "Action")]
143 #[serde(skip_serializing_if = "Option::is_none")]
144 pub action: Option<String>,
145 /// <p>Represents the data for an attribute.</p> <p>Each attribute value is described as a name-value pair. The name is the data type, and the value is the data itself.</p> <p>For more information, see <a href="https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/HowItWorks.NamingRulesDataTypes.html#HowItWorks.DataTypes">Data Types</a> in the <i>Amazon DynamoDB Developer Guide</i>. </p>
146 #[serde(rename = "Value")]
147 #[serde(skip_serializing_if = "Option::is_none")]
148 pub value: Option<AttributeValue>,
149}
150
151/// <p>Represents the properties of the scaling policy.</p>
152#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
153#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
154pub struct AutoScalingPolicyDescription {
155 /// <p>The name of the scaling policy.</p>
156 #[serde(rename = "PolicyName")]
157 #[serde(skip_serializing_if = "Option::is_none")]
158 pub policy_name: Option<String>,
159 /// <p>Represents a target tracking scaling policy configuration.</p>
160 #[serde(rename = "TargetTrackingScalingPolicyConfiguration")]
161 #[serde(skip_serializing_if = "Option::is_none")]
162 pub target_tracking_scaling_policy_configuration:
163 Option<AutoScalingTargetTrackingScalingPolicyConfigurationDescription>,
164}
165
166/// <p>Represents the auto scaling policy to be modified.</p>
167#[derive(Clone, Debug, Default, PartialEq, Serialize)]
168#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
169pub struct AutoScalingPolicyUpdate {
170 /// <p>The name of the scaling policy.</p>
171 #[serde(rename = "PolicyName")]
172 #[serde(skip_serializing_if = "Option::is_none")]
173 pub policy_name: Option<String>,
174 /// <p>Represents a target tracking scaling policy configuration.</p>
175 #[serde(rename = "TargetTrackingScalingPolicyConfiguration")]
176 pub target_tracking_scaling_policy_configuration:
177 AutoScalingTargetTrackingScalingPolicyConfigurationUpdate,
178}
179
180/// <p>Represents the auto scaling settings for a global table or global secondary index.</p>
181#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
182#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
183pub struct AutoScalingSettingsDescription {
184 /// <p>Disabled auto scaling for this global table or global secondary index.</p>
185 #[serde(rename = "AutoScalingDisabled")]
186 #[serde(skip_serializing_if = "Option::is_none")]
187 pub auto_scaling_disabled: Option<bool>,
188 /// <p>Role ARN used for configuring the auto scaling policy.</p>
189 #[serde(rename = "AutoScalingRoleArn")]
190 #[serde(skip_serializing_if = "Option::is_none")]
191 pub auto_scaling_role_arn: Option<String>,
192 /// <p>The maximum capacity units that a global table or global secondary index should be scaled up to.</p>
193 #[serde(rename = "MaximumUnits")]
194 #[serde(skip_serializing_if = "Option::is_none")]
195 pub maximum_units: Option<i64>,
196 /// <p>The minimum capacity units that a global table or global secondary index should be scaled down to.</p>
197 #[serde(rename = "MinimumUnits")]
198 #[serde(skip_serializing_if = "Option::is_none")]
199 pub minimum_units: Option<i64>,
200 /// <p>Information about the scaling policies.</p>
201 #[serde(rename = "ScalingPolicies")]
202 #[serde(skip_serializing_if = "Option::is_none")]
203 pub scaling_policies: Option<Vec<AutoScalingPolicyDescription>>,
204}
205
206/// <p>Represents the auto scaling settings to be modified for a global table or global secondary index.</p>
207#[derive(Clone, Debug, Default, PartialEq, Serialize)]
208#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
209pub struct AutoScalingSettingsUpdate {
210 /// <p>Disabled auto scaling for this global table or global secondary index.</p>
211 #[serde(rename = "AutoScalingDisabled")]
212 #[serde(skip_serializing_if = "Option::is_none")]
213 pub auto_scaling_disabled: Option<bool>,
214 /// <p>Role ARN used for configuring auto scaling policy.</p>
215 #[serde(rename = "AutoScalingRoleArn")]
216 #[serde(skip_serializing_if = "Option::is_none")]
217 pub auto_scaling_role_arn: Option<String>,
218 /// <p>The maximum capacity units that a global table or global secondary index should be scaled up to.</p>
219 #[serde(rename = "MaximumUnits")]
220 #[serde(skip_serializing_if = "Option::is_none")]
221 pub maximum_units: Option<i64>,
222 /// <p>The minimum capacity units that a global table or global secondary index should be scaled down to.</p>
223 #[serde(rename = "MinimumUnits")]
224 #[serde(skip_serializing_if = "Option::is_none")]
225 pub minimum_units: Option<i64>,
226 /// <p>The scaling policy to apply for scaling target global table or global secondary index capacity units.</p>
227 #[serde(rename = "ScalingPolicyUpdate")]
228 #[serde(skip_serializing_if = "Option::is_none")]
229 pub scaling_policy_update: Option<AutoScalingPolicyUpdate>,
230}
231
232/// <p>Represents the properties of a target tracking scaling policy.</p>
233#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
234#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
235pub struct AutoScalingTargetTrackingScalingPolicyConfigurationDescription {
236 /// <p>Indicates whether scale in by the target tracking policy is disabled. If the value is true, scale in is disabled and the target tracking policy won't remove capacity from the scalable resource. Otherwise, scale in is enabled and the target tracking policy can remove capacity from the scalable resource. The default value is false.</p>
237 #[serde(rename = "DisableScaleIn")]
238 #[serde(skip_serializing_if = "Option::is_none")]
239 pub disable_scale_in: Option<bool>,
240 /// <p>The amount of time, in seconds, after a scale in activity completes before another scale in activity can start. The cooldown period is used to block subsequent scale in requests until it has expired. You should scale in conservatively to protect your application's availability. However, if another alarm triggers a scale out policy during the cooldown period after a scale-in, application auto scaling scales out your scalable target immediately. </p>
241 #[serde(rename = "ScaleInCooldown")]
242 #[serde(skip_serializing_if = "Option::is_none")]
243 pub scale_in_cooldown: Option<i64>,
244 /// <p>The amount of time, in seconds, after a scale out activity completes before another scale out activity can start. While the cooldown period is in effect, the capacity that has been added by the previous scale out event that initiated the cooldown is calculated as part of the desired capacity for the next scale out. You should continuously (but not excessively) scale out.</p>
245 #[serde(rename = "ScaleOutCooldown")]
246 #[serde(skip_serializing_if = "Option::is_none")]
247 pub scale_out_cooldown: Option<i64>,
248 /// <p>The target value for the metric. The range is 8.515920e-109 to 1.174271e+108 (Base 10) or 2e-360 to 2e360 (Base 2).</p>
249 #[serde(rename = "TargetValue")]
250 pub target_value: f64,
251}
252
253/// <p>Represents the settings of a target tracking scaling policy that will be modified.</p>
254#[derive(Clone, Debug, Default, PartialEq, Serialize)]
255#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
256pub struct AutoScalingTargetTrackingScalingPolicyConfigurationUpdate {
257 /// <p>Indicates whether scale in by the target tracking policy is disabled. If the value is true, scale in is disabled and the target tracking policy won't remove capacity from the scalable resource. Otherwise, scale in is enabled and the target tracking policy can remove capacity from the scalable resource. The default value is false.</p>
258 #[serde(rename = "DisableScaleIn")]
259 #[serde(skip_serializing_if = "Option::is_none")]
260 pub disable_scale_in: Option<bool>,
261 /// <p>The amount of time, in seconds, after a scale in activity completes before another scale in activity can start. The cooldown period is used to block subsequent scale in requests until it has expired. You should scale in conservatively to protect your application's availability. However, if another alarm triggers a scale out policy during the cooldown period after a scale-in, application auto scaling scales out your scalable target immediately. </p>
262 #[serde(rename = "ScaleInCooldown")]
263 #[serde(skip_serializing_if = "Option::is_none")]
264 pub scale_in_cooldown: Option<i64>,
265 /// <p>The amount of time, in seconds, after a scale out activity completes before another scale out activity can start. While the cooldown period is in effect, the capacity that has been added by the previous scale out event that initiated the cooldown is calculated as part of the desired capacity for the next scale out. You should continuously (but not excessively) scale out.</p>
266 #[serde(rename = "ScaleOutCooldown")]
267 #[serde(skip_serializing_if = "Option::is_none")]
268 pub scale_out_cooldown: Option<i64>,
269 /// <p>The target value for the metric. The range is 8.515920e-109 to 1.174271e+108 (Base 10) or 2e-360 to 2e360 (Base 2).</p>
270 #[serde(rename = "TargetValue")]
271 pub target_value: f64,
272}
273
274/// <p>Contains the description of the backup created for the table.</p>
275#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
276#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
277pub struct BackupDescription {
278 /// <p>Contains the details of the backup created for the table. </p>
279 #[serde(rename = "BackupDetails")]
280 #[serde(skip_serializing_if = "Option::is_none")]
281 pub backup_details: Option<BackupDetails>,
282 /// <p>Contains the details of the table when the backup was created. </p>
283 #[serde(rename = "SourceTableDetails")]
284 #[serde(skip_serializing_if = "Option::is_none")]
285 pub source_table_details: Option<SourceTableDetails>,
286 /// <p>Contains the details of the features enabled on the table when the backup was created. For example, LSIs, GSIs, streams, TTL.</p>
287 #[serde(rename = "SourceTableFeatureDetails")]
288 #[serde(skip_serializing_if = "Option::is_none")]
289 pub source_table_feature_details: Option<SourceTableFeatureDetails>,
290}
291
292/// <p>Contains the details of the backup created for the table.</p>
293#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
294#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
295pub struct BackupDetails {
296 /// <p>ARN associated with the backup.</p>
297 #[serde(rename = "BackupArn")]
298 pub backup_arn: String,
299 /// <p>Time at which the backup was created. This is the request time of the backup. </p>
300 #[serde(rename = "BackupCreationDateTime")]
301 pub backup_creation_date_time: f64,
302 /// <p>Time at which the automatic on-demand backup created by DynamoDB will expire. This <code>SYSTEM</code> on-demand backup expires automatically 35 days after its creation.</p>
303 #[serde(rename = "BackupExpiryDateTime")]
304 #[serde(skip_serializing_if = "Option::is_none")]
305 pub backup_expiry_date_time: Option<f64>,
306 /// <p>Name of the requested backup.</p>
307 #[serde(rename = "BackupName")]
308 pub backup_name: String,
309 /// <p>Size of the backup in bytes.</p>
310 #[serde(rename = "BackupSizeBytes")]
311 #[serde(skip_serializing_if = "Option::is_none")]
312 pub backup_size_bytes: Option<i64>,
313 /// <p>Backup can be in one of the following states: CREATING, ACTIVE, DELETED. </p>
314 #[serde(rename = "BackupStatus")]
315 pub backup_status: String,
316 /// <p><p>BackupType:</p> <ul> <li> <p> <code>USER</code> - You create and manage these using the on-demand backup feature.</p> </li> <li> <p> <code>SYSTEM</code> - If you delete a table with point-in-time recovery enabled, a <code>SYSTEM</code> backup is automatically created and is retained for 35 days (at no additional cost). System backups allow you to restore the deleted table to the state it was in just before the point of deletion. </p> </li> <li> <p> <code>AWS_BACKUP</code> - On-demand backup created by you from AWS Backup service.</p> </li> </ul></p>
317 #[serde(rename = "BackupType")]
318 pub backup_type: String,
319}
320
321/// <p>Contains details for the backup.</p>
322#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
323#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
324pub struct BackupSummary {
325 /// <p>ARN associated with the backup.</p>
326 #[serde(rename = "BackupArn")]
327 #[serde(skip_serializing_if = "Option::is_none")]
328 pub backup_arn: Option<String>,
329 /// <p>Time at which the backup was created.</p>
330 #[serde(rename = "BackupCreationDateTime")]
331 #[serde(skip_serializing_if = "Option::is_none")]
332 pub backup_creation_date_time: Option<f64>,
333 /// <p>Time at which the automatic on-demand backup created by DynamoDB will expire. This <code>SYSTEM</code> on-demand backup expires automatically 35 days after its creation.</p>
334 #[serde(rename = "BackupExpiryDateTime")]
335 #[serde(skip_serializing_if = "Option::is_none")]
336 pub backup_expiry_date_time: Option<f64>,
337 /// <p>Name of the specified backup.</p>
338 #[serde(rename = "BackupName")]
339 #[serde(skip_serializing_if = "Option::is_none")]
340 pub backup_name: Option<String>,
341 /// <p>Size of the backup in bytes.</p>
342 #[serde(rename = "BackupSizeBytes")]
343 #[serde(skip_serializing_if = "Option::is_none")]
344 pub backup_size_bytes: Option<i64>,
345 /// <p>Backup can be in one of the following states: CREATING, ACTIVE, DELETED.</p>
346 #[serde(rename = "BackupStatus")]
347 #[serde(skip_serializing_if = "Option::is_none")]
348 pub backup_status: Option<String>,
349 /// <p><p>BackupType:</p> <ul> <li> <p> <code>USER</code> - You create and manage these using the on-demand backup feature.</p> </li> <li> <p> <code>SYSTEM</code> - If you delete a table with point-in-time recovery enabled, a <code>SYSTEM</code> backup is automatically created and is retained for 35 days (at no additional cost). System backups allow you to restore the deleted table to the state it was in just before the point of deletion. </p> </li> <li> <p> <code>AWS_BACKUP</code> - On-demand backup created by you from AWS Backup service.</p> </li> </ul></p>
350 #[serde(rename = "BackupType")]
351 #[serde(skip_serializing_if = "Option::is_none")]
352 pub backup_type: Option<String>,
353 /// <p>ARN associated with the table.</p>
354 #[serde(rename = "TableArn")]
355 #[serde(skip_serializing_if = "Option::is_none")]
356 pub table_arn: Option<String>,
357 /// <p>Unique identifier for the table.</p>
358 #[serde(rename = "TableId")]
359 #[serde(skip_serializing_if = "Option::is_none")]
360 pub table_id: Option<String>,
361 /// <p>Name of the table.</p>
362 #[serde(rename = "TableName")]
363 #[serde(skip_serializing_if = "Option::is_none")]
364 pub table_name: Option<String>,
365}
366
367/// <p>Represents the input of a <code>BatchGetItem</code> operation.</p>
368#[derive(Clone, Debug, Default, PartialEq, Serialize)]
369#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
370pub struct BatchGetItemInput {
371 /// <p><p>A map of one or more table names and, for each table, a map that describes one or more items to retrieve from that table. Each table name can be used only once per <code>BatchGetItem</code> request.</p> <p>Each element in the map of items to retrieve consists of the following:</p> <ul> <li> <p> <code>ConsistentRead</code> - If <code>true</code>, a strongly consistent read is used; if <code>false</code> (the default), an eventually consistent read is used.</p> </li> <li> <p> <code>ExpressionAttributeNames</code> - One or more substitution tokens for attribute names in the <code>ProjectionExpression</code> parameter. The following are some use cases for using <code>ExpressionAttributeNames</code>:</p> <ul> <li> <p>To access an attribute whose name conflicts with a DynamoDB reserved word.</p> </li> <li> <p>To create a placeholder for repeating occurrences of an attribute name in an expression.</p> </li> <li> <p>To prevent special characters in an attribute name from being misinterpreted in an expression.</p> </li> </ul> <p>Use the <b>#</b> character in an expression to dereference an attribute name. For example, consider the following attribute name:</p> <ul> <li> <p> <code>Percentile</code> </p> </li> </ul> <p>The name of this attribute conflicts with a reserved word, so it cannot be used directly in an expression. (For the complete list of reserved words, see <a href="https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/ReservedWords.html">Reserved Words</a> in the <i>Amazon DynamoDB Developer Guide</i>). To work around this, you could specify the following for <code>ExpressionAttributeNames</code>:</p> <ul> <li> <p> <code>{"#P":"Percentile"}</code> </p> </li> </ul> <p>You could then use this substitution in an expression, as in this example:</p> <ul> <li> <p> <code>#P = :val</code> </p> </li> </ul> <note> <p>Tokens that begin with the <b>:</b> character are <i>expression attribute values</i>, which are placeholders for the actual value at runtime.</p> </note> <p>For more information about expression attribute names, see <a href="https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Expressions.AccessingItemAttributes.html">Accessing Item Attributes</a> in the <i>Amazon DynamoDB Developer Guide</i>.</p> </li> <li> <p> <code>Keys</code> - An array of primary key attribute values that define specific items in the table. For each primary key, you must provide <i>all</i> of the key attributes. For example, with a simple primary key, you only need to provide the partition key value. For a composite key, you must provide <i>both</i> the partition key value and the sort key value.</p> </li> <li> <p> <code>ProjectionExpression</code> - A string that identifies one or more attributes to retrieve from the table. These attributes can include scalars, sets, or elements of a JSON document. The attributes in the expression must be separated by commas.</p> <p>If no attribute names are specified, then all attributes are returned. If any of the requested attributes are not found, they do not appear in the result.</p> <p>For more information, see <a href="https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Expressions.AccessingItemAttributes.html">Accessing Item Attributes</a> in the <i>Amazon DynamoDB Developer Guide</i>.</p> </li> <li> <p> <code>AttributesToGet</code> - This is a legacy parameter. Use <code>ProjectionExpression</code> instead. For more information, see <a href="https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/LegacyConditionalParameters.AttributesToGet.html">AttributesToGet</a> in the <i>Amazon DynamoDB Developer Guide</i>. </p> </li> </ul></p>
372 #[serde(rename = "RequestItems")]
373 pub request_items: ::std::collections::HashMap<String, KeysAndAttributes>,
374 #[serde(rename = "ReturnConsumedCapacity")]
375 #[serde(skip_serializing_if = "Option::is_none")]
376 pub return_consumed_capacity: Option<String>,
377}
378
379/// <p>Represents the output of a <code>BatchGetItem</code> operation.</p>
380#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
381#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
382pub struct BatchGetItemOutput {
383 /// <p><p>The read capacity units consumed by the entire <code>BatchGetItem</code> operation.</p> <p>Each element consists of:</p> <ul> <li> <p> <code>TableName</code> - The table that consumed the provisioned throughput.</p> </li> <li> <p> <code>CapacityUnits</code> - The total number of capacity units consumed.</p> </li> </ul></p>
384 #[serde(rename = "ConsumedCapacity")]
385 #[serde(skip_serializing_if = "Option::is_none")]
386 pub consumed_capacity: Option<Vec<ConsumedCapacity>>,
387 /// <p>A map of table name to a list of items. Each object in <code>Responses</code> consists of a table name, along with a map of attribute data consisting of the data type and attribute value.</p>
388 #[serde(rename = "Responses")]
389 #[serde(skip_serializing_if = "Option::is_none")]
390 pub responses: Option<
391 ::std::collections::HashMap<
392 String,
393 Vec<::std::collections::HashMap<String, AttributeValue>>,
394 >,
395 >,
396 /// <p>A map of tables and their respective keys that were not processed with the current response. The <code>UnprocessedKeys</code> value is in the same form as <code>RequestItems</code>, so the value can be provided directly to a subsequent <code>BatchGetItem</code> operation. For more information, see <code>RequestItems</code> in the Request Parameters section.</p> <p>Each element consists of:</p> <ul> <li> <p> <code>Keys</code> - An array of primary key attribute values that define specific items in the table.</p> </li> <li> <p> <code>ProjectionExpression</code> - One or more attributes to be retrieved from the table or index. By default, all attributes are returned. If a requested attribute is not found, it does not appear in the result.</p> </li> <li> <p> <code>ConsistentRead</code> - The consistency of a read operation. If set to <code>true</code>, then a strongly consistent read is used; otherwise, an eventually consistent read is used.</p> </li> </ul> <p>If there are no unprocessed keys remaining, the response contains an empty <code>UnprocessedKeys</code> map.</p>
397 #[serde(rename = "UnprocessedKeys")]
398 #[serde(skip_serializing_if = "Option::is_none")]
399 pub unprocessed_keys: Option<::std::collections::HashMap<String, KeysAndAttributes>>,
400}
401
402/// <p>Represents the input of a <code>BatchWriteItem</code> operation.</p>
403#[derive(Clone, Debug, Default, PartialEq, Serialize)]
404#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
405pub struct BatchWriteItemInput {
406 /// <p><p>A map of one or more table names and, for each table, a list of operations to be performed (<code>DeleteRequest</code> or <code>PutRequest</code>). Each element in the map consists of the following:</p> <ul> <li> <p> <code>DeleteRequest</code> - Perform a <code>DeleteItem</code> operation on the specified item. The item to be deleted is identified by a <code>Key</code> subelement:</p> <ul> <li> <p> <code>Key</code> - A map of primary key attribute values that uniquely identify the item. Each entry in this map consists of an attribute name and an attribute value. For each primary key, you must provide <i>all</i> of the key attributes. For example, with a simple primary key, you only need to provide a value for the partition key. For a composite primary key, you must provide values for <i>both</i> the partition key and the sort key.</p> </li> </ul> </li> <li> <p> <code>PutRequest</code> - Perform a <code>PutItem</code> operation on the specified item. The item to be put is identified by an <code>Item</code> subelement:</p> <ul> <li> <p> <code>Item</code> - A map of attributes and their values. Each entry in this map consists of an attribute name and an attribute value. Attribute values must not be null; string and binary type attributes must have lengths greater than zero; and set type attributes must not be empty. Requests that contain empty values are rejected with a <code>ValidationException</code> exception.</p> <p>If you specify any attributes that are part of an index key, then the data types for those attributes must match those of the schema in the table's attribute definition.</p> </li> </ul> </li> </ul></p>
407 #[serde(rename = "RequestItems")]
408 pub request_items: ::std::collections::HashMap<String, Vec<WriteRequest>>,
409 #[serde(rename = "ReturnConsumedCapacity")]
410 #[serde(skip_serializing_if = "Option::is_none")]
411 pub return_consumed_capacity: Option<String>,
412 /// <p>Determines whether item collection metrics are returned. If set to <code>SIZE</code>, the response includes statistics about item collections, if any, that were modified during the operation are returned in the response. If set to <code>NONE</code> (the default), no statistics are returned.</p>
413 #[serde(rename = "ReturnItemCollectionMetrics")]
414 #[serde(skip_serializing_if = "Option::is_none")]
415 pub return_item_collection_metrics: Option<String>,
416}
417
418/// <p>Represents the output of a <code>BatchWriteItem</code> operation.</p>
419#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
420#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
421pub struct BatchWriteItemOutput {
422 /// <p><p>The capacity units consumed by the entire <code>BatchWriteItem</code> operation.</p> <p>Each element consists of:</p> <ul> <li> <p> <code>TableName</code> - The table that consumed the provisioned throughput.</p> </li> <li> <p> <code>CapacityUnits</code> - The total number of capacity units consumed.</p> </li> </ul></p>
423 #[serde(rename = "ConsumedCapacity")]
424 #[serde(skip_serializing_if = "Option::is_none")]
425 pub consumed_capacity: Option<Vec<ConsumedCapacity>>,
426 /// <p><p>A list of tables that were processed by <code>BatchWriteItem</code> and, for each table, information about any item collections that were affected by individual <code>DeleteItem</code> or <code>PutItem</code> operations.</p> <p>Each entry consists of the following subelements:</p> <ul> <li> <p> <code>ItemCollectionKey</code> - The partition key value of the item collection. This is the same as the partition key value of the item.</p> </li> <li> <p> <code>SizeEstimateRangeGB</code> - An estimate of item collection size, expressed in GB. This is a two-element array containing a lower bound and an upper bound for the estimate. The estimate includes the size of all the items in the table, plus the size of all attributes projected into all of the local secondary indexes on the table. Use this estimate to measure whether a local secondary index is approaching its size limit.</p> <p>The estimate is subject to change over time; therefore, do not rely on the precision or accuracy of the estimate.</p> </li> </ul></p>
427 #[serde(rename = "ItemCollectionMetrics")]
428 #[serde(skip_serializing_if = "Option::is_none")]
429 pub item_collection_metrics:
430 Option<::std::collections::HashMap<String, Vec<ItemCollectionMetrics>>>,
431 /// <p>A map of tables and requests against those tables that were not processed. The <code>UnprocessedItems</code> value is in the same form as <code>RequestItems</code>, so you can provide this value directly to a subsequent <code>BatchGetItem</code> operation. For more information, see <code>RequestItems</code> in the Request Parameters section.</p> <p>Each <code>UnprocessedItems</code> entry consists of a table name and, for that table, a list of operations to perform (<code>DeleteRequest</code> or <code>PutRequest</code>).</p> <ul> <li> <p> <code>DeleteRequest</code> - Perform a <code>DeleteItem</code> operation on the specified item. The item to be deleted is identified by a <code>Key</code> subelement:</p> <ul> <li> <p> <code>Key</code> - A map of primary key attribute values that uniquely identify the item. Each entry in this map consists of an attribute name and an attribute value.</p> </li> </ul> </li> <li> <p> <code>PutRequest</code> - Perform a <code>PutItem</code> operation on the specified item. The item to be put is identified by an <code>Item</code> subelement:</p> <ul> <li> <p> <code>Item</code> - A map of attributes and their values. Each entry in this map consists of an attribute name and an attribute value. Attribute values must not be null; string and binary type attributes must have lengths greater than zero; and set type attributes must not be empty. Requests that contain empty values will be rejected with a <code>ValidationException</code> exception.</p> <p>If you specify any attributes that are part of an index key, then the data types for those attributes must match those of the schema in the table's attribute definition.</p> </li> </ul> </li> </ul> <p>If there are no unprocessed items remaining, the response contains an empty <code>UnprocessedItems</code> map.</p>
432 #[serde(rename = "UnprocessedItems")]
433 #[serde(skip_serializing_if = "Option::is_none")]
434 pub unprocessed_items: Option<::std::collections::HashMap<String, Vec<WriteRequest>>>,
435}
436
437/// <p>Contains the details for the read/write capacity mode.</p>
438#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
439#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
440pub struct BillingModeSummary {
441 /// <p><p>Controls how you are charged for read and write throughput and how you manage capacity. This setting can be changed later.</p> <ul> <li> <p> <code>PROVISIONED</code> - Sets the read/write capacity mode to <code>PROVISIONED</code>. We recommend using <code>PROVISIONED</code> for predictable workloads.</p> </li> <li> <p> <code>PAY<em>PER</em>REQUEST</code> - Sets the read/write capacity mode to <code>PAY<em>PER</em>REQUEST</code>. We recommend using <code>PAY<em>PER</em>REQUEST</code> for unpredictable workloads. </p> </li> </ul></p>
442 #[serde(rename = "BillingMode")]
443 #[serde(skip_serializing_if = "Option::is_none")]
444 pub billing_mode: Option<String>,
445 /// <p>Represents the time when <code>PAY_PER_REQUEST</code> was last set as the read/write capacity mode.</p>
446 #[serde(rename = "LastUpdateToPayPerRequestDateTime")]
447 #[serde(skip_serializing_if = "Option::is_none")]
448 pub last_update_to_pay_per_request_date_time: Option<f64>,
449}
450
451/// <p>An ordered list of errors for each item in the request which caused the transaction to get cancelled. The values of the list are ordered according to the ordering of the <code>TransactWriteItems</code> request parameter. If no error occurred for the associated item an error with a Null code and Null message will be present. </p>
452#[derive(Clone, Debug, Default, PartialEq)]
453pub struct CancellationReason {
454 /// <p>Status code for the result of the cancelled transaction.</p>
455 pub code: Option<String>,
456 /// <p>Item in the request which caused the transaction to get cancelled.</p>
457 pub item: Option<::std::collections::HashMap<String, AttributeValue>>,
458 /// <p>Cancellation reason message description.</p>
459 pub message: Option<String>,
460}
461
462/// <p>Represents the amount of provisioned throughput capacity consumed on a table or an index.</p>
463#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
464#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
465pub struct Capacity {
466 /// <p>The total number of capacity units consumed on a table or an index.</p>
467 #[serde(rename = "CapacityUnits")]
468 #[serde(skip_serializing_if = "Option::is_none")]
469 pub capacity_units: Option<f64>,
470 /// <p>The total number of read capacity units consumed on a table or an index.</p>
471 #[serde(rename = "ReadCapacityUnits")]
472 #[serde(skip_serializing_if = "Option::is_none")]
473 pub read_capacity_units: Option<f64>,
474 /// <p>The total number of write capacity units consumed on a table or an index.</p>
475 #[serde(rename = "WriteCapacityUnits")]
476 #[serde(skip_serializing_if = "Option::is_none")]
477 pub write_capacity_units: Option<f64>,
478}
479
480/// <p><p>Represents the selection criteria for a <code>Query</code> or <code>Scan</code> operation:</p> <ul> <li> <p>For a <code>Query</code> operation, <code>Condition</code> is used for specifying the <code>KeyConditions</code> to use when querying a table or an index. For <code>KeyConditions</code>, only the following comparison operators are supported:</p> <p> <code>EQ | LE | LT | GE | GT | BEGINS_WITH | BETWEEN</code> </p> <p> <code>Condition</code> is also used in a <code>QueryFilter</code>, which evaluates the query results and returns only the desired values.</p> </li> <li> <p>For a <code>Scan</code> operation, <code>Condition</code> is used in a <code>ScanFilter</code>, which evaluates the scan results and returns only the desired values.</p> </li> </ul></p>
481#[derive(Clone, Debug, Default, PartialEq, Serialize)]
482#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
483pub struct Condition {
484 /// <p>One or more values to evaluate against the supplied attribute. The number of values in the list depends on the <code>ComparisonOperator</code> being used.</p> <p>For type Number, value comparisons are numeric.</p> <p>String value comparisons for greater than, equals, or less than are based on ASCII character code values. For example, <code>a</code> is greater than <code>A</code>, and <code>a</code> is greater than <code>B</code>. For a list of code values, see <a href="http://en.wikipedia.org/wiki/ASCII#ASCII_printable_characters">http://en.wikipedia.org/wiki/ASCII#ASCII_printable_characters</a>.</p> <p>For Binary, DynamoDB treats each byte of the binary data as unsigned when it compares binary values.</p>
485 #[serde(rename = "AttributeValueList")]
486 #[serde(skip_serializing_if = "Option::is_none")]
487 pub attribute_value_list: Option<Vec<AttributeValue>>,
488 /// <p>A comparator for evaluating attributes. For example, equals, greater than, less than, etc.</p> <p>The following comparison operators are available:</p> <p> <code>EQ | NE | LE | LT | GE | GT | NOT_NULL | NULL | CONTAINS | NOT_CONTAINS | BEGINS_WITH | IN | BETWEEN</code> </p> <p>The following are descriptions of each comparison operator.</p> <ul> <li> <p> <code>EQ</code> : Equal. <code>EQ</code> is supported for all data types, including lists and maps.</p> <p> <code>AttributeValueList</code> can contain only one <code>AttributeValue</code> element of type String, Number, Binary, String Set, Number Set, or Binary Set. If an item contains an <code>AttributeValue</code> element of a different type than the one provided in the request, the value does not match. For example, <code>{"S":"6"}</code> does not equal <code>{"N":"6"}</code>. Also, <code>{"N":"6"}</code> does not equal <code>{"NS":["6", "2", "1"]}</code>.</p> <p/> </li> <li> <p> <code>NE</code> : Not equal. <code>NE</code> is supported for all data types, including lists and maps.</p> <p> <code>AttributeValueList</code> can contain only one <code>AttributeValue</code> of type String, Number, Binary, String Set, Number Set, or Binary Set. If an item contains an <code>AttributeValue</code> of a different type than the one provided in the request, the value does not match. For example, <code>{"S":"6"}</code> does not equal <code>{"N":"6"}</code>. Also, <code>{"N":"6"}</code> does not equal <code>{"NS":["6", "2", "1"]}</code>.</p> <p/> </li> <li> <p> <code>LE</code> : Less than or equal. </p> <p> <code>AttributeValueList</code> can contain only one <code>AttributeValue</code> element of type String, Number, or Binary (not a set type). If an item contains an <code>AttributeValue</code> element of a different type than the one provided in the request, the value does not match. For example, <code>{"S":"6"}</code> does not equal <code>{"N":"6"}</code>. Also, <code>{"N":"6"}</code> does not compare to <code>{"NS":["6", "2", "1"]}</code>.</p> <p/> </li> <li> <p> <code>LT</code> : Less than. </p> <p> <code>AttributeValueList</code> can contain only one <code>AttributeValue</code> of type String, Number, or Binary (not a set type). If an item contains an <code>AttributeValue</code> element of a different type than the one provided in the request, the value does not match. For example, <code>{"S":"6"}</code> does not equal <code>{"N":"6"}</code>. Also, <code>{"N":"6"}</code> does not compare to <code>{"NS":["6", "2", "1"]}</code>.</p> <p/> </li> <li> <p> <code>GE</code> : Greater than or equal. </p> <p> <code>AttributeValueList</code> can contain only one <code>AttributeValue</code> element of type String, Number, or Binary (not a set type). If an item contains an <code>AttributeValue</code> element of a different type than the one provided in the request, the value does not match. For example, <code>{"S":"6"}</code> does not equal <code>{"N":"6"}</code>. Also, <code>{"N":"6"}</code> does not compare to <code>{"NS":["6", "2", "1"]}</code>.</p> <p/> </li> <li> <p> <code>GT</code> : Greater than. </p> <p> <code>AttributeValueList</code> can contain only one <code>AttributeValue</code> element of type String, Number, or Binary (not a set type). If an item contains an <code>AttributeValue</code> element of a different type than the one provided in the request, the value does not match. For example, <code>{"S":"6"}</code> does not equal <code>{"N":"6"}</code>. Also, <code>{"N":"6"}</code> does not compare to <code>{"NS":["6", "2", "1"]}</code>.</p> <p/> </li> <li> <p> <code>NOT_NULL</code> : The attribute exists. <code>NOT_NULL</code> is supported for all data types, including lists and maps.</p> <note> <p>This operator tests for the existence of an attribute, not its data type. If the data type of attribute "<code>a</code>" is null, and you evaluate it using <code>NOT_NULL</code>, the result is a Boolean <code>true</code>. This result is because the attribute "<code>a</code>" exists; its data type is not relevant to the <code>NOT_NULL</code> comparison operator.</p> </note> </li> <li> <p> <code>NULL</code> : The attribute does not exist. <code>NULL</code> is supported for all data types, including lists and maps.</p> <note> <p>This operator tests for the nonexistence of an attribute, not its data type. If the data type of attribute "<code>a</code>" is null, and you evaluate it using <code>NULL</code>, the result is a Boolean <code>false</code>. This is because the attribute "<code>a</code>" exists; its data type is not relevant to the <code>NULL</code> comparison operator.</p> </note> </li> <li> <p> <code>CONTAINS</code> : Checks for a subsequence, or value in a set.</p> <p> <code>AttributeValueList</code> can contain only one <code>AttributeValue</code> element of type String, Number, or Binary (not a set type). If the target attribute of the comparison is of type String, then the operator checks for a substring match. If the target attribute of the comparison is of type Binary, then the operator looks for a subsequence of the target that matches the input. If the target attribute of the comparison is a set ("<code>SS</code>", "<code>NS</code>", or "<code>BS</code>"), then the operator evaluates to true if it finds an exact match with any member of the set.</p> <p>CONTAINS is supported for lists: When evaluating "<code>a CONTAINS b</code>", "<code>a</code>" can be a list; however, "<code>b</code>" cannot be a set, a map, or a list.</p> </li> <li> <p> <code>NOT_CONTAINS</code> : Checks for absence of a subsequence, or absence of a value in a set.</p> <p> <code>AttributeValueList</code> can contain only one <code>AttributeValue</code> element of type String, Number, or Binary (not a set type). If the target attribute of the comparison is a String, then the operator checks for the absence of a substring match. If the target attribute of the comparison is Binary, then the operator checks for the absence of a subsequence of the target that matches the input. If the target attribute of the comparison is a set ("<code>SS</code>", "<code>NS</code>", or "<code>BS</code>"), then the operator evaluates to true if it <i>does not</i> find an exact match with any member of the set.</p> <p>NOT_CONTAINS is supported for lists: When evaluating "<code>a NOT CONTAINS b</code>", "<code>a</code>" can be a list; however, "<code>b</code>" cannot be a set, a map, or a list.</p> </li> <li> <p> <code>BEGINS_WITH</code> : Checks for a prefix. </p> <p> <code>AttributeValueList</code> can contain only one <code>AttributeValue</code> of type String or Binary (not a Number or a set type). The target attribute of the comparison must be of type String or Binary (not a Number or a set type).</p> <p/> </li> <li> <p> <code>IN</code> : Checks for matching elements in a list.</p> <p> <code>AttributeValueList</code> can contain one or more <code>AttributeValue</code> elements of type String, Number, or Binary. These attributes are compared against an existing attribute of an item. If any elements of the input are equal to the item attribute, the expression evaluates to true.</p> </li> <li> <p> <code>BETWEEN</code> : Greater than or equal to the first value, and less than or equal to the second value. </p> <p> <code>AttributeValueList</code> must contain two <code>AttributeValue</code> elements of the same type, either String, Number, or Binary (not a set type). A target attribute matches if the target value is greater than, or equal to, the first element and less than, or equal to, the second element. If an item contains an <code>AttributeValue</code> element of a different type than the one provided in the request, the value does not match. For example, <code>{"S":"6"}</code> does not compare to <code>{"N":"6"}</code>. Also, <code>{"N":"6"}</code> does not compare to <code>{"NS":["6", "2", "1"]}</code> </p> </li> </ul> <p>For usage examples of <code>AttributeValueList</code> and <code>ComparisonOperator</code>, see <a href="https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/LegacyConditionalParameters.html">Legacy Conditional Parameters</a> in the <i>Amazon DynamoDB Developer Guide</i>.</p>
489 #[serde(rename = "ComparisonOperator")]
490 pub comparison_operator: String,
491}
492
493/// <p>Represents a request to perform a check that an item exists or to check the condition of specific attributes of the item.</p>
494#[derive(Clone, Debug, Default, PartialEq, Serialize)]
495#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
496pub struct ConditionCheck {
497 /// <p>A condition that must be satisfied in order for a conditional update to succeed.</p>
498 #[serde(rename = "ConditionExpression")]
499 pub condition_expression: String,
500 /// <p>One or more substitution tokens for attribute names in an expression.</p>
501 #[serde(rename = "ExpressionAttributeNames")]
502 #[serde(skip_serializing_if = "Option::is_none")]
503 pub expression_attribute_names: Option<::std::collections::HashMap<String, String>>,
504 /// <p>One or more values that can be substituted in an expression.</p>
505 #[serde(rename = "ExpressionAttributeValues")]
506 #[serde(skip_serializing_if = "Option::is_none")]
507 pub expression_attribute_values: Option<::std::collections::HashMap<String, AttributeValue>>,
508 /// <p>The primary key of the item to be checked. Each element consists of an attribute name and a value for that attribute.</p>
509 #[serde(rename = "Key")]
510 pub key: ::std::collections::HashMap<String, AttributeValue>,
511 /// <p>Use <code>ReturnValuesOnConditionCheckFailure</code> to get the item attributes if the <code>ConditionCheck</code> condition fails. For <code>ReturnValuesOnConditionCheckFailure</code>, the valid values are: NONE and ALL_OLD.</p>
512 #[serde(rename = "ReturnValuesOnConditionCheckFailure")]
513 #[serde(skip_serializing_if = "Option::is_none")]
514 pub return_values_on_condition_check_failure: Option<String>,
515 /// <p>Name of the table for the check item request.</p>
516 #[serde(rename = "TableName")]
517 pub table_name: String,
518}
519
520/// <p>The capacity units consumed by an operation. The data returned includes the total provisioned throughput consumed, along with statistics for the table and any indexes involved in the operation. <code>ConsumedCapacity</code> is only returned if the request asked for it. For more information, see <a href="https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/ProvisionedThroughputIntro.html">Provisioned Throughput</a> in the <i>Amazon DynamoDB Developer Guide</i>.</p>
521#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
522#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
523pub struct ConsumedCapacity {
524 /// <p>The total number of capacity units consumed by the operation.</p>
525 #[serde(rename = "CapacityUnits")]
526 #[serde(skip_serializing_if = "Option::is_none")]
527 pub capacity_units: Option<f64>,
528 /// <p>The amount of throughput consumed on each global index affected by the operation.</p>
529 #[serde(rename = "GlobalSecondaryIndexes")]
530 #[serde(skip_serializing_if = "Option::is_none")]
531 pub global_secondary_indexes: Option<::std::collections::HashMap<String, Capacity>>,
532 /// <p>The amount of throughput consumed on each local index affected by the operation.</p>
533 #[serde(rename = "LocalSecondaryIndexes")]
534 #[serde(skip_serializing_if = "Option::is_none")]
535 pub local_secondary_indexes: Option<::std::collections::HashMap<String, Capacity>>,
536 /// <p>The total number of read capacity units consumed by the operation.</p>
537 #[serde(rename = "ReadCapacityUnits")]
538 #[serde(skip_serializing_if = "Option::is_none")]
539 pub read_capacity_units: Option<f64>,
540 /// <p>The amount of throughput consumed on the table affected by the operation.</p>
541 #[serde(rename = "Table")]
542 #[serde(skip_serializing_if = "Option::is_none")]
543 pub table: Option<Capacity>,
544 /// <p>The name of the table that was affected by the operation.</p>
545 #[serde(rename = "TableName")]
546 #[serde(skip_serializing_if = "Option::is_none")]
547 pub table_name: Option<String>,
548 /// <p>The total number of write capacity units consumed by the operation.</p>
549 #[serde(rename = "WriteCapacityUnits")]
550 #[serde(skip_serializing_if = "Option::is_none")]
551 pub write_capacity_units: Option<f64>,
552}
553
554/// <p>Represents the continuous backups and point in time recovery settings on the table.</p>
555#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
556#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
557pub struct ContinuousBackupsDescription {
558 /// <p> <code>ContinuousBackupsStatus</code> can be one of the following states: ENABLED, DISABLED</p>
559 #[serde(rename = "ContinuousBackupsStatus")]
560 pub continuous_backups_status: String,
561 /// <p>The description of the point in time recovery settings applied to the table.</p>
562 #[serde(rename = "PointInTimeRecoveryDescription")]
563 #[serde(skip_serializing_if = "Option::is_none")]
564 pub point_in_time_recovery_description: Option<PointInTimeRecoveryDescription>,
565}
566
567/// <p>Represents a Contributor Insights summary entry..</p>
568#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
569#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
570pub struct ContributorInsightsSummary {
571 /// <p>Describes the current status for contributor insights for the given table and index, if applicable.</p>
572 #[serde(rename = "ContributorInsightsStatus")]
573 #[serde(skip_serializing_if = "Option::is_none")]
574 pub contributor_insights_status: Option<String>,
575 /// <p>Name of the index associated with the summary, if any.</p>
576 #[serde(rename = "IndexName")]
577 #[serde(skip_serializing_if = "Option::is_none")]
578 pub index_name: Option<String>,
579 /// <p>Name of the table associated with the summary.</p>
580 #[serde(rename = "TableName")]
581 #[serde(skip_serializing_if = "Option::is_none")]
582 pub table_name: Option<String>,
583}
584
585#[derive(Clone, Debug, Default, PartialEq, Serialize)]
586#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
587pub struct CreateBackupInput {
588 /// <p>Specified name for the backup.</p>
589 #[serde(rename = "BackupName")]
590 pub backup_name: String,
591 /// <p>The name of the table.</p>
592 #[serde(rename = "TableName")]
593 pub table_name: String,
594}
595
596#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
597#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
598pub struct CreateBackupOutput {
599 /// <p>Contains the details of the backup created for the table.</p>
600 #[serde(rename = "BackupDetails")]
601 #[serde(skip_serializing_if = "Option::is_none")]
602 pub backup_details: Option<BackupDetails>,
603}
604
605/// <p>Represents a new global secondary index to be added to an existing table.</p>
606#[derive(Clone, Debug, Default, PartialEq, Serialize)]
607#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
608pub struct CreateGlobalSecondaryIndexAction {
609 /// <p>The name of the global secondary index to be created.</p>
610 #[serde(rename = "IndexName")]
611 pub index_name: String,
612 /// <p>The key schema for the global secondary index.</p>
613 #[serde(rename = "KeySchema")]
614 pub key_schema: Vec<KeySchemaElement>,
615 /// <p>Represents attributes that are copied (projected) from the table into an index. These are in addition to the primary key attributes and index key attributes, which are automatically projected.</p>
616 #[serde(rename = "Projection")]
617 pub projection: Projection,
618 /// <p>Represents the provisioned throughput settings for the specified global secondary index.</p> <p>For current minimum and maximum provisioned throughput values, see <a href="https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Limits.html">Limits</a> in the <i>Amazon DynamoDB Developer Guide</i>.</p>
619 #[serde(rename = "ProvisionedThroughput")]
620 #[serde(skip_serializing_if = "Option::is_none")]
621 pub provisioned_throughput: Option<ProvisionedThroughput>,
622}
623
624#[derive(Clone, Debug, Default, PartialEq, Serialize)]
625#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
626pub struct CreateGlobalTableInput {
627 /// <p>The global table name.</p>
628 #[serde(rename = "GlobalTableName")]
629 pub global_table_name: String,
630 /// <p>The Regions where the global table needs to be created.</p>
631 #[serde(rename = "ReplicationGroup")]
632 pub replication_group: Vec<Replica>,
633}
634
635#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
636#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
637pub struct CreateGlobalTableOutput {
638 /// <p>Contains the details of the global table.</p>
639 #[serde(rename = "GlobalTableDescription")]
640 #[serde(skip_serializing_if = "Option::is_none")]
641 pub global_table_description: Option<GlobalTableDescription>,
642}
643
644/// <p>Represents a replica to be added.</p>
645#[derive(Clone, Debug, Default, PartialEq, Serialize)]
646#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
647pub struct CreateReplicaAction {
648 /// <p>The Region of the replica to be added.</p>
649 #[serde(rename = "RegionName")]
650 pub region_name: String,
651}
652
653/// <p>Represents a replica to be created.</p>
654#[derive(Clone, Debug, Default, PartialEq, Serialize)]
655#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
656pub struct CreateReplicationGroupMemberAction {
657 /// <p>Replica-specific global secondary index settings.</p>
658 #[serde(rename = "GlobalSecondaryIndexes")]
659 #[serde(skip_serializing_if = "Option::is_none")]
660 pub global_secondary_indexes: Option<Vec<ReplicaGlobalSecondaryIndex>>,
661 /// <p>The AWS KMS customer master key (CMK) that should be used for AWS KMS encryption in the new replica. To specify a CMK, use its key ID, Amazon Resource Name (ARN), alias name, or alias ARN. Note that you should only provide this parameter if the key is different from the default DynamoDB KMS master key alias/aws/dynamodb.</p>
662 #[serde(rename = "KMSMasterKeyId")]
663 #[serde(skip_serializing_if = "Option::is_none")]
664 pub kms_master_key_id: Option<String>,
665 /// <p>Replica-specific provisioned throughput. If not specified, uses the source table's provisioned throughput settings.</p>
666 #[serde(rename = "ProvisionedThroughputOverride")]
667 #[serde(skip_serializing_if = "Option::is_none")]
668 pub provisioned_throughput_override: Option<ProvisionedThroughputOverride>,
669 /// <p>The Region where the new replica will be created.</p>
670 #[serde(rename = "RegionName")]
671 pub region_name: String,
672}
673
674/// <p>Represents the input of a <code>CreateTable</code> operation.</p>
675#[derive(Clone, Debug, Default, PartialEq, Serialize)]
676#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
677pub struct CreateTableInput {
678 /// <p>An array of attributes that describe the key schema for the table and indexes.</p>
679 #[serde(rename = "AttributeDefinitions")]
680 pub attribute_definitions: Vec<AttributeDefinition>,
681 /// <p><p>Controls how you are charged for read and write throughput and how you manage capacity. This setting can be changed later.</p> <ul> <li> <p> <code>PROVISIONED</code> - We recommend using <code>PROVISIONED</code> for predictable workloads. <code>PROVISIONED</code> sets the billing mode to <a href="https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/HowItWorks.ReadWriteCapacityMode.html#HowItWorks.ProvisionedThroughput.Manual">Provisioned Mode</a>.</p> </li> <li> <p> <code>PAY<em>PER</em>REQUEST</code> - We recommend using <code>PAY<em>PER</em>REQUEST</code> for unpredictable workloads. <code>PAY<em>PER</em>REQUEST</code> sets the billing mode to <a href="https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/HowItWorks.ReadWriteCapacityMode.html#HowItWorks.OnDemand">On-Demand Mode</a>. </p> </li> </ul></p>
682 #[serde(rename = "BillingMode")]
683 #[serde(skip_serializing_if = "Option::is_none")]
684 pub billing_mode: Option<String>,
685 /// <p><p>One or more global secondary indexes (the maximum is 20) to be created on the table. Each global secondary index in the array includes the following:</p> <ul> <li> <p> <code>IndexName</code> - The name of the global secondary index. Must be unique only for this table.</p> <p/> </li> <li> <p> <code>KeySchema</code> - Specifies the key schema for the global secondary index.</p> </li> <li> <p> <code>Projection</code> - Specifies attributes that are copied (projected) from the table into the index. These are in addition to the primary key attributes and index key attributes, which are automatically projected. Each attribute specification is composed of:</p> <ul> <li> <p> <code>ProjectionType</code> - One of the following:</p> <ul> <li> <p> <code>KEYS_ONLY</code> - Only the index and primary keys are projected into the index.</p> </li> <li> <p> <code>INCLUDE</code> - Only the specified table attributes are projected into the index. The list of projected attributes is in <code>NonKeyAttributes</code>.</p> </li> <li> <p> <code>ALL</code> - All of the table attributes are projected into the index.</p> </li> </ul> </li> <li> <p> <code>NonKeyAttributes</code> - A list of one or more non-key attribute names that are projected into the secondary index. The total count of attributes provided in <code>NonKeyAttributes</code>, summed across all of the secondary indexes, must not exceed 100. If you project the same attribute into two different indexes, this counts as two distinct attributes when determining the total.</p> </li> </ul> </li> <li> <p> <code>ProvisionedThroughput</code> - The provisioned throughput settings for the global secondary index, consisting of read and write capacity units.</p> </li> </ul></p>
686 #[serde(rename = "GlobalSecondaryIndexes")]
687 #[serde(skip_serializing_if = "Option::is_none")]
688 pub global_secondary_indexes: Option<Vec<GlobalSecondaryIndex>>,
689 /// <p>Specifies the attributes that make up the primary key for a table or an index. The attributes in <code>KeySchema</code> must also be defined in the <code>AttributeDefinitions</code> array. For more information, see <a href="https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/DataModel.html">Data Model</a> in the <i>Amazon DynamoDB Developer Guide</i>.</p> <p>Each <code>KeySchemaElement</code> in the array is composed of:</p> <ul> <li> <p> <code>AttributeName</code> - The name of this key attribute.</p> </li> <li> <p> <code>KeyType</code> - The role that the key attribute will assume:</p> <ul> <li> <p> <code>HASH</code> - partition key</p> </li> <li> <p> <code>RANGE</code> - sort key</p> </li> </ul> </li> </ul> <note> <p>The partition key of an item is also known as its <i>hash attribute</i>. The term "hash attribute" derives from the DynamoDB usage of an internal hash function to evenly distribute data items across partitions, based on their partition key values.</p> <p>The sort key of an item is also known as its <i>range attribute</i>. The term "range attribute" derives from the way DynamoDB stores items with the same partition key physically close together, in sorted order by the sort key value.</p> </note> <p>For a simple primary key (partition key), you must provide exactly one element with a <code>KeyType</code> of <code>HASH</code>.</p> <p>For a composite primary key (partition key and sort key), you must provide exactly two elements, in this order: The first element must have a <code>KeyType</code> of <code>HASH</code>, and the second element must have a <code>KeyType</code> of <code>RANGE</code>.</p> <p>For more information, see <a href="https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/WorkingWithTables.html#WorkingWithTables.primary.key">Working with Tables</a> in the <i>Amazon DynamoDB Developer Guide</i>.</p>
690 #[serde(rename = "KeySchema")]
691 pub key_schema: Vec<KeySchemaElement>,
692 /// <p><p>One or more local secondary indexes (the maximum is 5) to be created on the table. Each index is scoped to a given partition key value. There is a 10 GB size limit per partition key value; otherwise, the size of a local secondary index is unconstrained.</p> <p>Each local secondary index in the array includes the following:</p> <ul> <li> <p> <code>IndexName</code> - The name of the local secondary index. Must be unique only for this table.</p> <p/> </li> <li> <p> <code>KeySchema</code> - Specifies the key schema for the local secondary index. The key schema must begin with the same partition key as the table.</p> </li> <li> <p> <code>Projection</code> - Specifies attributes that are copied (projected) from the table into the index. These are in addition to the primary key attributes and index key attributes, which are automatically projected. Each attribute specification is composed of:</p> <ul> <li> <p> <code>ProjectionType</code> - One of the following:</p> <ul> <li> <p> <code>KEYS_ONLY</code> - Only the index and primary keys are projected into the index.</p> </li> <li> <p> <code>INCLUDE</code> - Only the specified table attributes are projected into the index. The list of projected attributes is in <code>NonKeyAttributes</code>.</p> </li> <li> <p> <code>ALL</code> - All of the table attributes are projected into the index.</p> </li> </ul> </li> <li> <p> <code>NonKeyAttributes</code> - A list of one or more non-key attribute names that are projected into the secondary index. The total count of attributes provided in <code>NonKeyAttributes</code>, summed across all of the secondary indexes, must not exceed 100. If you project the same attribute into two different indexes, this counts as two distinct attributes when determining the total.</p> </li> </ul> </li> </ul></p>
693 #[serde(rename = "LocalSecondaryIndexes")]
694 #[serde(skip_serializing_if = "Option::is_none")]
695 pub local_secondary_indexes: Option<Vec<LocalSecondaryIndex>>,
696 /// <p>Represents the provisioned throughput settings for a specified table or index. The settings can be modified using the <code>UpdateTable</code> operation.</p> <p> If you set BillingMode as <code>PROVISIONED</code>, you must specify this property. If you set BillingMode as <code>PAY_PER_REQUEST</code>, you cannot specify this property. </p> <p>For current minimum and maximum provisioned throughput values, see <a href="https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Limits.html">Limits</a> in the <i>Amazon DynamoDB Developer Guide</i>.</p>
697 #[serde(rename = "ProvisionedThroughput")]
698 #[serde(skip_serializing_if = "Option::is_none")]
699 pub provisioned_throughput: Option<ProvisionedThroughput>,
700 /// <p>Represents the settings used to enable server-side encryption.</p>
701 #[serde(rename = "SSESpecification")]
702 #[serde(skip_serializing_if = "Option::is_none")]
703 pub sse_specification: Option<SSESpecification>,
704 /// <p><p>The settings for DynamoDB Streams on the table. These settings consist of:</p> <ul> <li> <p> <code>StreamEnabled</code> - Indicates whether DynamoDB Streams is to be enabled (true) or disabled (false).</p> </li> <li> <p> <code>StreamViewType</code> - When an item in the table is modified, <code>StreamViewType</code> determines what information is written to the table's stream. Valid values for <code>StreamViewType</code> are:</p> <ul> <li> <p> <code>KEYS<em>ONLY</code> - Only the key attributes of the modified item are written to the stream.</p> </li> <li> <p> <code>NEW</em>IMAGE</code> - The entire item, as it appears after it was modified, is written to the stream.</p> </li> <li> <p> <code>OLD<em>IMAGE</code> - The entire item, as it appeared before it was modified, is written to the stream.</p> </li> <li> <p> <code>NEW</em>AND<em>OLD</em>IMAGES</code> - Both the new and the old item images of the item are written to the stream.</p> </li> </ul> </li> </ul></p>
705 #[serde(rename = "StreamSpecification")]
706 #[serde(skip_serializing_if = "Option::is_none")]
707 pub stream_specification: Option<StreamSpecification>,
708 /// <p>The name of the table to create.</p>
709 #[serde(rename = "TableName")]
710 pub table_name: String,
711 /// <p>A list of key-value pairs to label the table. For more information, see <a href="https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Tagging.html">Tagging for DynamoDB</a>.</p>
712 #[serde(rename = "Tags")]
713 #[serde(skip_serializing_if = "Option::is_none")]
714 pub tags: Option<Vec<Tag>>,
715}
716
717/// <p>Represents the output of a <code>CreateTable</code> operation.</p>
718#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
719#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
720pub struct CreateTableOutput {
721 /// <p>Represents the properties of the table.</p>
722 #[serde(rename = "TableDescription")]
723 #[serde(skip_serializing_if = "Option::is_none")]
724 pub table_description: Option<TableDescription>,
725}
726
727/// <p>Represents a request to perform a <code>DeleteItem</code> operation.</p>
728#[derive(Clone, Debug, Default, PartialEq, Serialize)]
729#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
730pub struct Delete {
731 /// <p>A condition that must be satisfied in order for a conditional delete to succeed.</p>
732 #[serde(rename = "ConditionExpression")]
733 #[serde(skip_serializing_if = "Option::is_none")]
734 pub condition_expression: Option<String>,
735 /// <p>One or more substitution tokens for attribute names in an expression.</p>
736 #[serde(rename = "ExpressionAttributeNames")]
737 #[serde(skip_serializing_if = "Option::is_none")]
738 pub expression_attribute_names: Option<::std::collections::HashMap<String, String>>,
739 /// <p>One or more values that can be substituted in an expression.</p>
740 #[serde(rename = "ExpressionAttributeValues")]
741 #[serde(skip_serializing_if = "Option::is_none")]
742 pub expression_attribute_values: Option<::std::collections::HashMap<String, AttributeValue>>,
743 /// <p>The primary key of the item to be deleted. Each element consists of an attribute name and a value for that attribute.</p>
744 #[serde(rename = "Key")]
745 pub key: ::std::collections::HashMap<String, AttributeValue>,
746 /// <p>Use <code>ReturnValuesOnConditionCheckFailure</code> to get the item attributes if the <code>Delete</code> condition fails. For <code>ReturnValuesOnConditionCheckFailure</code>, the valid values are: NONE and ALL_OLD.</p>
747 #[serde(rename = "ReturnValuesOnConditionCheckFailure")]
748 #[serde(skip_serializing_if = "Option::is_none")]
749 pub return_values_on_condition_check_failure: Option<String>,
750 /// <p>Name of the table in which the item to be deleted resides.</p>
751 #[serde(rename = "TableName")]
752 pub table_name: String,
753}
754
755#[derive(Clone, Debug, Default, PartialEq, Serialize)]
756#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
757pub struct DeleteBackupInput {
758 /// <p>The ARN associated with the backup.</p>
759 #[serde(rename = "BackupArn")]
760 pub backup_arn: String,
761}
762
763#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
764#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
765pub struct DeleteBackupOutput {
766 /// <p>Contains the description of the backup created for the table.</p>
767 #[serde(rename = "BackupDescription")]
768 #[serde(skip_serializing_if = "Option::is_none")]
769 pub backup_description: Option<BackupDescription>,
770}
771
772/// <p>Represents a global secondary index to be deleted from an existing table.</p>
773#[derive(Clone, Debug, Default, PartialEq, Serialize)]
774#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
775pub struct DeleteGlobalSecondaryIndexAction {
776 /// <p>The name of the global secondary index to be deleted.</p>
777 #[serde(rename = "IndexName")]
778 pub index_name: String,
779}
780
781/// <p>Represents the input of a <code>DeleteItem</code> operation.</p>
782#[derive(Clone, Debug, Default, PartialEq, Serialize)]
783#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
784pub struct DeleteItemInput {
785 /// <p>A condition that must be satisfied in order for a conditional <code>DeleteItem</code> to succeed.</p> <p>An expression can contain any of the following:</p> <ul> <li> <p>Functions: <code>attribute_exists | attribute_not_exists | attribute_type | contains | begins_with | size</code> </p> <p>These function names are case-sensitive.</p> </li> <li> <p>Comparison operators: <code>= | <> | < | > | <= | >= | BETWEEN | IN </code> </p> </li> <li> <p> Logical operators: <code>AND | OR | NOT</code> </p> </li> </ul> <p>For more information about condition expressions, see <a href="https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Expressions.SpecifyingConditions.html">Condition Expressions</a> in the <i>Amazon DynamoDB Developer Guide</i>.</p>
786 #[serde(rename = "ConditionExpression")]
787 #[serde(skip_serializing_if = "Option::is_none")]
788 pub condition_expression: Option<String>,
789 /// <p>This is a legacy parameter. Use <code>ConditionExpression</code> instead. For more information, see <a href="https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/LegacyConditionalParameters.ConditionalOperator.html">ConditionalOperator</a> in the <i>Amazon DynamoDB Developer Guide</i>.</p>
790 #[serde(rename = "ConditionalOperator")]
791 #[serde(skip_serializing_if = "Option::is_none")]
792 pub conditional_operator: Option<String>,
793 /// <p>This is a legacy parameter. Use <code>ConditionExpression</code> instead. For more information, see <a href="https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/LegacyConditionalParameters.Expected.html">Expected</a> in the <i>Amazon DynamoDB Developer Guide</i>.</p>
794 #[serde(rename = "Expected")]
795 #[serde(skip_serializing_if = "Option::is_none")]
796 pub expected: Option<::std::collections::HashMap<String, ExpectedAttributeValue>>,
797 /// <p>One or more substitution tokens for attribute names in an expression. The following are some use cases for using <code>ExpressionAttributeNames</code>:</p> <ul> <li> <p>To access an attribute whose name conflicts with a DynamoDB reserved word.</p> </li> <li> <p>To create a placeholder for repeating occurrences of an attribute name in an expression.</p> </li> <li> <p>To prevent special characters in an attribute name from being misinterpreted in an expression.</p> </li> </ul> <p>Use the <b>#</b> character in an expression to dereference an attribute name. For example, consider the following attribute name:</p> <ul> <li> <p> <code>Percentile</code> </p> </li> </ul> <p>The name of this attribute conflicts with a reserved word, so it cannot be used directly in an expression. (For the complete list of reserved words, see <a href="https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/ReservedWords.html">Reserved Words</a> in the <i>Amazon DynamoDB Developer Guide</i>). To work around this, you could specify the following for <code>ExpressionAttributeNames</code>:</p> <ul> <li> <p> <code>{"#P":"Percentile"}</code> </p> </li> </ul> <p>You could then use this substitution in an expression, as in this example:</p> <ul> <li> <p> <code>#P = :val</code> </p> </li> </ul> <note> <p>Tokens that begin with the <b>:</b> character are <i>expression attribute values</i>, which are placeholders for the actual value at runtime.</p> </note> <p>For more information on expression attribute names, see <a href="https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Expressions.AccessingItemAttributes.html">Specifying Item Attributes</a> in the <i>Amazon DynamoDB Developer Guide</i>.</p>
798 #[serde(rename = "ExpressionAttributeNames")]
799 #[serde(skip_serializing_if = "Option::is_none")]
800 pub expression_attribute_names: Option<::std::collections::HashMap<String, String>>,
801 /// <p>One or more values that can be substituted in an expression.</p> <p>Use the <b>:</b> (colon) character in an expression to dereference an attribute value. For example, suppose that you wanted to check whether the value of the <i>ProductStatus</i> attribute was one of the following: </p> <p> <code>Available | Backordered | Discontinued</code> </p> <p>You would first need to specify <code>ExpressionAttributeValues</code> as follows:</p> <p> <code>{ ":avail":{"S":"Available"}, ":back":{"S":"Backordered"}, ":disc":{"S":"Discontinued"} }</code> </p> <p>You could then use these values in an expression, such as this:</p> <p> <code>ProductStatus IN (:avail, :back, :disc)</code> </p> <p>For more information on expression attribute values, see <a href="https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Expressions.SpecifyingConditions.html">Condition Expressions</a> in the <i>Amazon DynamoDB Developer Guide</i>.</p>
802 #[serde(rename = "ExpressionAttributeValues")]
803 #[serde(skip_serializing_if = "Option::is_none")]
804 pub expression_attribute_values: Option<::std::collections::HashMap<String, AttributeValue>>,
805 /// <p>A map of attribute names to <code>AttributeValue</code> objects, representing the primary key of the item to delete.</p> <p>For the primary key, you must provide all of the attributes. For example, with a simple primary key, you only need to provide a value for the partition key. For a composite primary key, you must provide values for both the partition key and the sort key.</p>
806 #[serde(rename = "Key")]
807 pub key: ::std::collections::HashMap<String, AttributeValue>,
808 #[serde(rename = "ReturnConsumedCapacity")]
809 #[serde(skip_serializing_if = "Option::is_none")]
810 pub return_consumed_capacity: Option<String>,
811 /// <p>Determines whether item collection metrics are returned. If set to <code>SIZE</code>, the response includes statistics about item collections, if any, that were modified during the operation are returned in the response. If set to <code>NONE</code> (the default), no statistics are returned.</p>
812 #[serde(rename = "ReturnItemCollectionMetrics")]
813 #[serde(skip_serializing_if = "Option::is_none")]
814 pub return_item_collection_metrics: Option<String>,
815 /// <p><p>Use <code>ReturnValues</code> if you want to get the item attributes as they appeared before they were deleted. For <code>DeleteItem</code>, the valid values are:</p> <ul> <li> <p> <code>NONE</code> - If <code>ReturnValues</code> is not specified, or if its value is <code>NONE</code>, then nothing is returned. (This setting is the default for <code>ReturnValues</code>.)</p> </li> <li> <p> <code>ALL<em>OLD</code> - The content of the old item is returned.</p> </li> </ul> <note> <p>The <code>ReturnValues</code> parameter is used by several DynamoDB operations; however, <code>DeleteItem</code> does not recognize any values other than <code>NONE</code> or <code>ALL</em>OLD</code>.</p> </note></p>
816 #[serde(rename = "ReturnValues")]
817 #[serde(skip_serializing_if = "Option::is_none")]
818 pub return_values: Option<String>,
819 /// <p>The name of the table from which to delete the item.</p>
820 #[serde(rename = "TableName")]
821 pub table_name: String,
822}
823
824/// <p>Represents the output of a <code>DeleteItem</code> operation.</p>
825#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
826#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
827pub struct DeleteItemOutput {
828 /// <p>A map of attribute names to <code>AttributeValue</code> objects, representing the item as it appeared before the <code>DeleteItem</code> operation. This map appears in the response only if <code>ReturnValues</code> was specified as <code>ALL_OLD</code> in the request.</p>
829 #[serde(rename = "Attributes")]
830 #[serde(skip_serializing_if = "Option::is_none")]
831 pub attributes: Option<::std::collections::HashMap<String, AttributeValue>>,
832 /// <p>The capacity units consumed by the <code>DeleteItem</code> operation. The data returned includes the total provisioned throughput consumed, along with statistics for the table and any indexes involved in the operation. <code>ConsumedCapacity</code> is only returned if the <code>ReturnConsumedCapacity</code> parameter was specified. For more information, see <a href="https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/ProvisionedThroughputIntro.html">Provisioned Mode</a> in the <i>Amazon DynamoDB Developer Guide</i>.</p>
833 #[serde(rename = "ConsumedCapacity")]
834 #[serde(skip_serializing_if = "Option::is_none")]
835 pub consumed_capacity: Option<ConsumedCapacity>,
836 /// <p><p>Information about item collections, if any, that were affected by the <code>DeleteItem</code> operation. <code>ItemCollectionMetrics</code> is only returned if the <code>ReturnItemCollectionMetrics</code> parameter was specified. If the table does not have any local secondary indexes, this information is not returned in the response.</p> <p>Each <code>ItemCollectionMetrics</code> element consists of:</p> <ul> <li> <p> <code>ItemCollectionKey</code> - The partition key value of the item collection. This is the same as the partition key value of the item itself.</p> </li> <li> <p> <code>SizeEstimateRangeGB</code> - An estimate of item collection size, in gigabytes. This value is a two-element array containing a lower bound and an upper bound for the estimate. The estimate includes the size of all the items in the table, plus the size of all attributes projected into all of the local secondary indexes on that table. Use this estimate to measure whether a local secondary index is approaching its size limit.</p> <p>The estimate is subject to change over time; therefore, do not rely on the precision or accuracy of the estimate.</p> </li> </ul></p>
837 #[serde(rename = "ItemCollectionMetrics")]
838 #[serde(skip_serializing_if = "Option::is_none")]
839 pub item_collection_metrics: Option<ItemCollectionMetrics>,
840}
841
842/// <p>Represents a replica to be removed.</p>
843#[derive(Clone, Debug, Default, PartialEq, Serialize)]
844#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
845pub struct DeleteReplicaAction {
846 /// <p>The Region of the replica to be removed.</p>
847 #[serde(rename = "RegionName")]
848 pub region_name: String,
849}
850
851/// <p>Represents a replica to be deleted.</p>
852#[derive(Clone, Debug, Default, PartialEq, Serialize)]
853#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
854pub struct DeleteReplicationGroupMemberAction {
855 /// <p>The Region where the replica exists.</p>
856 #[serde(rename = "RegionName")]
857 pub region_name: String,
858}
859
860/// <p>Represents a request to perform a <code>DeleteItem</code> operation on an item.</p>
861#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
862pub struct DeleteRequest {
863 /// <p>A map of attribute name to attribute values, representing the primary key of the item to delete. All of the table's primary key attributes must be specified, and their data types must match those of the table's key schema.</p>
864 #[serde(rename = "Key")]
865 pub key: ::std::collections::HashMap<String, AttributeValue>,
866}
867
868/// <p>Represents the input of a <code>DeleteTable</code> operation.</p>
869#[derive(Clone, Debug, Default, PartialEq, Serialize)]
870#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
871pub struct DeleteTableInput {
872 /// <p>The name of the table to delete.</p>
873 #[serde(rename = "TableName")]
874 pub table_name: String,
875}
876
877/// <p>Represents the output of a <code>DeleteTable</code> operation.</p>
878#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
879#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
880pub struct DeleteTableOutput {
881 /// <p>Represents the properties of a table.</p>
882 #[serde(rename = "TableDescription")]
883 #[serde(skip_serializing_if = "Option::is_none")]
884 pub table_description: Option<TableDescription>,
885}
886
887#[derive(Clone, Debug, Default, PartialEq, Serialize)]
888#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
889pub struct DescribeBackupInput {
890 /// <p>The Amazon Resource Name (ARN) associated with the backup.</p>
891 #[serde(rename = "BackupArn")]
892 pub backup_arn: String,
893}
894
895#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
896#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
897pub struct DescribeBackupOutput {
898 /// <p>Contains the description of the backup created for the table.</p>
899 #[serde(rename = "BackupDescription")]
900 #[serde(skip_serializing_if = "Option::is_none")]
901 pub backup_description: Option<BackupDescription>,
902}
903
904#[derive(Clone, Debug, Default, PartialEq, Serialize)]
905#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
906pub struct DescribeContinuousBackupsInput {
907 /// <p>Name of the table for which the customer wants to check the continuous backups and point in time recovery settings.</p>
908 #[serde(rename = "TableName")]
909 pub table_name: String,
910}
911
912#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
913#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
914pub struct DescribeContinuousBackupsOutput {
915 /// <p>Represents the continuous backups and point in time recovery settings on the table.</p>
916 #[serde(rename = "ContinuousBackupsDescription")]
917 #[serde(skip_serializing_if = "Option::is_none")]
918 pub continuous_backups_description: Option<ContinuousBackupsDescription>,
919}
920
921#[derive(Clone, Debug, Default, PartialEq, Serialize)]
922#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
923pub struct DescribeContributorInsightsInput {
924 /// <p>The name of the global secondary index to describe, if applicable.</p>
925 #[serde(rename = "IndexName")]
926 #[serde(skip_serializing_if = "Option::is_none")]
927 pub index_name: Option<String>,
928 /// <p>The name of the table to describe.</p>
929 #[serde(rename = "TableName")]
930 pub table_name: String,
931}
932
933#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
934#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
935pub struct DescribeContributorInsightsOutput {
936 /// <p>List of names of the associated Alpine rules.</p>
937 #[serde(rename = "ContributorInsightsRuleList")]
938 #[serde(skip_serializing_if = "Option::is_none")]
939 pub contributor_insights_rule_list: Option<Vec<String>>,
940 /// <p>Current Status contributor insights.</p>
941 #[serde(rename = "ContributorInsightsStatus")]
942 #[serde(skip_serializing_if = "Option::is_none")]
943 pub contributor_insights_status: Option<String>,
944 /// <p><p>Returns information about the last failure that encountered.</p> <p>The most common exceptions for a FAILED status are:</p> <ul> <li> <p>LimitExceededException - Per-account Amazon CloudWatch Contributor Insights rule limit reached. Please disable Contributor Insights for other tables/indexes OR disable Contributor Insights rules before retrying.</p> </li> <li> <p>AccessDeniedException - Amazon CloudWatch Contributor Insights rules cannot be modified due to insufficient permissions.</p> </li> <li> <p>AccessDeniedException - Failed to create service-linked role for Contributor Insights due to insufficient permissions.</p> </li> <li> <p>InternalServerError - Failed to create Amazon CloudWatch Contributor Insights rules. Please retry request.</p> </li> </ul></p>
945 #[serde(rename = "FailureException")]
946 #[serde(skip_serializing_if = "Option::is_none")]
947 pub failure_exception: Option<FailureException>,
948 /// <p>The name of the global secondary index being described.</p>
949 #[serde(rename = "IndexName")]
950 #[serde(skip_serializing_if = "Option::is_none")]
951 pub index_name: Option<String>,
952 /// <p>Timestamp of the last time the status was changed.</p>
953 #[serde(rename = "LastUpdateDateTime")]
954 #[serde(skip_serializing_if = "Option::is_none")]
955 pub last_update_date_time: Option<f64>,
956 /// <p>The name of the table being described.</p>
957 #[serde(rename = "TableName")]
958 #[serde(skip_serializing_if = "Option::is_none")]
959 pub table_name: Option<String>,
960}
961
962#[derive(Clone, Debug, Default, PartialEq, Serialize)]
963#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
964pub struct DescribeEndpointsRequest {}
965
966#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
967#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
968pub struct DescribeEndpointsResponse {
969 /// <p>List of endpoints.</p>
970 #[serde(rename = "Endpoints")]
971 pub endpoints: Vec<Endpoint>,
972}
973
974#[derive(Clone, Debug, Default, PartialEq, Serialize)]
975#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
976pub struct DescribeGlobalTableInput {
977 /// <p>The name of the global table.</p>
978 #[serde(rename = "GlobalTableName")]
979 pub global_table_name: String,
980}
981
982#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
983#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
984pub struct DescribeGlobalTableOutput {
985 /// <p>Contains the details of the global table.</p>
986 #[serde(rename = "GlobalTableDescription")]
987 #[serde(skip_serializing_if = "Option::is_none")]
988 pub global_table_description: Option<GlobalTableDescription>,
989}
990
991#[derive(Clone, Debug, Default, PartialEq, Serialize)]
992#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
993pub struct DescribeGlobalTableSettingsInput {
994 /// <p>The name of the global table to describe.</p>
995 #[serde(rename = "GlobalTableName")]
996 pub global_table_name: String,
997}
998
999#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
1000#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
1001pub struct DescribeGlobalTableSettingsOutput {
1002 /// <p>The name of the global table.</p>
1003 #[serde(rename = "GlobalTableName")]
1004 #[serde(skip_serializing_if = "Option::is_none")]
1005 pub global_table_name: Option<String>,
1006 /// <p>The Region-specific settings for the global table.</p>
1007 #[serde(rename = "ReplicaSettings")]
1008 #[serde(skip_serializing_if = "Option::is_none")]
1009 pub replica_settings: Option<Vec<ReplicaSettingsDescription>>,
1010}
1011
1012/// <p>Represents the input of a <code>DescribeLimits</code> operation. Has no content.</p>
1013#[derive(Clone, Debug, Default, PartialEq, Serialize)]
1014#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
1015pub struct DescribeLimitsInput {}
1016
1017/// <p>Represents the output of a <code>DescribeLimits</code> operation.</p>
1018#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
1019#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
1020pub struct DescribeLimitsOutput {
1021 /// <p>The maximum total read capacity units that your account allows you to provision across all of your tables in this Region.</p>
1022 #[serde(rename = "AccountMaxReadCapacityUnits")]
1023 #[serde(skip_serializing_if = "Option::is_none")]
1024 pub account_max_read_capacity_units: Option<i64>,
1025 /// <p>The maximum total write capacity units that your account allows you to provision across all of your tables in this Region.</p>
1026 #[serde(rename = "AccountMaxWriteCapacityUnits")]
1027 #[serde(skip_serializing_if = "Option::is_none")]
1028 pub account_max_write_capacity_units: Option<i64>,
1029 /// <p>The maximum read capacity units that your account allows you to provision for a new table that you are creating in this Region, including the read capacity units provisioned for its global secondary indexes (GSIs).</p>
1030 #[serde(rename = "TableMaxReadCapacityUnits")]
1031 #[serde(skip_serializing_if = "Option::is_none")]
1032 pub table_max_read_capacity_units: Option<i64>,
1033 /// <p>The maximum write capacity units that your account allows you to provision for a new table that you are creating in this Region, including the write capacity units provisioned for its global secondary indexes (GSIs).</p>
1034 #[serde(rename = "TableMaxWriteCapacityUnits")]
1035 #[serde(skip_serializing_if = "Option::is_none")]
1036 pub table_max_write_capacity_units: Option<i64>,
1037}
1038
1039/// <p>Represents the input of a <code>DescribeTable</code> operation.</p>
1040#[derive(Clone, Debug, Default, PartialEq, Serialize)]
1041#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
1042pub struct DescribeTableInput {
1043 /// <p>The name of the table to describe.</p>
1044 #[serde(rename = "TableName")]
1045 pub table_name: String,
1046}
1047
1048/// <p>Represents the output of a <code>DescribeTable</code> operation.</p>
1049#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
1050#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
1051pub struct DescribeTableOutput {
1052 /// <p>The properties of the table.</p>
1053 #[serde(rename = "Table")]
1054 #[serde(skip_serializing_if = "Option::is_none")]
1055 pub table: Option<TableDescription>,
1056}
1057
1058#[derive(Clone, Debug, Default, PartialEq, Serialize)]
1059#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
1060pub struct DescribeTableReplicaAutoScalingInput {
1061 /// <p>The name of the table.</p>
1062 #[serde(rename = "TableName")]
1063 pub table_name: String,
1064}
1065
1066#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
1067#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
1068pub struct DescribeTableReplicaAutoScalingOutput {
1069 /// <p>Represents the auto scaling properties of the table.</p>
1070 #[serde(rename = "TableAutoScalingDescription")]
1071 #[serde(skip_serializing_if = "Option::is_none")]
1072 pub table_auto_scaling_description: Option<TableAutoScalingDescription>,
1073}
1074
1075#[derive(Clone, Debug, Default, PartialEq, Serialize)]
1076#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
1077pub struct DescribeTimeToLiveInput {
1078 /// <p>The name of the table to be described.</p>
1079 #[serde(rename = "TableName")]
1080 pub table_name: String,
1081}
1082
1083#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
1084#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
1085pub struct DescribeTimeToLiveOutput {
1086 /// <p><p/></p>
1087 #[serde(rename = "TimeToLiveDescription")]
1088 #[serde(skip_serializing_if = "Option::is_none")]
1089 pub time_to_live_description: Option<TimeToLiveDescription>,
1090}
1091
1092/// <p>An endpoint information details.</p>
1093#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
1094#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
1095pub struct Endpoint {
1096 /// <p>IP address of the endpoint.</p>
1097 #[serde(rename = "Address")]
1098 pub address: String,
1099 /// <p>Endpoint cache time to live (TTL) value.</p>
1100 #[serde(rename = "CachePeriodInMinutes")]
1101 pub cache_period_in_minutes: i64,
1102}
1103
1104/// <p>Represents a condition to be compared with an attribute value. This condition can be used with <code>DeleteItem</code>, <code>PutItem</code>, or <code>UpdateItem</code> operations; if the comparison evaluates to true, the operation succeeds; if not, the operation fails. You can use <code>ExpectedAttributeValue</code> in one of two different ways:</p> <ul> <li> <p>Use <code>AttributeValueList</code> to specify one or more values to compare against an attribute. Use <code>ComparisonOperator</code> to specify how you want to perform the comparison. If the comparison evaluates to true, then the conditional operation succeeds.</p> </li> <li> <p>Use <code>Value</code> to specify a value that DynamoDB will compare against an attribute. If the values match, then <code>ExpectedAttributeValue</code> evaluates to true and the conditional operation succeeds. Optionally, you can also set <code>Exists</code> to false, indicating that you <i>do not</i> expect to find the attribute value in the table. In this case, the conditional operation succeeds only if the comparison evaluates to false.</p> </li> </ul> <p> <code>Value</code> and <code>Exists</code> are incompatible with <code>AttributeValueList</code> and <code>ComparisonOperator</code>. Note that if you use both sets of parameters at once, DynamoDB will return a <code>ValidationException</code> exception.</p>
1105#[derive(Clone, Debug, Default, PartialEq, Serialize)]
1106#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
1107pub struct ExpectedAttributeValue {
1108 /// <p>One or more values to evaluate against the supplied attribute. The number of values in the list depends on the <code>ComparisonOperator</code> being used.</p> <p>For type Number, value comparisons are numeric.</p> <p>String value comparisons for greater than, equals, or less than are based on ASCII character code values. For example, <code>a</code> is greater than <code>A</code>, and <code>a</code> is greater than <code>B</code>. For a list of code values, see <a href="http://en.wikipedia.org/wiki/ASCII#ASCII_printable_characters">http://en.wikipedia.org/wiki/ASCII#ASCII_printable_characters</a>.</p> <p>For Binary, DynamoDB treats each byte of the binary data as unsigned when it compares binary values.</p> <p>For information on specifying data types in JSON, see <a href="https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/DataFormat.html">JSON Data Format</a> in the <i>Amazon DynamoDB Developer Guide</i>.</p>
1109 #[serde(rename = "AttributeValueList")]
1110 #[serde(skip_serializing_if = "Option::is_none")]
1111 pub attribute_value_list: Option<Vec<AttributeValue>>,
1112 /// <p><p>A comparator for evaluating attributes in the <code>AttributeValueList</code>. For example, equals, greater than, less than, etc.</p> <p>The following comparison operators are available:</p> <p> <code>EQ | NE | LE | LT | GE | GT | NOT<em>NULL | NULL | CONTAINS | NOT</em>CONTAINS | BEGINS<em>WITH | IN | BETWEEN</code> </p> <p>The following are descriptions of each comparison operator.</p> <ul> <li> <p> <code>EQ</code> : Equal. <code>EQ</code> is supported for all data types, including lists and maps.</p> <p> <code>AttributeValueList</code> can contain only one <code>AttributeValue</code> element of type String, Number, Binary, String Set, Number Set, or Binary Set. If an item contains an <code>AttributeValue</code> element of a different type than the one provided in the request, the value does not match. For example, <code>{"S":"6"}</code> does not equal <code>{"N":"6"}</code>. Also, <code>{"N":"6"}</code> does not equal <code>{"NS":["6", "2", "1"]}</code>.</p> <p/> </li> <li> <p> <code>NE</code> : Not equal. <code>NE</code> is supported for all data types, including lists and maps.</p> <p> <code>AttributeValueList</code> can contain only one <code>AttributeValue</code> of type String, Number, Binary, String Set, Number Set, or Binary Set. If an item contains an <code>AttributeValue</code> of a different type than the one provided in the request, the value does not match. For example, <code>{"S":"6"}</code> does not equal <code>{"N":"6"}</code>. Also, <code>{"N":"6"}</code> does not equal <code>{"NS":["6", "2", "1"]}</code>.</p> <p/> </li> <li> <p> <code>LE</code> : Less than or equal. </p> <p> <code>AttributeValueList</code> can contain only one <code>AttributeValue</code> element of type String, Number, or Binary (not a set type). If an item contains an <code>AttributeValue</code> element of a different type than the one provided in the request, the value does not match. For example, <code>{"S":"6"}</code> does not equal <code>{"N":"6"}</code>. Also, <code>{"N":"6"}</code> does not compare to <code>{"NS":["6", "2", "1"]}</code>.</p> <p/> </li> <li> <p> <code>LT</code> : Less than. </p> <p> <code>AttributeValueList</code> can contain only one <code>AttributeValue</code> of type String, Number, or Binary (not a set type). If an item contains an <code>AttributeValue</code> element of a different type than the one provided in the request, the value does not match. For example, <code>{"S":"6"}</code> does not equal <code>{"N":"6"}</code>. Also, <code>{"N":"6"}</code> does not compare to <code>{"NS":["6", "2", "1"]}</code>.</p> <p/> </li> <li> <p> <code>GE</code> : Greater than or equal. </p> <p> <code>AttributeValueList</code> can contain only one <code>AttributeValue</code> element of type String, Number, or Binary (not a set type). If an item contains an <code>AttributeValue</code> element of a different type than the one provided in the request, the value does not match. For example, <code>{"S":"6"}</code> does not equal <code>{"N":"6"}</code>. Also, <code>{"N":"6"}</code> does not compare to <code>{"NS":["6", "2", "1"]}</code>.</p> <p/> </li> <li> <p> <code>GT</code> : Greater than. </p> <p> <code>AttributeValueList</code> can contain only one <code>AttributeValue</code> element of type String, Number, or Binary (not a set type). If an item contains an <code>AttributeValue</code> element of a different type than the one provided in the request, the value does not match. For example, <code>{"S":"6"}</code> does not equal <code>{"N":"6"}</code>. Also, <code>{"N":"6"}</code> does not compare to <code>{"NS":["6", "2", "1"]}</code>.</p> <p/> </li> <li> <p> <code>NOT</em>NULL</code> : The attribute exists. <code>NOT<em>NULL</code> is supported for all data types, including lists and maps.</p> <note> <p>This operator tests for the existence of an attribute, not its data type. If the data type of attribute "<code>a</code>" is null, and you evaluate it using <code>NOT</em>NULL</code>, the result is a Boolean <code>true</code>. This result is because the attribute "<code>a</code>" exists; its data type is not relevant to the <code>NOT<em>NULL</code> comparison operator.</p> </note> </li> <li> <p> <code>NULL</code> : The attribute does not exist. <code>NULL</code> is supported for all data types, including lists and maps.</p> <note> <p>This operator tests for the nonexistence of an attribute, not its data type. If the data type of attribute "<code>a</code>" is null, and you evaluate it using <code>NULL</code>, the result is a Boolean <code>false</code>. This is because the attribute "<code>a</code>" exists; its data type is not relevant to the <code>NULL</code> comparison operator.</p> </note> </li> <li> <p> <code>CONTAINS</code> : Checks for a subsequence, or value in a set.</p> <p> <code>AttributeValueList</code> can contain only one <code>AttributeValue</code> element of type String, Number, or Binary (not a set type). If the target attribute of the comparison is of type String, then the operator checks for a substring match. If the target attribute of the comparison is of type Binary, then the operator looks for a subsequence of the target that matches the input. If the target attribute of the comparison is a set ("<code>SS</code>", "<code>NS</code>", or "<code>BS</code>"), then the operator evaluates to true if it finds an exact match with any member of the set.</p> <p>CONTAINS is supported for lists: When evaluating "<code>a CONTAINS b</code>", "<code>a</code>" can be a list; however, "<code>b</code>" cannot be a set, a map, or a list.</p> </li> <li> <p> <code>NOT</em>CONTAINS</code> : Checks for absence of a subsequence, or absence of a value in a set.</p> <p> <code>AttributeValueList</code> can contain only one <code>AttributeValue</code> element of type String, Number, or Binary (not a set type). If the target attribute of the comparison is a String, then the operator checks for the absence of a substring match. If the target attribute of the comparison is Binary, then the operator checks for the absence of a subsequence of the target that matches the input. If the target attribute of the comparison is a set ("<code>SS</code>", "<code>NS</code>", or "<code>BS</code>"), then the operator evaluates to true if it <i>does not</i> find an exact match with any member of the set.</p> <p>NOT<em>CONTAINS is supported for lists: When evaluating "<code>a NOT CONTAINS b</code>", "<code>a</code>" can be a list; however, "<code>b</code>" cannot be a set, a map, or a list.</p> </li> <li> <p> <code>BEGINS</em>WITH</code> : Checks for a prefix. </p> <p> <code>AttributeValueList</code> can contain only one <code>AttributeValue</code> of type String or Binary (not a Number or a set type). The target attribute of the comparison must be of type String or Binary (not a Number or a set type).</p> <p/> </li> <li> <p> <code>IN</code> : Checks for matching elements in a list.</p> <p> <code>AttributeValueList</code> can contain one or more <code>AttributeValue</code> elements of type String, Number, or Binary. These attributes are compared against an existing attribute of an item. If any elements of the input are equal to the item attribute, the expression evaluates to true.</p> </li> <li> <p> <code>BETWEEN</code> : Greater than or equal to the first value, and less than or equal to the second value. </p> <p> <code>AttributeValueList</code> must contain two <code>AttributeValue</code> elements of the same type, either String, Number, or Binary (not a set type). A target attribute matches if the target value is greater than, or equal to, the first element and less than, or equal to, the second element. If an item contains an <code>AttributeValue</code> element of a different type than the one provided in the request, the value does not match. For example, <code>{"S":"6"}</code> does not compare to <code>{"N":"6"}</code>. Also, <code>{"N":"6"}</code> does not compare to <code>{"NS":["6", "2", "1"]}</code> </p> </li> </ul></p>
1113 #[serde(rename = "ComparisonOperator")]
1114 #[serde(skip_serializing_if = "Option::is_none")]
1115 pub comparison_operator: Option<String>,
1116 /// <p><p>Causes DynamoDB to evaluate the value before attempting a conditional operation:</p> <ul> <li> <p>If <code>Exists</code> is <code>true</code>, DynamoDB will check to see if that attribute value already exists in the table. If it is found, then the operation succeeds. If it is not found, the operation fails with a <code>ConditionCheckFailedException</code>.</p> </li> <li> <p>If <code>Exists</code> is <code>false</code>, DynamoDB assumes that the attribute value does not exist in the table. If in fact the value does not exist, then the assumption is valid and the operation succeeds. If the value is found, despite the assumption that it does not exist, the operation fails with a <code>ConditionCheckFailedException</code>.</p> </li> </ul> <p>The default setting for <code>Exists</code> is <code>true</code>. If you supply a <code>Value</code> all by itself, DynamoDB assumes the attribute exists: You don't have to set <code>Exists</code> to <code>true</code>, because it is implied.</p> <p>DynamoDB returns a <code>ValidationException</code> if:</p> <ul> <li> <p> <code>Exists</code> is <code>true</code> but there is no <code>Value</code> to check. (You expect a value to exist, but don't specify what that value is.)</p> </li> <li> <p> <code>Exists</code> is <code>false</code> but you also provide a <code>Value</code>. (You cannot expect an attribute to have a value, while also expecting it not to exist.)</p> </li> </ul></p>
1117 #[serde(rename = "Exists")]
1118 #[serde(skip_serializing_if = "Option::is_none")]
1119 pub exists: Option<bool>,
1120 /// <p>Represents the data for the expected attribute.</p> <p>Each attribute value is described as a name-value pair. The name is the data type, and the value is the data itself.</p> <p>For more information, see <a href="https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/HowItWorks.NamingRulesDataTypes.html#HowItWorks.DataTypes">Data Types</a> in the <i>Amazon DynamoDB Developer Guide</i>.</p>
1121 #[serde(rename = "Value")]
1122 #[serde(skip_serializing_if = "Option::is_none")]
1123 pub value: Option<AttributeValue>,
1124}
1125
1126/// <p>Represents a failure a contributor insights operation.</p>
1127#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
1128#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
1129pub struct FailureException {
1130 /// <p>Description of the failure.</p>
1131 #[serde(rename = "ExceptionDescription")]
1132 #[serde(skip_serializing_if = "Option::is_none")]
1133 pub exception_description: Option<String>,
1134 /// <p>Exception name.</p>
1135 #[serde(rename = "ExceptionName")]
1136 #[serde(skip_serializing_if = "Option::is_none")]
1137 pub exception_name: Option<String>,
1138}
1139
1140/// <p>Specifies an item and related attribute values to retrieve in a <code>TransactGetItem</code> object.</p>
1141#[derive(Clone, Debug, Default, PartialEq, Serialize)]
1142#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
1143pub struct Get {
1144 /// <p>One or more substitution tokens for attribute names in the ProjectionExpression parameter.</p>
1145 #[serde(rename = "ExpressionAttributeNames")]
1146 #[serde(skip_serializing_if = "Option::is_none")]
1147 pub expression_attribute_names: Option<::std::collections::HashMap<String, String>>,
1148 /// <p>A map of attribute names to <code>AttributeValue</code> objects that specifies the primary key of the item to retrieve.</p>
1149 #[serde(rename = "Key")]
1150 pub key: ::std::collections::HashMap<String, AttributeValue>,
1151 /// <p>A string that identifies one or more attributes of the specified item to retrieve from the table. The attributes in the expression must be separated by commas. If no attribute names are specified, then all attributes of the specified item are returned. If any of the requested attributes are not found, they do not appear in the result.</p>
1152 #[serde(rename = "ProjectionExpression")]
1153 #[serde(skip_serializing_if = "Option::is_none")]
1154 pub projection_expression: Option<String>,
1155 /// <p>The name of the table from which to retrieve the specified item.</p>
1156 #[serde(rename = "TableName")]
1157 pub table_name: String,
1158}
1159
1160/// <p>Represents the input of a <code>GetItem</code> operation.</p>
1161#[derive(Clone, Debug, Default, PartialEq, Serialize)]
1162#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
1163pub struct GetItemInput {
1164 /// <p>This is a legacy parameter. Use <code>ProjectionExpression</code> instead. For more information, see <a href="https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/LegacyConditionalParameters.AttributesToGet.html">AttributesToGet</a> in the <i>Amazon DynamoDB Developer Guide</i>.</p>
1165 #[serde(rename = "AttributesToGet")]
1166 #[serde(skip_serializing_if = "Option::is_none")]
1167 pub attributes_to_get: Option<Vec<String>>,
1168 /// <p>Determines the read consistency model: If set to <code>true</code>, then the operation uses strongly consistent reads; otherwise, the operation uses eventually consistent reads.</p>
1169 #[serde(rename = "ConsistentRead")]
1170 #[serde(skip_serializing_if = "Option::is_none")]
1171 pub consistent_read: Option<bool>,
1172 /// <p>One or more substitution tokens for attribute names in an expression. The following are some use cases for using <code>ExpressionAttributeNames</code>:</p> <ul> <li> <p>To access an attribute whose name conflicts with a DynamoDB reserved word.</p> </li> <li> <p>To create a placeholder for repeating occurrences of an attribute name in an expression.</p> </li> <li> <p>To prevent special characters in an attribute name from being misinterpreted in an expression.</p> </li> </ul> <p>Use the <b>#</b> character in an expression to dereference an attribute name. For example, consider the following attribute name:</p> <ul> <li> <p> <code>Percentile</code> </p> </li> </ul> <p>The name of this attribute conflicts with a reserved word, so it cannot be used directly in an expression. (For the complete list of reserved words, see <a href="https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/ReservedWords.html">Reserved Words</a> in the <i>Amazon DynamoDB Developer Guide</i>). To work around this, you could specify the following for <code>ExpressionAttributeNames</code>:</p> <ul> <li> <p> <code>{"#P":"Percentile"}</code> </p> </li> </ul> <p>You could then use this substitution in an expression, as in this example:</p> <ul> <li> <p> <code>#P = :val</code> </p> </li> </ul> <note> <p>Tokens that begin with the <b>:</b> character are <i>expression attribute values</i>, which are placeholders for the actual value at runtime.</p> </note> <p>For more information on expression attribute names, see <a href="https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Expressions.AccessingItemAttributes.html">Specifying Item Attributes</a> in the <i>Amazon DynamoDB Developer Guide</i>.</p>
1173 #[serde(rename = "ExpressionAttributeNames")]
1174 #[serde(skip_serializing_if = "Option::is_none")]
1175 pub expression_attribute_names: Option<::std::collections::HashMap<String, String>>,
1176 /// <p>A map of attribute names to <code>AttributeValue</code> objects, representing the primary key of the item to retrieve.</p> <p>For the primary key, you must provide all of the attributes. For example, with a simple primary key, you only need to provide a value for the partition key. For a composite primary key, you must provide values for both the partition key and the sort key.</p>
1177 #[serde(rename = "Key")]
1178 pub key: ::std::collections::HashMap<String, AttributeValue>,
1179 /// <p>A string that identifies one or more attributes to retrieve from the table. These attributes can include scalars, sets, or elements of a JSON document. The attributes in the expression must be separated by commas.</p> <p>If no attribute names are specified, then all attributes are returned. If any of the requested attributes are not found, they do not appear in the result.</p> <p>For more information, see <a href="https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Expressions.AccessingItemAttributes.html">Specifying Item Attributes</a> in the <i>Amazon DynamoDB Developer Guide</i>.</p>
1180 #[serde(rename = "ProjectionExpression")]
1181 #[serde(skip_serializing_if = "Option::is_none")]
1182 pub projection_expression: Option<String>,
1183 #[serde(rename = "ReturnConsumedCapacity")]
1184 #[serde(skip_serializing_if = "Option::is_none")]
1185 pub return_consumed_capacity: Option<String>,
1186 /// <p>The name of the table containing the requested item.</p>
1187 #[serde(rename = "TableName")]
1188 pub table_name: String,
1189}
1190
1191/// <p>Represents the output of a <code>GetItem</code> operation.</p>
1192#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
1193#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
1194pub struct GetItemOutput {
1195 /// <p>The capacity units consumed by the <code>GetItem</code> operation. The data returned includes the total provisioned throughput consumed, along with statistics for the table and any indexes involved in the operation. <code>ConsumedCapacity</code> is only returned if the <code>ReturnConsumedCapacity</code> parameter was specified. For more information, see <a href="https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/ProvisionedThroughputIntro.html">Read/Write Capacity Mode</a> in the <i>Amazon DynamoDB Developer Guide</i>.</p>
1196 #[serde(rename = "ConsumedCapacity")]
1197 #[serde(skip_serializing_if = "Option::is_none")]
1198 pub consumed_capacity: Option<ConsumedCapacity>,
1199 /// <p>A map of attribute names to <code>AttributeValue</code> objects, as specified by <code>ProjectionExpression</code>.</p>
1200 #[serde(rename = "Item")]
1201 #[serde(skip_serializing_if = "Option::is_none")]
1202 pub item: Option<::std::collections::HashMap<String, AttributeValue>>,
1203}
1204
1205/// <p>Represents the properties of a global secondary index.</p>
1206#[derive(Clone, Debug, Default, PartialEq, Serialize)]
1207#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
1208pub struct GlobalSecondaryIndex {
1209 /// <p>The name of the global secondary index. The name must be unique among all other indexes on this table.</p>
1210 #[serde(rename = "IndexName")]
1211 pub index_name: String,
1212 /// <p><p>The complete key schema for a global secondary index, which consists of one or more pairs of attribute names and key types:</p> <ul> <li> <p> <code>HASH</code> - partition key</p> </li> <li> <p> <code>RANGE</code> - sort key</p> </li> </ul> <note> <p>The partition key of an item is also known as its <i>hash attribute</i>. The term "hash attribute" derives from DynamoDB's usage of an internal hash function to evenly distribute data items across partitions, based on their partition key values.</p> <p>The sort key of an item is also known as its <i>range attribute</i>. The term "range attribute" derives from the way DynamoDB stores items with the same partition key physically close together, in sorted order by the sort key value.</p> </note></p>
1213 #[serde(rename = "KeySchema")]
1214 pub key_schema: Vec<KeySchemaElement>,
1215 /// <p>Represents attributes that are copied (projected) from the table into the global secondary index. These are in addition to the primary key attributes and index key attributes, which are automatically projected. </p>
1216 #[serde(rename = "Projection")]
1217 pub projection: Projection,
1218 /// <p>Represents the provisioned throughput settings for the specified global secondary index.</p> <p>For current minimum and maximum provisioned throughput values, see <a href="https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Limits.html">Limits</a> in the <i>Amazon DynamoDB Developer Guide</i>.</p>
1219 #[serde(rename = "ProvisionedThroughput")]
1220 #[serde(skip_serializing_if = "Option::is_none")]
1221 pub provisioned_throughput: Option<ProvisionedThroughput>,
1222}
1223
1224/// <p>Represents the auto scaling settings of a global secondary index for a global table that will be modified.</p>
1225#[derive(Clone, Debug, Default, PartialEq, Serialize)]
1226#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
1227pub struct GlobalSecondaryIndexAutoScalingUpdate {
1228 /// <p>The name of the global secondary index.</p>
1229 #[serde(rename = "IndexName")]
1230 #[serde(skip_serializing_if = "Option::is_none")]
1231 pub index_name: Option<String>,
1232 #[serde(rename = "ProvisionedWriteCapacityAutoScalingUpdate")]
1233 #[serde(skip_serializing_if = "Option::is_none")]
1234 pub provisioned_write_capacity_auto_scaling_update: Option<AutoScalingSettingsUpdate>,
1235}
1236
1237/// <p>Represents the properties of a global secondary index.</p>
1238#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
1239#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
1240pub struct GlobalSecondaryIndexDescription {
1241 /// <p><p>Indicates whether the index is currently backfilling. <i>Backfilling</i> is the process of reading items from the table and determining whether they can be added to the index. (Not all items will qualify: For example, a partition key cannot have any duplicate values.) If an item can be added to the index, DynamoDB will do so. After all items have been processed, the backfilling operation is complete and <code>Backfilling</code> is false.</p> <p>You can delete an index that is being created during the <code>Backfilling</code> phase when <code>IndexStatus</code> is set to CREATING and <code>Backfilling</code> is true. You can't delete the index that is being created when <code>IndexStatus</code> is set to CREATING and <code>Backfilling</code> is false. </p> <note> <p>For indexes that were created during a <code>CreateTable</code> operation, the <code>Backfilling</code> attribute does not appear in the <code>DescribeTable</code> output.</p> </note></p>
1242 #[serde(rename = "Backfilling")]
1243 #[serde(skip_serializing_if = "Option::is_none")]
1244 pub backfilling: Option<bool>,
1245 /// <p>The Amazon Resource Name (ARN) that uniquely identifies the index.</p>
1246 #[serde(rename = "IndexArn")]
1247 #[serde(skip_serializing_if = "Option::is_none")]
1248 pub index_arn: Option<String>,
1249 /// <p>The name of the global secondary index.</p>
1250 #[serde(rename = "IndexName")]
1251 #[serde(skip_serializing_if = "Option::is_none")]
1252 pub index_name: Option<String>,
1253 /// <p>The total size of the specified index, in bytes. DynamoDB updates this value approximately every six hours. Recent changes might not be reflected in this value.</p>
1254 #[serde(rename = "IndexSizeBytes")]
1255 #[serde(skip_serializing_if = "Option::is_none")]
1256 pub index_size_bytes: Option<i64>,
1257 /// <p><p>The current state of the global secondary index:</p> <ul> <li> <p> <code>CREATING</code> - The index is being created.</p> </li> <li> <p> <code>UPDATING</code> - The index is being updated.</p> </li> <li> <p> <code>DELETING</code> - The index is being deleted.</p> </li> <li> <p> <code>ACTIVE</code> - The index is ready for use.</p> </li> </ul></p>
1258 #[serde(rename = "IndexStatus")]
1259 #[serde(skip_serializing_if = "Option::is_none")]
1260 pub index_status: Option<String>,
1261 /// <p>The number of items in the specified index. DynamoDB updates this value approximately every six hours. Recent changes might not be reflected in this value.</p>
1262 #[serde(rename = "ItemCount")]
1263 #[serde(skip_serializing_if = "Option::is_none")]
1264 pub item_count: Option<i64>,
1265 /// <p><p>The complete key schema for a global secondary index, which consists of one or more pairs of attribute names and key types:</p> <ul> <li> <p> <code>HASH</code> - partition key</p> </li> <li> <p> <code>RANGE</code> - sort key</p> </li> </ul> <note> <p>The partition key of an item is also known as its <i>hash attribute</i>. The term "hash attribute" derives from DynamoDB's usage of an internal hash function to evenly distribute data items across partitions, based on their partition key values.</p> <p>The sort key of an item is also known as its <i>range attribute</i>. The term "range attribute" derives from the way DynamoDB stores items with the same partition key physically close together, in sorted order by the sort key value.</p> </note></p>
1266 #[serde(rename = "KeySchema")]
1267 #[serde(skip_serializing_if = "Option::is_none")]
1268 pub key_schema: Option<Vec<KeySchemaElement>>,
1269 /// <p>Represents attributes that are copied (projected) from the table into the global secondary index. These are in addition to the primary key attributes and index key attributes, which are automatically projected. </p>
1270 #[serde(rename = "Projection")]
1271 #[serde(skip_serializing_if = "Option::is_none")]
1272 pub projection: Option<Projection>,
1273 /// <p>Represents the provisioned throughput settings for the specified global secondary index.</p> <p>For current minimum and maximum provisioned throughput values, see <a href="https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Limits.html">Limits</a> in the <i>Amazon DynamoDB Developer Guide</i>.</p>
1274 #[serde(rename = "ProvisionedThroughput")]
1275 #[serde(skip_serializing_if = "Option::is_none")]
1276 pub provisioned_throughput: Option<ProvisionedThroughputDescription>,
1277}
1278
1279/// <p>Represents the properties of a global secondary index for the table when the backup was created.</p>
1280#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
1281#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
1282pub struct GlobalSecondaryIndexInfo {
1283 /// <p>The name of the global secondary index.</p>
1284 #[serde(rename = "IndexName")]
1285 #[serde(skip_serializing_if = "Option::is_none")]
1286 pub index_name: Option<String>,
1287 /// <p><p>The complete key schema for a global secondary index, which consists of one or more pairs of attribute names and key types:</p> <ul> <li> <p> <code>HASH</code> - partition key</p> </li> <li> <p> <code>RANGE</code> - sort key</p> </li> </ul> <note> <p>The partition key of an item is also known as its <i>hash attribute</i>. The term "hash attribute" derives from DynamoDB's usage of an internal hash function to evenly distribute data items across partitions, based on their partition key values.</p> <p>The sort key of an item is also known as its <i>range attribute</i>. The term "range attribute" derives from the way DynamoDB stores items with the same partition key physically close together, in sorted order by the sort key value.</p> </note></p>
1288 #[serde(rename = "KeySchema")]
1289 #[serde(skip_serializing_if = "Option::is_none")]
1290 pub key_schema: Option<Vec<KeySchemaElement>>,
1291 /// <p>Represents attributes that are copied (projected) from the table into the global secondary index. These are in addition to the primary key attributes and index key attributes, which are automatically projected. </p>
1292 #[serde(rename = "Projection")]
1293 #[serde(skip_serializing_if = "Option::is_none")]
1294 pub projection: Option<Projection>,
1295 /// <p>Represents the provisioned throughput settings for the specified global secondary index. </p>
1296 #[serde(rename = "ProvisionedThroughput")]
1297 #[serde(skip_serializing_if = "Option::is_none")]
1298 pub provisioned_throughput: Option<ProvisionedThroughput>,
1299}
1300
1301/// <p><p>Represents one of the following:</p> <ul> <li> <p>A new global secondary index to be added to an existing table.</p> </li> <li> <p>New provisioned throughput parameters for an existing global secondary index.</p> </li> <li> <p>An existing global secondary index to be removed from an existing table.</p> </li> </ul></p>
1302#[derive(Clone, Debug, Default, PartialEq, Serialize)]
1303#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
1304pub struct GlobalSecondaryIndexUpdate {
1305 /// <p><p>The parameters required for creating a global secondary index on an existing table:</p> <ul> <li> <p> <code>IndexName </code> </p> </li> <li> <p> <code>KeySchema </code> </p> </li> <li> <p> <code>AttributeDefinitions </code> </p> </li> <li> <p> <code>Projection </code> </p> </li> <li> <p> <code>ProvisionedThroughput </code> </p> </li> </ul></p>
1306 #[serde(rename = "Create")]
1307 #[serde(skip_serializing_if = "Option::is_none")]
1308 pub create: Option<CreateGlobalSecondaryIndexAction>,
1309 /// <p>The name of an existing global secondary index to be removed.</p>
1310 #[serde(rename = "Delete")]
1311 #[serde(skip_serializing_if = "Option::is_none")]
1312 pub delete: Option<DeleteGlobalSecondaryIndexAction>,
1313 /// <p>The name of an existing global secondary index, along with new provisioned throughput settings to be applied to that index.</p>
1314 #[serde(rename = "Update")]
1315 #[serde(skip_serializing_if = "Option::is_none")]
1316 pub update: Option<UpdateGlobalSecondaryIndexAction>,
1317}
1318
1319/// <p>Represents the properties of a global table.</p>
1320#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
1321#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
1322pub struct GlobalTable {
1323 /// <p>The global table name.</p>
1324 #[serde(rename = "GlobalTableName")]
1325 #[serde(skip_serializing_if = "Option::is_none")]
1326 pub global_table_name: Option<String>,
1327 /// <p>The Regions where the global table has replicas.</p>
1328 #[serde(rename = "ReplicationGroup")]
1329 #[serde(skip_serializing_if = "Option::is_none")]
1330 pub replication_group: Option<Vec<Replica>>,
1331}
1332
1333/// <p>Contains details about the global table.</p>
1334#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
1335#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
1336pub struct GlobalTableDescription {
1337 /// <p>The creation time of the global table.</p>
1338 #[serde(rename = "CreationDateTime")]
1339 #[serde(skip_serializing_if = "Option::is_none")]
1340 pub creation_date_time: Option<f64>,
1341 /// <p>The unique identifier of the global table.</p>
1342 #[serde(rename = "GlobalTableArn")]
1343 #[serde(skip_serializing_if = "Option::is_none")]
1344 pub global_table_arn: Option<String>,
1345 /// <p>The global table name.</p>
1346 #[serde(rename = "GlobalTableName")]
1347 #[serde(skip_serializing_if = "Option::is_none")]
1348 pub global_table_name: Option<String>,
1349 /// <p><p>The current state of the global table:</p> <ul> <li> <p> <code>CREATING</code> - The global table is being created.</p> </li> <li> <p> <code>UPDATING</code> - The global table is being updated.</p> </li> <li> <p> <code>DELETING</code> - The global table is being deleted.</p> </li> <li> <p> <code>ACTIVE</code> - The global table is ready for use.</p> </li> </ul></p>
1350 #[serde(rename = "GlobalTableStatus")]
1351 #[serde(skip_serializing_if = "Option::is_none")]
1352 pub global_table_status: Option<String>,
1353 /// <p>The Regions where the global table has replicas.</p>
1354 #[serde(rename = "ReplicationGroup")]
1355 #[serde(skip_serializing_if = "Option::is_none")]
1356 pub replication_group: Option<Vec<ReplicaDescription>>,
1357}
1358
1359/// <p>Represents the settings of a global secondary index for a global table that will be modified.</p>
1360#[derive(Clone, Debug, Default, PartialEq, Serialize)]
1361#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
1362pub struct GlobalTableGlobalSecondaryIndexSettingsUpdate {
1363 /// <p>The name of the global secondary index. The name must be unique among all other indexes on this table.</p>
1364 #[serde(rename = "IndexName")]
1365 pub index_name: String,
1366 /// <p>Auto scaling settings for managing a global secondary index's write capacity units.</p>
1367 #[serde(rename = "ProvisionedWriteCapacityAutoScalingSettingsUpdate")]
1368 #[serde(skip_serializing_if = "Option::is_none")]
1369 pub provisioned_write_capacity_auto_scaling_settings_update: Option<AutoScalingSettingsUpdate>,
1370 /// <p>The maximum number of writes consumed per second before DynamoDB returns a <code>ThrottlingException.</code> </p>
1371 #[serde(rename = "ProvisionedWriteCapacityUnits")]
1372 #[serde(skip_serializing_if = "Option::is_none")]
1373 pub provisioned_write_capacity_units: Option<i64>,
1374}
1375
1376/// <p>Information about item collections, if any, that were affected by the operation. <code>ItemCollectionMetrics</code> is only returned if the request asked for it. If the table does not have any local secondary indexes, this information is not returned in the response.</p>
1377#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
1378#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
1379pub struct ItemCollectionMetrics {
1380 /// <p>The partition key value of the item collection. This value is the same as the partition key value of the item.</p>
1381 #[serde(rename = "ItemCollectionKey")]
1382 #[serde(skip_serializing_if = "Option::is_none")]
1383 pub item_collection_key: Option<::std::collections::HashMap<String, AttributeValue>>,
1384 /// <p>An estimate of item collection size, in gigabytes. This value is a two-element array containing a lower bound and an upper bound for the estimate. The estimate includes the size of all the items in the table, plus the size of all attributes projected into all of the local secondary indexes on that table. Use this estimate to measure whether a local secondary index is approaching its size limit.</p> <p>The estimate is subject to change over time; therefore, do not rely on the precision or accuracy of the estimate.</p>
1385 #[serde(rename = "SizeEstimateRangeGB")]
1386 #[serde(skip_serializing_if = "Option::is_none")]
1387 pub size_estimate_range_gb: Option<Vec<f64>>,
1388}
1389
1390/// <p>Details for the requested item.</p>
1391#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
1392#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
1393pub struct ItemResponse {
1394 /// <p>Map of attribute data consisting of the data type and attribute value.</p>
1395 #[serde(rename = "Item")]
1396 #[serde(skip_serializing_if = "Option::is_none")]
1397 pub item: Option<::std::collections::HashMap<String, AttributeValue>>,
1398}
1399
1400/// <p>Represents <i>a single element</i> of a key schema. A key schema specifies the attributes that make up the primary key of a table, or the key attributes of an index.</p> <p>A <code>KeySchemaElement</code> represents exactly one attribute of the primary key. For example, a simple primary key would be represented by one <code>KeySchemaElement</code> (for the partition key). A composite primary key would require one <code>KeySchemaElement</code> for the partition key, and another <code>KeySchemaElement</code> for the sort key.</p> <p>A <code>KeySchemaElement</code> must be a scalar, top-level attribute (not a nested attribute). The data type must be one of String, Number, or Binary. The attribute cannot be nested within a List or a Map.</p>
1401#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
1402pub struct KeySchemaElement {
1403 /// <p>The name of a key attribute.</p>
1404 #[serde(rename = "AttributeName")]
1405 pub attribute_name: String,
1406 /// <p><p>The role that this key attribute will assume:</p> <ul> <li> <p> <code>HASH</code> - partition key</p> </li> <li> <p> <code>RANGE</code> - sort key</p> </li> </ul> <note> <p>The partition key of an item is also known as its <i>hash attribute</i>. The term "hash attribute" derives from DynamoDB's usage of an internal hash function to evenly distribute data items across partitions, based on their partition key values.</p> <p>The sort key of an item is also known as its <i>range attribute</i>. The term "range attribute" derives from the way DynamoDB stores items with the same partition key physically close together, in sorted order by the sort key value.</p> </note></p>
1407 #[serde(rename = "KeyType")]
1408 pub key_type: String,
1409}
1410
1411/// <p>Represents a set of primary keys and, for each key, the attributes to retrieve from the table.</p> <p>For each primary key, you must provide <i>all</i> of the key attributes. For example, with a simple primary key, you only need to provide the partition key. For a composite primary key, you must provide <i>both</i> the partition key and the sort key.</p>
1412#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
1413pub struct KeysAndAttributes {
1414 /// <p>This is a legacy parameter. Use <code>ProjectionExpression</code> instead. For more information, see <a href="https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/LegacyConditionalParameters.html">Legacy Conditional Parameters</a> in the <i>Amazon DynamoDB Developer Guide</i>.</p>
1415 #[serde(rename = "AttributesToGet")]
1416 #[serde(skip_serializing_if = "Option::is_none")]
1417 pub attributes_to_get: Option<Vec<String>>,
1418 /// <p>The consistency of a read operation. If set to <code>true</code>, then a strongly consistent read is used; otherwise, an eventually consistent read is used.</p>
1419 #[serde(rename = "ConsistentRead")]
1420 #[serde(skip_serializing_if = "Option::is_none")]
1421 pub consistent_read: Option<bool>,
1422 /// <p>One or more substitution tokens for attribute names in an expression. The following are some use cases for using <code>ExpressionAttributeNames</code>:</p> <ul> <li> <p>To access an attribute whose name conflicts with a DynamoDB reserved word.</p> </li> <li> <p>To create a placeholder for repeating occurrences of an attribute name in an expression.</p> </li> <li> <p>To prevent special characters in an attribute name from being misinterpreted in an expression.</p> </li> </ul> <p>Use the <b>#</b> character in an expression to dereference an attribute name. For example, consider the following attribute name:</p> <ul> <li> <p> <code>Percentile</code> </p> </li> </ul> <p>The name of this attribute conflicts with a reserved word, so it cannot be used directly in an expression. (For the complete list of reserved words, see <a href="https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/ReservedWords.html">Reserved Words</a> in the <i>Amazon DynamoDB Developer Guide</i>). To work around this, you could specify the following for <code>ExpressionAttributeNames</code>:</p> <ul> <li> <p> <code>{"#P":"Percentile"}</code> </p> </li> </ul> <p>You could then use this substitution in an expression, as in this example:</p> <ul> <li> <p> <code>#P = :val</code> </p> </li> </ul> <note> <p>Tokens that begin with the <b>:</b> character are <i>expression attribute values</i>, which are placeholders for the actual value at runtime.</p> </note> <p>For more information on expression attribute names, see <a href="https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Expressions.AccessingItemAttributes.html">Accessing Item Attributes</a> in the <i>Amazon DynamoDB Developer Guide</i>.</p>
1423 #[serde(rename = "ExpressionAttributeNames")]
1424 #[serde(skip_serializing_if = "Option::is_none")]
1425 pub expression_attribute_names: Option<::std::collections::HashMap<String, String>>,
1426 /// <p>The primary key attribute values that define the items and the attributes associated with the items.</p>
1427 #[serde(rename = "Keys")]
1428 pub keys: Vec<::std::collections::HashMap<String, AttributeValue>>,
1429 /// <p>A string that identifies one or more attributes to retrieve from the table. These attributes can include scalars, sets, or elements of a JSON document. The attributes in the <code>ProjectionExpression</code> must be separated by commas.</p> <p>If no attribute names are specified, then all attributes will be returned. If any of the requested attributes are not found, they will not appear in the result.</p> <p>For more information, see <a href="https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Expressions.AccessingItemAttributes.html">Accessing Item Attributes</a> in the <i>Amazon DynamoDB Developer Guide</i>.</p>
1430 #[serde(rename = "ProjectionExpression")]
1431 #[serde(skip_serializing_if = "Option::is_none")]
1432 pub projection_expression: Option<String>,
1433}
1434
1435#[derive(Clone, Debug, Default, PartialEq, Serialize)]
1436#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
1437pub struct ListBackupsInput {
1438 /// <p><p>The backups from the table specified by <code>BackupType</code> are listed.</p> <p>Where <code>BackupType</code> can be:</p> <ul> <li> <p> <code>USER</code> - On-demand backup created by you.</p> </li> <li> <p> <code>SYSTEM</code> - On-demand backup automatically created by DynamoDB.</p> </li> <li> <p> <code>ALL</code> - All types of on-demand backups (USER and SYSTEM).</p> </li> </ul></p>
1439 #[serde(rename = "BackupType")]
1440 #[serde(skip_serializing_if = "Option::is_none")]
1441 pub backup_type: Option<String>,
1442 /// <p> <code>LastEvaluatedBackupArn</code> is the Amazon Resource Name (ARN) of the backup last evaluated when the current page of results was returned, inclusive of the current page of results. This value may be specified as the <code>ExclusiveStartBackupArn</code> of a new <code>ListBackups</code> operation in order to fetch the next page of results. </p>
1443 #[serde(rename = "ExclusiveStartBackupArn")]
1444 #[serde(skip_serializing_if = "Option::is_none")]
1445 pub exclusive_start_backup_arn: Option<String>,
1446 /// <p>Maximum number of backups to return at once.</p>
1447 #[serde(rename = "Limit")]
1448 #[serde(skip_serializing_if = "Option::is_none")]
1449 pub limit: Option<i64>,
1450 /// <p>The backups from the table specified by <code>TableName</code> are listed. </p>
1451 #[serde(rename = "TableName")]
1452 #[serde(skip_serializing_if = "Option::is_none")]
1453 pub table_name: Option<String>,
1454 /// <p>Only backups created after this time are listed. <code>TimeRangeLowerBound</code> is inclusive.</p>
1455 #[serde(rename = "TimeRangeLowerBound")]
1456 #[serde(skip_serializing_if = "Option::is_none")]
1457 pub time_range_lower_bound: Option<f64>,
1458 /// <p>Only backups created before this time are listed. <code>TimeRangeUpperBound</code> is exclusive. </p>
1459 #[serde(rename = "TimeRangeUpperBound")]
1460 #[serde(skip_serializing_if = "Option::is_none")]
1461 pub time_range_upper_bound: Option<f64>,
1462}
1463
1464#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
1465#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
1466pub struct ListBackupsOutput {
1467 /// <p>List of <code>BackupSummary</code> objects.</p>
1468 #[serde(rename = "BackupSummaries")]
1469 #[serde(skip_serializing_if = "Option::is_none")]
1470 pub backup_summaries: Option<Vec<BackupSummary>>,
1471 /// <p> The ARN of the backup last evaluated when the current page of results was returned, inclusive of the current page of results. This value may be specified as the <code>ExclusiveStartBackupArn</code> of a new <code>ListBackups</code> operation in order to fetch the next page of results. </p> <p> If <code>LastEvaluatedBackupArn</code> is empty, then the last page of results has been processed and there are no more results to be retrieved. </p> <p> If <code>LastEvaluatedBackupArn</code> is not empty, this may or may not indicate that there is more data to be returned. All results are guaranteed to have been returned if and only if no value for <code>LastEvaluatedBackupArn</code> is returned. </p>
1472 #[serde(rename = "LastEvaluatedBackupArn")]
1473 #[serde(skip_serializing_if = "Option::is_none")]
1474 pub last_evaluated_backup_arn: Option<String>,
1475}
1476
1477#[derive(Clone, Debug, Default, PartialEq, Serialize)]
1478#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
1479pub struct ListContributorInsightsInput {
1480 /// <p>Maximum number of results to return per page.</p>
1481 #[serde(rename = "MaxResults")]
1482 #[serde(skip_serializing_if = "Option::is_none")]
1483 pub max_results: Option<i64>,
1484 /// <p>A token to for the desired page, if there is one.</p>
1485 #[serde(rename = "NextToken")]
1486 #[serde(skip_serializing_if = "Option::is_none")]
1487 pub next_token: Option<String>,
1488 /// <p>The name of the table.</p>
1489 #[serde(rename = "TableName")]
1490 #[serde(skip_serializing_if = "Option::is_none")]
1491 pub table_name: Option<String>,
1492}
1493
1494#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
1495#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
1496pub struct ListContributorInsightsOutput {
1497 /// <p>A list of ContributorInsightsSummary.</p>
1498 #[serde(rename = "ContributorInsightsSummaries")]
1499 #[serde(skip_serializing_if = "Option::is_none")]
1500 pub contributor_insights_summaries: Option<Vec<ContributorInsightsSummary>>,
1501 /// <p>A token to go to the next page if there is one.</p>
1502 #[serde(rename = "NextToken")]
1503 #[serde(skip_serializing_if = "Option::is_none")]
1504 pub next_token: Option<String>,
1505}
1506
1507#[derive(Clone, Debug, Default, PartialEq, Serialize)]
1508#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
1509pub struct ListGlobalTablesInput {
1510 /// <p>The first global table name that this operation will evaluate.</p>
1511 #[serde(rename = "ExclusiveStartGlobalTableName")]
1512 #[serde(skip_serializing_if = "Option::is_none")]
1513 pub exclusive_start_global_table_name: Option<String>,
1514 /// <p>The maximum number of table names to return, if the parameter is not specified DynamoDB defaults to 100.</p> <p>If the number of global tables DynamoDB finds reaches this limit, it stops the operation and returns the table names collected up to that point, with a table name in the <code>LastEvaluatedGlobalTableName</code> to apply in a subsequent operation to the <code>ExclusiveStartGlobalTableName</code> parameter.</p>
1515 #[serde(rename = "Limit")]
1516 #[serde(skip_serializing_if = "Option::is_none")]
1517 pub limit: Option<i64>,
1518 /// <p>Lists the global tables in a specific Region.</p>
1519 #[serde(rename = "RegionName")]
1520 #[serde(skip_serializing_if = "Option::is_none")]
1521 pub region_name: Option<String>,
1522}
1523
1524#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
1525#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
1526pub struct ListGlobalTablesOutput {
1527 /// <p>List of global table names.</p>
1528 #[serde(rename = "GlobalTables")]
1529 #[serde(skip_serializing_if = "Option::is_none")]
1530 pub global_tables: Option<Vec<GlobalTable>>,
1531 /// <p>Last evaluated global table name.</p>
1532 #[serde(rename = "LastEvaluatedGlobalTableName")]
1533 #[serde(skip_serializing_if = "Option::is_none")]
1534 pub last_evaluated_global_table_name: Option<String>,
1535}
1536
1537/// <p>Represents the input of a <code>ListTables</code> operation.</p>
1538#[derive(Clone, Debug, Default, PartialEq, Serialize)]
1539#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
1540pub struct ListTablesInput {
1541 /// <p>The first table name that this operation will evaluate. Use the value that was returned for <code>LastEvaluatedTableName</code> in a previous operation, so that you can obtain the next page of results.</p>
1542 #[serde(rename = "ExclusiveStartTableName")]
1543 #[serde(skip_serializing_if = "Option::is_none")]
1544 pub exclusive_start_table_name: Option<String>,
1545 /// <p>A maximum number of table names to return. If this parameter is not specified, the limit is 100.</p>
1546 #[serde(rename = "Limit")]
1547 #[serde(skip_serializing_if = "Option::is_none")]
1548 pub limit: Option<i64>,
1549}
1550
1551/// <p>Represents the output of a <code>ListTables</code> operation.</p>
1552#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
1553#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
1554pub struct ListTablesOutput {
1555 /// <p>The name of the last table in the current page of results. Use this value as the <code>ExclusiveStartTableName</code> in a new request to obtain the next page of results, until all the table names are returned.</p> <p>If you do not receive a <code>LastEvaluatedTableName</code> value in the response, this means that there are no more table names to be retrieved.</p>
1556 #[serde(rename = "LastEvaluatedTableName")]
1557 #[serde(skip_serializing_if = "Option::is_none")]
1558 pub last_evaluated_table_name: Option<String>,
1559 /// <p>The names of the tables associated with the current account at the current endpoint. The maximum size of this array is 100.</p> <p>If <code>LastEvaluatedTableName</code> also appears in the output, you can use this value as the <code>ExclusiveStartTableName</code> parameter in a subsequent <code>ListTables</code> request and obtain the next page of results.</p>
1560 #[serde(rename = "TableNames")]
1561 #[serde(skip_serializing_if = "Option::is_none")]
1562 pub table_names: Option<Vec<String>>,
1563}
1564
1565#[derive(Clone, Debug, Default, PartialEq, Serialize)]
1566#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
1567pub struct ListTagsOfResourceInput {
1568 /// <p>An optional string that, if supplied, must be copied from the output of a previous call to ListTagOfResource. When provided in this manner, this API fetches the next page of results.</p>
1569 #[serde(rename = "NextToken")]
1570 #[serde(skip_serializing_if = "Option::is_none")]
1571 pub next_token: Option<String>,
1572 /// <p>The Amazon DynamoDB resource with tags to be listed. This value is an Amazon Resource Name (ARN).</p>
1573 #[serde(rename = "ResourceArn")]
1574 pub resource_arn: String,
1575}
1576
1577#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
1578#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
1579pub struct ListTagsOfResourceOutput {
1580 /// <p>If this value is returned, there are additional results to be displayed. To retrieve them, call ListTagsOfResource again, with NextToken set to this value.</p>
1581 #[serde(rename = "NextToken")]
1582 #[serde(skip_serializing_if = "Option::is_none")]
1583 pub next_token: Option<String>,
1584 /// <p>The tags currently associated with the Amazon DynamoDB resource.</p>
1585 #[serde(rename = "Tags")]
1586 #[serde(skip_serializing_if = "Option::is_none")]
1587 pub tags: Option<Vec<Tag>>,
1588}
1589
1590/// <p>Represents the properties of a local secondary index.</p>
1591#[derive(Clone, Debug, Default, PartialEq, Serialize)]
1592#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
1593pub struct LocalSecondaryIndex {
1594 /// <p>The name of the local secondary index. The name must be unique among all other indexes on this table.</p>
1595 #[serde(rename = "IndexName")]
1596 pub index_name: String,
1597 /// <p><p>The complete key schema for the local secondary index, consisting of one or more pairs of attribute names and key types:</p> <ul> <li> <p> <code>HASH</code> - partition key</p> </li> <li> <p> <code>RANGE</code> - sort key</p> </li> </ul> <note> <p>The partition key of an item is also known as its <i>hash attribute</i>. The term "hash attribute" derives from DynamoDB's usage of an internal hash function to evenly distribute data items across partitions, based on their partition key values.</p> <p>The sort key of an item is also known as its <i>range attribute</i>. The term "range attribute" derives from the way DynamoDB stores items with the same partition key physically close together, in sorted order by the sort key value.</p> </note></p>
1598 #[serde(rename = "KeySchema")]
1599 pub key_schema: Vec<KeySchemaElement>,
1600 /// <p>Represents attributes that are copied (projected) from the table into the local secondary index. These are in addition to the primary key attributes and index key attributes, which are automatically projected. </p>
1601 #[serde(rename = "Projection")]
1602 pub projection: Projection,
1603}
1604
1605/// <p>Represents the properties of a local secondary index.</p>
1606#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
1607#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
1608pub struct LocalSecondaryIndexDescription {
1609 /// <p>The Amazon Resource Name (ARN) that uniquely identifies the index.</p>
1610 #[serde(rename = "IndexArn")]
1611 #[serde(skip_serializing_if = "Option::is_none")]
1612 pub index_arn: Option<String>,
1613 /// <p>Represents the name of the local secondary index.</p>
1614 #[serde(rename = "IndexName")]
1615 #[serde(skip_serializing_if = "Option::is_none")]
1616 pub index_name: Option<String>,
1617 /// <p>The total size of the specified index, in bytes. DynamoDB updates this value approximately every six hours. Recent changes might not be reflected in this value.</p>
1618 #[serde(rename = "IndexSizeBytes")]
1619 #[serde(skip_serializing_if = "Option::is_none")]
1620 pub index_size_bytes: Option<i64>,
1621 /// <p>The number of items in the specified index. DynamoDB updates this value approximately every six hours. Recent changes might not be reflected in this value.</p>
1622 #[serde(rename = "ItemCount")]
1623 #[serde(skip_serializing_if = "Option::is_none")]
1624 pub item_count: Option<i64>,
1625 /// <p><p>The complete key schema for the local secondary index, consisting of one or more pairs of attribute names and key types:</p> <ul> <li> <p> <code>HASH</code> - partition key</p> </li> <li> <p> <code>RANGE</code> - sort key</p> </li> </ul> <note> <p>The partition key of an item is also known as its <i>hash attribute</i>. The term "hash attribute" derives from DynamoDB's usage of an internal hash function to evenly distribute data items across partitions, based on their partition key values.</p> <p>The sort key of an item is also known as its <i>range attribute</i>. The term "range attribute" derives from the way DynamoDB stores items with the same partition key physically close together, in sorted order by the sort key value.</p> </note></p>
1626 #[serde(rename = "KeySchema")]
1627 #[serde(skip_serializing_if = "Option::is_none")]
1628 pub key_schema: Option<Vec<KeySchemaElement>>,
1629 /// <p>Represents attributes that are copied (projected) from the table into the global secondary index. These are in addition to the primary key attributes and index key attributes, which are automatically projected. </p>
1630 #[serde(rename = "Projection")]
1631 #[serde(skip_serializing_if = "Option::is_none")]
1632 pub projection: Option<Projection>,
1633}
1634
1635/// <p>Represents the properties of a local secondary index for the table when the backup was created.</p>
1636#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
1637#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
1638pub struct LocalSecondaryIndexInfo {
1639 /// <p>Represents the name of the local secondary index.</p>
1640 #[serde(rename = "IndexName")]
1641 #[serde(skip_serializing_if = "Option::is_none")]
1642 pub index_name: Option<String>,
1643 /// <p><p>The complete key schema for a local secondary index, which consists of one or more pairs of attribute names and key types:</p> <ul> <li> <p> <code>HASH</code> - partition key</p> </li> <li> <p> <code>RANGE</code> - sort key</p> </li> </ul> <note> <p>The partition key of an item is also known as its <i>hash attribute</i>. The term "hash attribute" derives from DynamoDB's usage of an internal hash function to evenly distribute data items across partitions, based on their partition key values.</p> <p>The sort key of an item is also known as its <i>range attribute</i>. The term "range attribute" derives from the way DynamoDB stores items with the same partition key physically close together, in sorted order by the sort key value.</p> </note></p>
1644 #[serde(rename = "KeySchema")]
1645 #[serde(skip_serializing_if = "Option::is_none")]
1646 pub key_schema: Option<Vec<KeySchemaElement>>,
1647 /// <p>Represents attributes that are copied (projected) from the table into the global secondary index. These are in addition to the primary key attributes and index key attributes, which are automatically projected. </p>
1648 #[serde(rename = "Projection")]
1649 #[serde(skip_serializing_if = "Option::is_none")]
1650 pub projection: Option<Projection>,
1651}
1652
1653/// <p>The description of the point in time settings applied to the table.</p>
1654#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
1655#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
1656pub struct PointInTimeRecoveryDescription {
1657 /// <p>Specifies the earliest point in time you can restore your table to. You can restore your table to any point in time during the last 35 days. </p>
1658 #[serde(rename = "EarliestRestorableDateTime")]
1659 #[serde(skip_serializing_if = "Option::is_none")]
1660 pub earliest_restorable_date_time: Option<f64>,
1661 /// <p> <code>LatestRestorableDateTime</code> is typically 5 minutes before the current time. </p>
1662 #[serde(rename = "LatestRestorableDateTime")]
1663 #[serde(skip_serializing_if = "Option::is_none")]
1664 pub latest_restorable_date_time: Option<f64>,
1665 /// <p><p>The current state of point in time recovery:</p> <ul> <li> <p> <code>ENABLING</code> - Point in time recovery is being enabled.</p> </li> <li> <p> <code>ENABLED</code> - Point in time recovery is enabled.</p> </li> <li> <p> <code>DISABLED</code> - Point in time recovery is disabled.</p> </li> </ul></p>
1666 #[serde(rename = "PointInTimeRecoveryStatus")]
1667 #[serde(skip_serializing_if = "Option::is_none")]
1668 pub point_in_time_recovery_status: Option<String>,
1669}
1670
1671/// <p>Represents the settings used to enable point in time recovery.</p>
1672#[derive(Clone, Debug, Default, PartialEq, Serialize)]
1673#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
1674pub struct PointInTimeRecoverySpecification {
1675 /// <p>Indicates whether point in time recovery is enabled (true) or disabled (false) on the table.</p>
1676 #[serde(rename = "PointInTimeRecoveryEnabled")]
1677 pub point_in_time_recovery_enabled: bool,
1678}
1679
1680/// <p>Represents attributes that are copied (projected) from the table into an index. These are in addition to the primary key attributes and index key attributes, which are automatically projected.</p>
1681#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
1682pub struct Projection {
1683 /// <p>Represents the non-key attribute names which will be projected into the index.</p> <p>For local secondary indexes, the total count of <code>NonKeyAttributes</code> summed across all of the local secondary indexes, must not exceed 20. If you project the same attribute into two different indexes, this counts as two distinct attributes when determining the total.</p>
1684 #[serde(rename = "NonKeyAttributes")]
1685 #[serde(skip_serializing_if = "Option::is_none")]
1686 pub non_key_attributes: Option<Vec<String>>,
1687 /// <p><p>The set of attributes that are projected into the index:</p> <ul> <li> <p> <code>KEYS_ONLY</code> - Only the index and primary keys are projected into the index.</p> </li> <li> <p> <code>INCLUDE</code> - Only the specified table attributes are projected into the index. The list of projected attributes is in <code>NonKeyAttributes</code>.</p> </li> <li> <p> <code>ALL</code> - All of the table attributes are projected into the index.</p> </li> </ul></p>
1688 #[serde(rename = "ProjectionType")]
1689 #[serde(skip_serializing_if = "Option::is_none")]
1690 pub projection_type: Option<String>,
1691}
1692
1693/// <p>Represents the provisioned throughput settings for a specified table or index. The settings can be modified using the <code>UpdateTable</code> operation.</p> <p>For current minimum and maximum provisioned throughput values, see <a href="https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Limits.html">Limits</a> in the <i>Amazon DynamoDB Developer Guide</i>.</p>
1694#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
1695pub struct ProvisionedThroughput {
1696 /// <p>The maximum number of strongly consistent reads consumed per second before DynamoDB returns a <code>ThrottlingException</code>. For more information, see <a href="https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/WorkingWithTables.html#ProvisionedThroughput">Specifying Read and Write Requirements</a> in the <i>Amazon DynamoDB Developer Guide</i>.</p> <p>If read/write capacity mode is <code>PAY_PER_REQUEST</code> the value is set to 0.</p>
1697 #[serde(rename = "ReadCapacityUnits")]
1698 pub read_capacity_units: i64,
1699 /// <p>The maximum number of writes consumed per second before DynamoDB returns a <code>ThrottlingException</code>. For more information, see <a href="https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/WorkingWithTables.html#ProvisionedThroughput">Specifying Read and Write Requirements</a> in the <i>Amazon DynamoDB Developer Guide</i>.</p> <p>If read/write capacity mode is <code>PAY_PER_REQUEST</code> the value is set to 0.</p>
1700 #[serde(rename = "WriteCapacityUnits")]
1701 pub write_capacity_units: i64,
1702}
1703
1704/// <p>Represents the provisioned throughput settings for the table, consisting of read and write capacity units, along with data about increases and decreases.</p>
1705#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
1706#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
1707pub struct ProvisionedThroughputDescription {
1708 /// <p>The date and time of the last provisioned throughput decrease for this table.</p>
1709 #[serde(rename = "LastDecreaseDateTime")]
1710 #[serde(skip_serializing_if = "Option::is_none")]
1711 pub last_decrease_date_time: Option<f64>,
1712 /// <p>The date and time of the last provisioned throughput increase for this table.</p>
1713 #[serde(rename = "LastIncreaseDateTime")]
1714 #[serde(skip_serializing_if = "Option::is_none")]
1715 pub last_increase_date_time: Option<f64>,
1716 /// <p>The number of provisioned throughput decreases for this table during this UTC calendar day. For current maximums on provisioned throughput decreases, see <a href="https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Limits.html">Limits</a> in the <i>Amazon DynamoDB Developer Guide</i>.</p>
1717 #[serde(rename = "NumberOfDecreasesToday")]
1718 #[serde(skip_serializing_if = "Option::is_none")]
1719 pub number_of_decreases_today: Option<i64>,
1720 /// <p>The maximum number of strongly consistent reads consumed per second before DynamoDB returns a <code>ThrottlingException</code>. Eventually consistent reads require less effort than strongly consistent reads, so a setting of 50 <code>ReadCapacityUnits</code> per second provides 100 eventually consistent <code>ReadCapacityUnits</code> per second.</p>
1721 #[serde(rename = "ReadCapacityUnits")]
1722 #[serde(skip_serializing_if = "Option::is_none")]
1723 pub read_capacity_units: Option<i64>,
1724 /// <p>The maximum number of writes consumed per second before DynamoDB returns a <code>ThrottlingException</code>.</p>
1725 #[serde(rename = "WriteCapacityUnits")]
1726 #[serde(skip_serializing_if = "Option::is_none")]
1727 pub write_capacity_units: Option<i64>,
1728}
1729
1730/// <p>Replica-specific provisioned throughput settings. If not specified, uses the source table's provisioned throughput settings.</p>
1731#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
1732pub struct ProvisionedThroughputOverride {
1733 /// <p>Replica-specific read capacity units. If not specified, uses the source table's read capacity settings.</p>
1734 #[serde(rename = "ReadCapacityUnits")]
1735 #[serde(skip_serializing_if = "Option::is_none")]
1736 pub read_capacity_units: Option<i64>,
1737}
1738
1739/// <p>Represents a request to perform a <code>PutItem</code> operation.</p>
1740#[derive(Clone, Debug, Default, PartialEq, Serialize)]
1741#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
1742pub struct Put {
1743 /// <p>A condition that must be satisfied in order for a conditional update to succeed.</p>
1744 #[serde(rename = "ConditionExpression")]
1745 #[serde(skip_serializing_if = "Option::is_none")]
1746 pub condition_expression: Option<String>,
1747 /// <p>One or more substitution tokens for attribute names in an expression.</p>
1748 #[serde(rename = "ExpressionAttributeNames")]
1749 #[serde(skip_serializing_if = "Option::is_none")]
1750 pub expression_attribute_names: Option<::std::collections::HashMap<String, String>>,
1751 /// <p>One or more values that can be substituted in an expression.</p>
1752 #[serde(rename = "ExpressionAttributeValues")]
1753 #[serde(skip_serializing_if = "Option::is_none")]
1754 pub expression_attribute_values: Option<::std::collections::HashMap<String, AttributeValue>>,
1755 /// <p>A map of attribute name to attribute values, representing the primary key of the item to be written by <code>PutItem</code>. All of the table's primary key attributes must be specified, and their data types must match those of the table's key schema. If any attributes are present in the item that are part of an index key schema for the table, their types must match the index key schema. </p>
1756 #[serde(rename = "Item")]
1757 pub item: ::std::collections::HashMap<String, AttributeValue>,
1758 /// <p>Use <code>ReturnValuesOnConditionCheckFailure</code> to get the item attributes if the <code>Put</code> condition fails. For <code>ReturnValuesOnConditionCheckFailure</code>, the valid values are: NONE and ALL_OLD.</p>
1759 #[serde(rename = "ReturnValuesOnConditionCheckFailure")]
1760 #[serde(skip_serializing_if = "Option::is_none")]
1761 pub return_values_on_condition_check_failure: Option<String>,
1762 /// <p>Name of the table in which to write the item.</p>
1763 #[serde(rename = "TableName")]
1764 pub table_name: String,
1765}
1766
1767/// <p>Represents the input of a <code>PutItem</code> operation.</p>
1768#[derive(Clone, Debug, Default, PartialEq, Serialize)]
1769#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
1770pub struct PutItemInput {
1771 /// <p>A condition that must be satisfied in order for a conditional <code>PutItem</code> operation to succeed.</p> <p>An expression can contain any of the following:</p> <ul> <li> <p>Functions: <code>attribute_exists | attribute_not_exists | attribute_type | contains | begins_with | size</code> </p> <p>These function names are case-sensitive.</p> </li> <li> <p>Comparison operators: <code>= | <> | < | > | <= | >= | BETWEEN | IN </code> </p> </li> <li> <p> Logical operators: <code>AND | OR | NOT</code> </p> </li> </ul> <p>For more information on condition expressions, see <a href="https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Expressions.SpecifyingConditions.html">Condition Expressions</a> in the <i>Amazon DynamoDB Developer Guide</i>.</p>
1772 #[serde(rename = "ConditionExpression")]
1773 #[serde(skip_serializing_if = "Option::is_none")]
1774 pub condition_expression: Option<String>,
1775 /// <p>This is a legacy parameter. Use <code>ConditionExpression</code> instead. For more information, see <a href="https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/LegacyConditionalParameters.ConditionalOperator.html">ConditionalOperator</a> in the <i>Amazon DynamoDB Developer Guide</i>.</p>
1776 #[serde(rename = "ConditionalOperator")]
1777 #[serde(skip_serializing_if = "Option::is_none")]
1778 pub conditional_operator: Option<String>,
1779 /// <p>This is a legacy parameter. Use <code>ConditionExpression</code> instead. For more information, see <a href="https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/LegacyConditionalParameters.Expected.html">Expected</a> in the <i>Amazon DynamoDB Developer Guide</i>.</p>
1780 #[serde(rename = "Expected")]
1781 #[serde(skip_serializing_if = "Option::is_none")]
1782 pub expected: Option<::std::collections::HashMap<String, ExpectedAttributeValue>>,
1783 /// <p>One or more substitution tokens for attribute names in an expression. The following are some use cases for using <code>ExpressionAttributeNames</code>:</p> <ul> <li> <p>To access an attribute whose name conflicts with a DynamoDB reserved word.</p> </li> <li> <p>To create a placeholder for repeating occurrences of an attribute name in an expression.</p> </li> <li> <p>To prevent special characters in an attribute name from being misinterpreted in an expression.</p> </li> </ul> <p>Use the <b>#</b> character in an expression to dereference an attribute name. For example, consider the following attribute name:</p> <ul> <li> <p> <code>Percentile</code> </p> </li> </ul> <p>The name of this attribute conflicts with a reserved word, so it cannot be used directly in an expression. (For the complete list of reserved words, see <a href="https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/ReservedWords.html">Reserved Words</a> in the <i>Amazon DynamoDB Developer Guide</i>). To work around this, you could specify the following for <code>ExpressionAttributeNames</code>:</p> <ul> <li> <p> <code>{"#P":"Percentile"}</code> </p> </li> </ul> <p>You could then use this substitution in an expression, as in this example:</p> <ul> <li> <p> <code>#P = :val</code> </p> </li> </ul> <note> <p>Tokens that begin with the <b>:</b> character are <i>expression attribute values</i>, which are placeholders for the actual value at runtime.</p> </note> <p>For more information on expression attribute names, see <a href="https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Expressions.AccessingItemAttributes.html">Specifying Item Attributes</a> in the <i>Amazon DynamoDB Developer Guide</i>.</p>
1784 #[serde(rename = "ExpressionAttributeNames")]
1785 #[serde(skip_serializing_if = "Option::is_none")]
1786 pub expression_attribute_names: Option<::std::collections::HashMap<String, String>>,
1787 /// <p>One or more values that can be substituted in an expression.</p> <p>Use the <b>:</b> (colon) character in an expression to dereference an attribute value. For example, suppose that you wanted to check whether the value of the <i>ProductStatus</i> attribute was one of the following: </p> <p> <code>Available | Backordered | Discontinued</code> </p> <p>You would first need to specify <code>ExpressionAttributeValues</code> as follows:</p> <p> <code>{ ":avail":{"S":"Available"}, ":back":{"S":"Backordered"}, ":disc":{"S":"Discontinued"} }</code> </p> <p>You could then use these values in an expression, such as this:</p> <p> <code>ProductStatus IN (:avail, :back, :disc)</code> </p> <p>For more information on expression attribute values, see <a href="https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Expressions.SpecifyingConditions.html">Condition Expressions</a> in the <i>Amazon DynamoDB Developer Guide</i>.</p>
1788 #[serde(rename = "ExpressionAttributeValues")]
1789 #[serde(skip_serializing_if = "Option::is_none")]
1790 pub expression_attribute_values: Option<::std::collections::HashMap<String, AttributeValue>>,
1791 /// <p>A map of attribute name/value pairs, one for each attribute. Only the primary key attributes are required; you can optionally provide other attribute name-value pairs for the item.</p> <p>You must provide all of the attributes for the primary key. For example, with a simple primary key, you only need to provide a value for the partition key. For a composite primary key, you must provide both values for both the partition key and the sort key.</p> <p>If you specify any attributes that are part of an index key, then the data types for those attributes must match those of the schema in the table's attribute definition.</p> <p>Empty String and Binary attribute values are allowed. Attribute values of type String and Binary must have a length greater than zero if the attribute is used as a key attribute for a table or index.</p> <p>For more information about primary keys, see <a href="https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/HowItWorks.CoreComponents.html#HowItWorks.CoreComponents.PrimaryKey">Primary Key</a> in the <i>Amazon DynamoDB Developer Guide</i>.</p> <p>Each element in the <code>Item</code> map is an <code>AttributeValue</code> object.</p>
1792 #[serde(rename = "Item")]
1793 pub item: ::std::collections::HashMap<String, AttributeValue>,
1794 #[serde(rename = "ReturnConsumedCapacity")]
1795 #[serde(skip_serializing_if = "Option::is_none")]
1796 pub return_consumed_capacity: Option<String>,
1797 /// <p>Determines whether item collection metrics are returned. If set to <code>SIZE</code>, the response includes statistics about item collections, if any, that were modified during the operation are returned in the response. If set to <code>NONE</code> (the default), no statistics are returned.</p>
1798 #[serde(rename = "ReturnItemCollectionMetrics")]
1799 #[serde(skip_serializing_if = "Option::is_none")]
1800 pub return_item_collection_metrics: Option<String>,
1801 /// <p><p>Use <code>ReturnValues</code> if you want to get the item attributes as they appeared before they were updated with the <code>PutItem</code> request. For <code>PutItem</code>, the valid values are:</p> <ul> <li> <p> <code>NONE</code> - If <code>ReturnValues</code> is not specified, or if its value is <code>NONE</code>, then nothing is returned. (This setting is the default for <code>ReturnValues</code>.)</p> </li> <li> <p> <code>ALL<em>OLD</code> - If <code>PutItem</code> overwrote an attribute name-value pair, then the content of the old item is returned.</p> </li> </ul> <note> <p>The <code>ReturnValues</code> parameter is used by several DynamoDB operations; however, <code>PutItem</code> does not recognize any values other than <code>NONE</code> or <code>ALL</em>OLD</code>.</p> </note></p>
1802 #[serde(rename = "ReturnValues")]
1803 #[serde(skip_serializing_if = "Option::is_none")]
1804 pub return_values: Option<String>,
1805 /// <p>The name of the table to contain the item.</p>
1806 #[serde(rename = "TableName")]
1807 pub table_name: String,
1808}
1809
1810/// <p>Represents the output of a <code>PutItem</code> operation.</p>
1811#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
1812#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
1813pub struct PutItemOutput {
1814 /// <p>The attribute values as they appeared before the <code>PutItem</code> operation, but only if <code>ReturnValues</code> is specified as <code>ALL_OLD</code> in the request. Each element consists of an attribute name and an attribute value.</p>
1815 #[serde(rename = "Attributes")]
1816 #[serde(skip_serializing_if = "Option::is_none")]
1817 pub attributes: Option<::std::collections::HashMap<String, AttributeValue>>,
1818 /// <p>The capacity units consumed by the <code>PutItem</code> operation. The data returned includes the total provisioned throughput consumed, along with statistics for the table and any indexes involved in the operation. <code>ConsumedCapacity</code> is only returned if the <code>ReturnConsumedCapacity</code> parameter was specified. For more information, see <a href="https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/ProvisionedThroughputIntro.html">Read/Write Capacity Mode</a> in the <i>Amazon DynamoDB Developer Guide</i>.</p>
1819 #[serde(rename = "ConsumedCapacity")]
1820 #[serde(skip_serializing_if = "Option::is_none")]
1821 pub consumed_capacity: Option<ConsumedCapacity>,
1822 /// <p><p>Information about item collections, if any, that were affected by the <code>PutItem</code> operation. <code>ItemCollectionMetrics</code> is only returned if the <code>ReturnItemCollectionMetrics</code> parameter was specified. If the table does not have any local secondary indexes, this information is not returned in the response.</p> <p>Each <code>ItemCollectionMetrics</code> element consists of:</p> <ul> <li> <p> <code>ItemCollectionKey</code> - The partition key value of the item collection. This is the same as the partition key value of the item itself.</p> </li> <li> <p> <code>SizeEstimateRangeGB</code> - An estimate of item collection size, in gigabytes. This value is a two-element array containing a lower bound and an upper bound for the estimate. The estimate includes the size of all the items in the table, plus the size of all attributes projected into all of the local secondary indexes on that table. Use this estimate to measure whether a local secondary index is approaching its size limit.</p> <p>The estimate is subject to change over time; therefore, do not rely on the precision or accuracy of the estimate.</p> </li> </ul></p>
1823 #[serde(rename = "ItemCollectionMetrics")]
1824 #[serde(skip_serializing_if = "Option::is_none")]
1825 pub item_collection_metrics: Option<ItemCollectionMetrics>,
1826}
1827
1828/// <p>Represents a request to perform a <code>PutItem</code> operation on an item.</p>
1829#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
1830pub struct PutRequest {
1831 /// <p>A map of attribute name to attribute values, representing the primary key of an item to be processed by <code>PutItem</code>. All of the table's primary key attributes must be specified, and their data types must match those of the table's key schema. If any attributes are present in the item that are part of an index key schema for the table, their types must match the index key schema.</p>
1832 #[serde(rename = "Item")]
1833 pub item: ::std::collections::HashMap<String, AttributeValue>,
1834}
1835
1836/// <p>Represents the input of a <code>Query</code> operation.</p>
1837#[derive(Clone, Debug, Default, PartialEq, Serialize)]
1838#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
1839pub struct QueryInput {
1840 /// <p>This is a legacy parameter. Use <code>ProjectionExpression</code> instead. For more information, see <a href="https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/LegacyConditionalParameters.AttributesToGet.html">AttributesToGet</a> in the <i>Amazon DynamoDB Developer Guide</i>.</p>
1841 #[serde(rename = "AttributesToGet")]
1842 #[serde(skip_serializing_if = "Option::is_none")]
1843 pub attributes_to_get: Option<Vec<String>>,
1844 /// <p>This is a legacy parameter. Use <code>FilterExpression</code> instead. For more information, see <a href="https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/LegacyConditionalParameters.ConditionalOperator.html">ConditionalOperator</a> in the <i>Amazon DynamoDB Developer Guide</i>.</p>
1845 #[serde(rename = "ConditionalOperator")]
1846 #[serde(skip_serializing_if = "Option::is_none")]
1847 pub conditional_operator: Option<String>,
1848 /// <p>Determines the read consistency model: If set to <code>true</code>, then the operation uses strongly consistent reads; otherwise, the operation uses eventually consistent reads.</p> <p>Strongly consistent reads are not supported on global secondary indexes. If you query a global secondary index with <code>ConsistentRead</code> set to <code>true</code>, you will receive a <code>ValidationException</code>.</p>
1849 #[serde(rename = "ConsistentRead")]
1850 #[serde(skip_serializing_if = "Option::is_none")]
1851 pub consistent_read: Option<bool>,
1852 /// <p>The primary key of the first item that this operation will evaluate. Use the value that was returned for <code>LastEvaluatedKey</code> in the previous operation.</p> <p>The data type for <code>ExclusiveStartKey</code> must be String, Number, or Binary. No set data types are allowed.</p>
1853 #[serde(rename = "ExclusiveStartKey")]
1854 #[serde(skip_serializing_if = "Option::is_none")]
1855 pub exclusive_start_key: Option<::std::collections::HashMap<String, AttributeValue>>,
1856 /// <p>One or more substitution tokens for attribute names in an expression. The following are some use cases for using <code>ExpressionAttributeNames</code>:</p> <ul> <li> <p>To access an attribute whose name conflicts with a DynamoDB reserved word.</p> </li> <li> <p>To create a placeholder for repeating occurrences of an attribute name in an expression.</p> </li> <li> <p>To prevent special characters in an attribute name from being misinterpreted in an expression.</p> </li> </ul> <p>Use the <b>#</b> character in an expression to dereference an attribute name. For example, consider the following attribute name:</p> <ul> <li> <p> <code>Percentile</code> </p> </li> </ul> <p>The name of this attribute conflicts with a reserved word, so it cannot be used directly in an expression. (For the complete list of reserved words, see <a href="https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/ReservedWords.html">Reserved Words</a> in the <i>Amazon DynamoDB Developer Guide</i>). To work around this, you could specify the following for <code>ExpressionAttributeNames</code>:</p> <ul> <li> <p> <code>{"#P":"Percentile"}</code> </p> </li> </ul> <p>You could then use this substitution in an expression, as in this example:</p> <ul> <li> <p> <code>#P = :val</code> </p> </li> </ul> <note> <p>Tokens that begin with the <b>:</b> character are <i>expression attribute values</i>, which are placeholders for the actual value at runtime.</p> </note> <p>For more information on expression attribute names, see <a href="https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Expressions.AccessingItemAttributes.html">Specifying Item Attributes</a> in the <i>Amazon DynamoDB Developer Guide</i>.</p>
1857 #[serde(rename = "ExpressionAttributeNames")]
1858 #[serde(skip_serializing_if = "Option::is_none")]
1859 pub expression_attribute_names: Option<::std::collections::HashMap<String, String>>,
1860 /// <p>One or more values that can be substituted in an expression.</p> <p>Use the <b>:</b> (colon) character in an expression to dereference an attribute value. For example, suppose that you wanted to check whether the value of the <i>ProductStatus</i> attribute was one of the following: </p> <p> <code>Available | Backordered | Discontinued</code> </p> <p>You would first need to specify <code>ExpressionAttributeValues</code> as follows:</p> <p> <code>{ ":avail":{"S":"Available"}, ":back":{"S":"Backordered"}, ":disc":{"S":"Discontinued"} }</code> </p> <p>You could then use these values in an expression, such as this:</p> <p> <code>ProductStatus IN (:avail, :back, :disc)</code> </p> <p>For more information on expression attribute values, see <a href="https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Expressions.SpecifyingConditions.html">Specifying Conditions</a> in the <i>Amazon DynamoDB Developer Guide</i>.</p>
1861 #[serde(rename = "ExpressionAttributeValues")]
1862 #[serde(skip_serializing_if = "Option::is_none")]
1863 pub expression_attribute_values: Option<::std::collections::HashMap<String, AttributeValue>>,
1864 /// <p>A string that contains conditions that DynamoDB applies after the <code>Query</code> operation, but before the data is returned to you. Items that do not satisfy the <code>FilterExpression</code> criteria are not returned.</p> <p>A <code>FilterExpression</code> does not allow key attributes. You cannot define a filter expression based on a partition key or a sort key.</p> <note> <p>A <code>FilterExpression</code> is applied after the items have already been read; the process of filtering does not consume any additional read capacity units.</p> </note> <p>For more information, see <a href="https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/QueryAndScan.html#FilteringResults">Filter Expressions</a> in the <i>Amazon DynamoDB Developer Guide</i>.</p>
1865 #[serde(rename = "FilterExpression")]
1866 #[serde(skip_serializing_if = "Option::is_none")]
1867 pub filter_expression: Option<String>,
1868 /// <p>The name of an index to query. This index can be any local secondary index or global secondary index on the table. Note that if you use the <code>IndexName</code> parameter, you must also provide <code>TableName.</code> </p>
1869 #[serde(rename = "IndexName")]
1870 #[serde(skip_serializing_if = "Option::is_none")]
1871 pub index_name: Option<String>,
1872 /// <p>The condition that specifies the key values for items to be retrieved by the <code>Query</code> action.</p> <p>The condition must perform an equality test on a single partition key value.</p> <p>The condition can optionally perform one of several comparison tests on a single sort key value. This allows <code>Query</code> to retrieve one item with a given partition key value and sort key value, or several items that have the same partition key value but different sort key values.</p> <p>The partition key equality test is required, and must be specified in the following format:</p> <p> <code>partitionKeyName</code> <i>=</i> <code>:partitionkeyval</code> </p> <p>If you also want to provide a condition for the sort key, it must be combined using <code>AND</code> with the condition for the sort key. Following is an example, using the <b>=</b> comparison operator for the sort key:</p> <p> <code>partitionKeyName</code> <code>=</code> <code>:partitionkeyval</code> <code>AND</code> <code>sortKeyName</code> <code>=</code> <code>:sortkeyval</code> </p> <p>Valid comparisons for the sort key condition are as follows:</p> <ul> <li> <p> <code>sortKeyName</code> <code>=</code> <code>:sortkeyval</code> - true if the sort key value is equal to <code>:sortkeyval</code>.</p> </li> <li> <p> <code>sortKeyName</code> <code><</code> <code>:sortkeyval</code> - true if the sort key value is less than <code>:sortkeyval</code>.</p> </li> <li> <p> <code>sortKeyName</code> <code><=</code> <code>:sortkeyval</code> - true if the sort key value is less than or equal to <code>:sortkeyval</code>.</p> </li> <li> <p> <code>sortKeyName</code> <code>></code> <code>:sortkeyval</code> - true if the sort key value is greater than <code>:sortkeyval</code>.</p> </li> <li> <p> <code>sortKeyName</code> <code>>= </code> <code>:sortkeyval</code> - true if the sort key value is greater than or equal to <code>:sortkeyval</code>.</p> </li> <li> <p> <code>sortKeyName</code> <code>BETWEEN</code> <code>:sortkeyval1</code> <code>AND</code> <code>:sortkeyval2</code> - true if the sort key value is greater than or equal to <code>:sortkeyval1</code>, and less than or equal to <code>:sortkeyval2</code>.</p> </li> <li> <p> <code>begins_with (</code> <code>sortKeyName</code>, <code>:sortkeyval</code> <code>)</code> - true if the sort key value begins with a particular operand. (You cannot use this function with a sort key that is of type Number.) Note that the function name <code>begins_with</code> is case-sensitive.</p> </li> </ul> <p>Use the <code>ExpressionAttributeValues</code> parameter to replace tokens such as <code>:partitionval</code> and <code>:sortval</code> with actual values at runtime.</p> <p>You can optionally use the <code>ExpressionAttributeNames</code> parameter to replace the names of the partition key and sort key with placeholder tokens. This option might be necessary if an attribute name conflicts with a DynamoDB reserved word. For example, the following <code>KeyConditionExpression</code> parameter causes an error because <i>Size</i> is a reserved word:</p> <ul> <li> <p> <code>Size = :myval</code> </p> </li> </ul> <p>To work around this, define a placeholder (such a <code>#S</code>) to represent the attribute name <i>Size</i>. <code>KeyConditionExpression</code> then is as follows:</p> <ul> <li> <p> <code>#S = :myval</code> </p> </li> </ul> <p>For a list of reserved words, see <a href="https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/ReservedWords.html">Reserved Words</a> in the <i>Amazon DynamoDB Developer Guide</i>.</p> <p>For more information on <code>ExpressionAttributeNames</code> and <code>ExpressionAttributeValues</code>, see <a href="https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/ExpressionPlaceholders.html">Using Placeholders for Attribute Names and Values</a> in the <i>Amazon DynamoDB Developer Guide</i>.</p>
1873 #[serde(rename = "KeyConditionExpression")]
1874 #[serde(skip_serializing_if = "Option::is_none")]
1875 pub key_condition_expression: Option<String>,
1876 /// <p>This is a legacy parameter. Use <code>KeyConditionExpression</code> instead. For more information, see <a href="https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/LegacyConditionalParameters.KeyConditions.html">KeyConditions</a> in the <i>Amazon DynamoDB Developer Guide</i>.</p>
1877 #[serde(rename = "KeyConditions")]
1878 #[serde(skip_serializing_if = "Option::is_none")]
1879 pub key_conditions: Option<::std::collections::HashMap<String, Condition>>,
1880 /// <p>The maximum number of items to evaluate (not necessarily the number of matching items). If DynamoDB processes the number of items up to the limit while processing the results, it stops the operation and returns the matching values up to that point, and a key in <code>LastEvaluatedKey</code> to apply in a subsequent operation, so that you can pick up where you left off. Also, if the processed dataset size exceeds 1 MB before DynamoDB reaches this limit, it stops the operation and returns the matching values up to the limit, and a key in <code>LastEvaluatedKey</code> to apply in a subsequent operation to continue the operation. For more information, see <a href="https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/QueryAndScan.html">Query and Scan</a> in the <i>Amazon DynamoDB Developer Guide</i>.</p>
1881 #[serde(rename = "Limit")]
1882 #[serde(skip_serializing_if = "Option::is_none")]
1883 pub limit: Option<i64>,
1884 /// <p>A string that identifies one or more attributes to retrieve from the table. These attributes can include scalars, sets, or elements of a JSON document. The attributes in the expression must be separated by commas.</p> <p>If no attribute names are specified, then all attributes will be returned. If any of the requested attributes are not found, they will not appear in the result.</p> <p>For more information, see <a href="https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Expressions.AccessingItemAttributes.html">Accessing Item Attributes</a> in the <i>Amazon DynamoDB Developer Guide</i>.</p>
1885 #[serde(rename = "ProjectionExpression")]
1886 #[serde(skip_serializing_if = "Option::is_none")]
1887 pub projection_expression: Option<String>,
1888 /// <p>This is a legacy parameter. Use <code>FilterExpression</code> instead. For more information, see <a href="https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/LegacyConditionalParameters.QueryFilter.html">QueryFilter</a> in the <i>Amazon DynamoDB Developer Guide</i>.</p>
1889 #[serde(rename = "QueryFilter")]
1890 #[serde(skip_serializing_if = "Option::is_none")]
1891 pub query_filter: Option<::std::collections::HashMap<String, Condition>>,
1892 #[serde(rename = "ReturnConsumedCapacity")]
1893 #[serde(skip_serializing_if = "Option::is_none")]
1894 pub return_consumed_capacity: Option<String>,
1895 /// <p>Specifies the order for index traversal: If <code>true</code> (default), the traversal is performed in ascending order; if <code>false</code>, the traversal is performed in descending order. </p> <p>Items with the same partition key value are stored in sorted order by sort key. If the sort key data type is Number, the results are stored in numeric order. For type String, the results are stored in order of UTF-8 bytes. For type Binary, DynamoDB treats each byte of the binary data as unsigned.</p> <p>If <code>ScanIndexForward</code> is <code>true</code>, DynamoDB returns the results in the order in which they are stored (by sort key value). This is the default behavior. If <code>ScanIndexForward</code> is <code>false</code>, DynamoDB reads the results in reverse order by sort key value, and then returns the results to the client.</p>
1896 #[serde(rename = "ScanIndexForward")]
1897 #[serde(skip_serializing_if = "Option::is_none")]
1898 pub scan_index_forward: Option<bool>,
1899 /// <p><p>The attributes to be returned in the result. You can retrieve all item attributes, specific item attributes, the count of matching items, or in the case of an index, some or all of the attributes projected into the index.</p> <ul> <li> <p> <code>ALL<em>ATTRIBUTES</code> - Returns all of the item attributes from the specified table or index. If you query a local secondary index, then for each matching item in the index, DynamoDB fetches the entire item from the parent table. If the index is configured to project all item attributes, then all of the data can be obtained from the local secondary index, and no fetching is required.</p> </li> <li> <p> <code>ALL</em>PROJECTED<em>ATTRIBUTES</code> - Allowed only when querying an index. Retrieves all attributes that have been projected into the index. If the index is configured to project all attributes, this return value is equivalent to specifying <code>ALL</em>ATTRIBUTES</code>.</p> </li> <li> <p> <code>COUNT</code> - Returns the number of matching items, rather than the matching items themselves.</p> </li> <li> <p> <code>SPECIFIC<em>ATTRIBUTES</code> - Returns only the attributes listed in <code>AttributesToGet</code>. This return value is equivalent to specifying <code>AttributesToGet</code> without specifying any value for <code>Select</code>.</p> <p>If you query or scan a local secondary index and request only attributes that are projected into that index, the operation will read only the index and not the table. If any of the requested attributes are not projected into the local secondary index, DynamoDB fetches each of these attributes from the parent table. This extra fetching incurs additional throughput cost and latency.</p> <p>If you query or scan a global secondary index, you can only request attributes that are projected into the index. Global secondary index queries cannot fetch attributes from the parent table.</p> </li> </ul> <p>If neither <code>Select</code> nor <code>AttributesToGet</code> are specified, DynamoDB defaults to <code>ALL</em>ATTRIBUTES</code> when accessing a table, and <code>ALL<em>PROJECTED</em>ATTRIBUTES</code> when accessing an index. You cannot use both <code>Select</code> and <code>AttributesToGet</code> together in a single request, unless the value for <code>Select</code> is <code>SPECIFIC<em>ATTRIBUTES</code>. (This usage is equivalent to specifying <code>AttributesToGet</code> without any value for <code>Select</code>.)</p> <note> <p>If you use the <code>ProjectionExpression</code> parameter, then the value for <code>Select</code> can only be <code>SPECIFIC</em>ATTRIBUTES</code>. Any other value for <code>Select</code> will return an error.</p> </note></p>
1900 #[serde(rename = "Select")]
1901 #[serde(skip_serializing_if = "Option::is_none")]
1902 pub select: Option<String>,
1903 /// <p>The name of the table containing the requested items.</p>
1904 #[serde(rename = "TableName")]
1905 pub table_name: String,
1906}
1907
1908/// <p>Represents the output of a <code>Query</code> operation.</p>
1909#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
1910#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
1911pub struct QueryOutput {
1912 /// <p>The capacity units consumed by the <code>Query</code> operation. The data returned includes the total provisioned throughput consumed, along with statistics for the table and any indexes involved in the operation. <code>ConsumedCapacity</code> is only returned if the <code>ReturnConsumedCapacity</code> parameter was specified. For more information, see <a href="https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/ProvisionedThroughputIntro.html">Provisioned Throughput</a> in the <i>Amazon DynamoDB Developer Guide</i>.</p>
1913 #[serde(rename = "ConsumedCapacity")]
1914 #[serde(skip_serializing_if = "Option::is_none")]
1915 pub consumed_capacity: Option<ConsumedCapacity>,
1916 /// <p>The number of items in the response.</p> <p>If you used a <code>QueryFilter</code> in the request, then <code>Count</code> is the number of items returned after the filter was applied, and <code>ScannedCount</code> is the number of matching items before the filter was applied.</p> <p>If you did not use a filter in the request, then <code>Count</code> and <code>ScannedCount</code> are the same.</p>
1917 #[serde(rename = "Count")]
1918 #[serde(skip_serializing_if = "Option::is_none")]
1919 pub count: Option<i64>,
1920 /// <p>An array of item attributes that match the query criteria. Each element in this array consists of an attribute name and the value for that attribute.</p>
1921 #[serde(rename = "Items")]
1922 #[serde(skip_serializing_if = "Option::is_none")]
1923 pub items: Option<Vec<::std::collections::HashMap<String, AttributeValue>>>,
1924 /// <p>The primary key of the item where the operation stopped, inclusive of the previous result set. Use this value to start a new operation, excluding this value in the new request.</p> <p>If <code>LastEvaluatedKey</code> is empty, then the "last page" of results has been processed and there is no more data to be retrieved.</p> <p>If <code>LastEvaluatedKey</code> is not empty, it does not necessarily mean that there is more data in the result set. The only way to know when you have reached the end of the result set is when <code>LastEvaluatedKey</code> is empty.</p>
1925 #[serde(rename = "LastEvaluatedKey")]
1926 #[serde(skip_serializing_if = "Option::is_none")]
1927 pub last_evaluated_key: Option<::std::collections::HashMap<String, AttributeValue>>,
1928 /// <p>The number of items evaluated, before any <code>QueryFilter</code> is applied. A high <code>ScannedCount</code> value with few, or no, <code>Count</code> results indicates an inefficient <code>Query</code> operation. For more information, see <a href="https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/QueryAndScan.html#Count">Count and ScannedCount</a> in the <i>Amazon DynamoDB Developer Guide</i>.</p> <p>If you did not use a filter in the request, then <code>ScannedCount</code> is the same as <code>Count</code>.</p>
1929 #[serde(rename = "ScannedCount")]
1930 #[serde(skip_serializing_if = "Option::is_none")]
1931 pub scanned_count: Option<i64>,
1932}
1933
1934/// <p>Represents the properties of a replica.</p>
1935#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
1936pub struct Replica {
1937 /// <p>The Region where the replica needs to be created.</p>
1938 #[serde(rename = "RegionName")]
1939 #[serde(skip_serializing_if = "Option::is_none")]
1940 pub region_name: Option<String>,
1941}
1942
1943/// <p>Represents the auto scaling settings of the replica.</p>
1944#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
1945#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
1946pub struct ReplicaAutoScalingDescription {
1947 /// <p>Replica-specific global secondary index auto scaling settings.</p>
1948 #[serde(rename = "GlobalSecondaryIndexes")]
1949 #[serde(skip_serializing_if = "Option::is_none")]
1950 pub global_secondary_indexes: Option<Vec<ReplicaGlobalSecondaryIndexAutoScalingDescription>>,
1951 /// <p>The Region where the replica exists.</p>
1952 #[serde(rename = "RegionName")]
1953 #[serde(skip_serializing_if = "Option::is_none")]
1954 pub region_name: Option<String>,
1955 #[serde(rename = "ReplicaProvisionedReadCapacityAutoScalingSettings")]
1956 #[serde(skip_serializing_if = "Option::is_none")]
1957 pub replica_provisioned_read_capacity_auto_scaling_settings:
1958 Option<AutoScalingSettingsDescription>,
1959 #[serde(rename = "ReplicaProvisionedWriteCapacityAutoScalingSettings")]
1960 #[serde(skip_serializing_if = "Option::is_none")]
1961 pub replica_provisioned_write_capacity_auto_scaling_settings:
1962 Option<AutoScalingSettingsDescription>,
1963 /// <p><p>The current state of the replica:</p> <ul> <li> <p> <code>CREATING</code> - The replica is being created.</p> </li> <li> <p> <code>UPDATING</code> - The replica is being updated.</p> </li> <li> <p> <code>DELETING</code> - The replica is being deleted.</p> </li> <li> <p> <code>ACTIVE</code> - The replica is ready for use.</p> </li> </ul></p>
1964 #[serde(rename = "ReplicaStatus")]
1965 #[serde(skip_serializing_if = "Option::is_none")]
1966 pub replica_status: Option<String>,
1967}
1968
1969/// <p>Represents the auto scaling settings of a replica that will be modified.</p>
1970#[derive(Clone, Debug, Default, PartialEq, Serialize)]
1971#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
1972pub struct ReplicaAutoScalingUpdate {
1973 /// <p>The Region where the replica exists.</p>
1974 #[serde(rename = "RegionName")]
1975 pub region_name: String,
1976 /// <p>Represents the auto scaling settings of global secondary indexes that will be modified.</p>
1977 #[serde(rename = "ReplicaGlobalSecondaryIndexUpdates")]
1978 #[serde(skip_serializing_if = "Option::is_none")]
1979 pub replica_global_secondary_index_updates:
1980 Option<Vec<ReplicaGlobalSecondaryIndexAutoScalingUpdate>>,
1981 #[serde(rename = "ReplicaProvisionedReadCapacityAutoScalingUpdate")]
1982 #[serde(skip_serializing_if = "Option::is_none")]
1983 pub replica_provisioned_read_capacity_auto_scaling_update: Option<AutoScalingSettingsUpdate>,
1984}
1985
1986/// <p>Contains the details of the replica.</p>
1987#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
1988#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
1989pub struct ReplicaDescription {
1990 /// <p>Replica-specific global secondary index settings.</p>
1991 #[serde(rename = "GlobalSecondaryIndexes")]
1992 #[serde(skip_serializing_if = "Option::is_none")]
1993 pub global_secondary_indexes: Option<Vec<ReplicaGlobalSecondaryIndexDescription>>,
1994 /// <p>The AWS KMS customer master key (CMK) of the replica that will be used for AWS KMS encryption.</p>
1995 #[serde(rename = "KMSMasterKeyId")]
1996 #[serde(skip_serializing_if = "Option::is_none")]
1997 pub kms_master_key_id: Option<String>,
1998 /// <p>Replica-specific provisioned throughput. If not described, uses the source table's provisioned throughput settings.</p>
1999 #[serde(rename = "ProvisionedThroughputOverride")]
2000 #[serde(skip_serializing_if = "Option::is_none")]
2001 pub provisioned_throughput_override: Option<ProvisionedThroughputOverride>,
2002 /// <p>The name of the Region.</p>
2003 #[serde(rename = "RegionName")]
2004 #[serde(skip_serializing_if = "Option::is_none")]
2005 pub region_name: Option<String>,
2006 /// <p><p>The current state of the replica:</p> <ul> <li> <p> <code>CREATING</code> - The replica is being created.</p> </li> <li> <p> <code>UPDATING</code> - The replica is being updated.</p> </li> <li> <p> <code>DELETING</code> - The replica is being deleted.</p> </li> <li> <p> <code>ACTIVE</code> - The replica is ready for use.</p> </li> </ul></p>
2007 #[serde(rename = "ReplicaStatus")]
2008 #[serde(skip_serializing_if = "Option::is_none")]
2009 pub replica_status: Option<String>,
2010 /// <p>Detailed information about the replica status.</p>
2011 #[serde(rename = "ReplicaStatusDescription")]
2012 #[serde(skip_serializing_if = "Option::is_none")]
2013 pub replica_status_description: Option<String>,
2014 /// <p>Specifies the progress of a Create, Update, or Delete action on the replica as a percentage.</p>
2015 #[serde(rename = "ReplicaStatusPercentProgress")]
2016 #[serde(skip_serializing_if = "Option::is_none")]
2017 pub replica_status_percent_progress: Option<String>,
2018}
2019
2020/// <p>Represents the properties of a replica global secondary index.</p>
2021#[derive(Clone, Debug, Default, PartialEq, Serialize)]
2022#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
2023pub struct ReplicaGlobalSecondaryIndex {
2024 /// <p>The name of the global secondary index.</p>
2025 #[serde(rename = "IndexName")]
2026 pub index_name: String,
2027 /// <p>Replica table GSI-specific provisioned throughput. If not specified, uses the source table GSI's read capacity settings.</p>
2028 #[serde(rename = "ProvisionedThroughputOverride")]
2029 #[serde(skip_serializing_if = "Option::is_none")]
2030 pub provisioned_throughput_override: Option<ProvisionedThroughputOverride>,
2031}
2032
2033/// <p>Represents the auto scaling configuration for a replica global secondary index.</p>
2034#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
2035#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
2036pub struct ReplicaGlobalSecondaryIndexAutoScalingDescription {
2037 /// <p>The name of the global secondary index.</p>
2038 #[serde(rename = "IndexName")]
2039 #[serde(skip_serializing_if = "Option::is_none")]
2040 pub index_name: Option<String>,
2041 /// <p><p>The current state of the replica global secondary index:</p> <ul> <li> <p> <code>CREATING</code> - The index is being created.</p> </li> <li> <p> <code>UPDATING</code> - The index is being updated.</p> </li> <li> <p> <code>DELETING</code> - The index is being deleted.</p> </li> <li> <p> <code>ACTIVE</code> - The index is ready for use.</p> </li> </ul></p>
2042 #[serde(rename = "IndexStatus")]
2043 #[serde(skip_serializing_if = "Option::is_none")]
2044 pub index_status: Option<String>,
2045 #[serde(rename = "ProvisionedReadCapacityAutoScalingSettings")]
2046 #[serde(skip_serializing_if = "Option::is_none")]
2047 pub provisioned_read_capacity_auto_scaling_settings: Option<AutoScalingSettingsDescription>,
2048 #[serde(rename = "ProvisionedWriteCapacityAutoScalingSettings")]
2049 #[serde(skip_serializing_if = "Option::is_none")]
2050 pub provisioned_write_capacity_auto_scaling_settings: Option<AutoScalingSettingsDescription>,
2051}
2052
2053/// <p>Represents the auto scaling settings of a global secondary index for a replica that will be modified.</p>
2054#[derive(Clone, Debug, Default, PartialEq, Serialize)]
2055#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
2056pub struct ReplicaGlobalSecondaryIndexAutoScalingUpdate {
2057 /// <p>The name of the global secondary index.</p>
2058 #[serde(rename = "IndexName")]
2059 #[serde(skip_serializing_if = "Option::is_none")]
2060 pub index_name: Option<String>,
2061 #[serde(rename = "ProvisionedReadCapacityAutoScalingUpdate")]
2062 #[serde(skip_serializing_if = "Option::is_none")]
2063 pub provisioned_read_capacity_auto_scaling_update: Option<AutoScalingSettingsUpdate>,
2064}
2065
2066/// <p>Represents the properties of a replica global secondary index.</p>
2067#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
2068#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
2069pub struct ReplicaGlobalSecondaryIndexDescription {
2070 /// <p>The name of the global secondary index.</p>
2071 #[serde(rename = "IndexName")]
2072 #[serde(skip_serializing_if = "Option::is_none")]
2073 pub index_name: Option<String>,
2074 /// <p>If not described, uses the source table GSI's read capacity settings.</p>
2075 #[serde(rename = "ProvisionedThroughputOverride")]
2076 #[serde(skip_serializing_if = "Option::is_none")]
2077 pub provisioned_throughput_override: Option<ProvisionedThroughputOverride>,
2078}
2079
2080/// <p>Represents the properties of a global secondary index.</p>
2081#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
2082#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
2083pub struct ReplicaGlobalSecondaryIndexSettingsDescription {
2084 /// <p>The name of the global secondary index. The name must be unique among all other indexes on this table.</p>
2085 #[serde(rename = "IndexName")]
2086 pub index_name: String,
2087 /// <p><p> The current status of the global secondary index:</p> <ul> <li> <p> <code>CREATING</code> - The global secondary index is being created.</p> </li> <li> <p> <code>UPDATING</code> - The global secondary index is being updated.</p> </li> <li> <p> <code>DELETING</code> - The global secondary index is being deleted.</p> </li> <li> <p> <code>ACTIVE</code> - The global secondary index is ready for use.</p> </li> </ul></p>
2088 #[serde(rename = "IndexStatus")]
2089 #[serde(skip_serializing_if = "Option::is_none")]
2090 pub index_status: Option<String>,
2091 /// <p>Auto scaling settings for a global secondary index replica's read capacity units.</p>
2092 #[serde(rename = "ProvisionedReadCapacityAutoScalingSettings")]
2093 #[serde(skip_serializing_if = "Option::is_none")]
2094 pub provisioned_read_capacity_auto_scaling_settings: Option<AutoScalingSettingsDescription>,
2095 /// <p>The maximum number of strongly consistent reads consumed per second before DynamoDB returns a <code>ThrottlingException</code>.</p>
2096 #[serde(rename = "ProvisionedReadCapacityUnits")]
2097 #[serde(skip_serializing_if = "Option::is_none")]
2098 pub provisioned_read_capacity_units: Option<i64>,
2099 /// <p>Auto scaling settings for a global secondary index replica's write capacity units.</p>
2100 #[serde(rename = "ProvisionedWriteCapacityAutoScalingSettings")]
2101 #[serde(skip_serializing_if = "Option::is_none")]
2102 pub provisioned_write_capacity_auto_scaling_settings: Option<AutoScalingSettingsDescription>,
2103 /// <p>The maximum number of writes consumed per second before DynamoDB returns a <code>ThrottlingException</code>.</p>
2104 #[serde(rename = "ProvisionedWriteCapacityUnits")]
2105 #[serde(skip_serializing_if = "Option::is_none")]
2106 pub provisioned_write_capacity_units: Option<i64>,
2107}
2108
2109/// <p>Represents the settings of a global secondary index for a global table that will be modified.</p>
2110#[derive(Clone, Debug, Default, PartialEq, Serialize)]
2111#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
2112pub struct ReplicaGlobalSecondaryIndexSettingsUpdate {
2113 /// <p>The name of the global secondary index. The name must be unique among all other indexes on this table.</p>
2114 #[serde(rename = "IndexName")]
2115 pub index_name: String,
2116 /// <p>Auto scaling settings for managing a global secondary index replica's read capacity units.</p>
2117 #[serde(rename = "ProvisionedReadCapacityAutoScalingSettingsUpdate")]
2118 #[serde(skip_serializing_if = "Option::is_none")]
2119 pub provisioned_read_capacity_auto_scaling_settings_update: Option<AutoScalingSettingsUpdate>,
2120 /// <p>The maximum number of strongly consistent reads consumed per second before DynamoDB returns a <code>ThrottlingException</code>.</p>
2121 #[serde(rename = "ProvisionedReadCapacityUnits")]
2122 #[serde(skip_serializing_if = "Option::is_none")]
2123 pub provisioned_read_capacity_units: Option<i64>,
2124}
2125
2126/// <p>Represents the properties of a replica.</p>
2127#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
2128#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
2129pub struct ReplicaSettingsDescription {
2130 /// <p>The Region name of the replica.</p>
2131 #[serde(rename = "RegionName")]
2132 pub region_name: String,
2133 /// <p>The read/write capacity mode of the replica.</p>
2134 #[serde(rename = "ReplicaBillingModeSummary")]
2135 #[serde(skip_serializing_if = "Option::is_none")]
2136 pub replica_billing_mode_summary: Option<BillingModeSummary>,
2137 /// <p>Replica global secondary index settings for the global table.</p>
2138 #[serde(rename = "ReplicaGlobalSecondaryIndexSettings")]
2139 #[serde(skip_serializing_if = "Option::is_none")]
2140 pub replica_global_secondary_index_settings:
2141 Option<Vec<ReplicaGlobalSecondaryIndexSettingsDescription>>,
2142 /// <p>Auto scaling settings for a global table replica's read capacity units.</p>
2143 #[serde(rename = "ReplicaProvisionedReadCapacityAutoScalingSettings")]
2144 #[serde(skip_serializing_if = "Option::is_none")]
2145 pub replica_provisioned_read_capacity_auto_scaling_settings:
2146 Option<AutoScalingSettingsDescription>,
2147 /// <p>The maximum number of strongly consistent reads consumed per second before DynamoDB returns a <code>ThrottlingException</code>. For more information, see <a href="https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/WorkingWithTables.html#ProvisionedThroughput">Specifying Read and Write Requirements</a> in the <i>Amazon DynamoDB Developer Guide</i>. </p>
2148 #[serde(rename = "ReplicaProvisionedReadCapacityUnits")]
2149 #[serde(skip_serializing_if = "Option::is_none")]
2150 pub replica_provisioned_read_capacity_units: Option<i64>,
2151 /// <p>Auto scaling settings for a global table replica's write capacity units.</p>
2152 #[serde(rename = "ReplicaProvisionedWriteCapacityAutoScalingSettings")]
2153 #[serde(skip_serializing_if = "Option::is_none")]
2154 pub replica_provisioned_write_capacity_auto_scaling_settings:
2155 Option<AutoScalingSettingsDescription>,
2156 /// <p>The maximum number of writes consumed per second before DynamoDB returns a <code>ThrottlingException</code>. For more information, see <a href="https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/WorkingWithTables.html#ProvisionedThroughput">Specifying Read and Write Requirements</a> in the <i>Amazon DynamoDB Developer Guide</i>.</p>
2157 #[serde(rename = "ReplicaProvisionedWriteCapacityUnits")]
2158 #[serde(skip_serializing_if = "Option::is_none")]
2159 pub replica_provisioned_write_capacity_units: Option<i64>,
2160 /// <p><p>The current state of the Region:</p> <ul> <li> <p> <code>CREATING</code> - The Region is being created.</p> </li> <li> <p> <code>UPDATING</code> - The Region is being updated.</p> </li> <li> <p> <code>DELETING</code> - The Region is being deleted.</p> </li> <li> <p> <code>ACTIVE</code> - The Region is ready for use.</p> </li> </ul></p>
2161 #[serde(rename = "ReplicaStatus")]
2162 #[serde(skip_serializing_if = "Option::is_none")]
2163 pub replica_status: Option<String>,
2164}
2165
2166/// <p>Represents the settings for a global table in a Region that will be modified.</p>
2167#[derive(Clone, Debug, Default, PartialEq, Serialize)]
2168#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
2169pub struct ReplicaSettingsUpdate {
2170 /// <p>The Region of the replica to be added.</p>
2171 #[serde(rename = "RegionName")]
2172 pub region_name: String,
2173 /// <p>Represents the settings of a global secondary index for a global table that will be modified.</p>
2174 #[serde(rename = "ReplicaGlobalSecondaryIndexSettingsUpdate")]
2175 #[serde(skip_serializing_if = "Option::is_none")]
2176 pub replica_global_secondary_index_settings_update:
2177 Option<Vec<ReplicaGlobalSecondaryIndexSettingsUpdate>>,
2178 /// <p>Auto scaling settings for managing a global table replica's read capacity units.</p>
2179 #[serde(rename = "ReplicaProvisionedReadCapacityAutoScalingSettingsUpdate")]
2180 #[serde(skip_serializing_if = "Option::is_none")]
2181 pub replica_provisioned_read_capacity_auto_scaling_settings_update:
2182 Option<AutoScalingSettingsUpdate>,
2183 /// <p>The maximum number of strongly consistent reads consumed per second before DynamoDB returns a <code>ThrottlingException</code>. For more information, see <a href="https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/WorkingWithTables.html#ProvisionedThroughput">Specifying Read and Write Requirements</a> in the <i>Amazon DynamoDB Developer Guide</i>. </p>
2184 #[serde(rename = "ReplicaProvisionedReadCapacityUnits")]
2185 #[serde(skip_serializing_if = "Option::is_none")]
2186 pub replica_provisioned_read_capacity_units: Option<i64>,
2187}
2188
2189/// <p><p>Represents one of the following:</p> <ul> <li> <p>A new replica to be added to an existing global table.</p> </li> <li> <p>New parameters for an existing replica.</p> </li> <li> <p>An existing replica to be removed from an existing global table.</p> </li> </ul></p>
2190#[derive(Clone, Debug, Default, PartialEq, Serialize)]
2191#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
2192pub struct ReplicaUpdate {
2193 /// <p>The parameters required for creating a replica on an existing global table.</p>
2194 #[serde(rename = "Create")]
2195 #[serde(skip_serializing_if = "Option::is_none")]
2196 pub create: Option<CreateReplicaAction>,
2197 /// <p>The name of the existing replica to be removed.</p>
2198 #[serde(rename = "Delete")]
2199 #[serde(skip_serializing_if = "Option::is_none")]
2200 pub delete: Option<DeleteReplicaAction>,
2201}
2202
2203/// <p><p>Represents one of the following:</p> <ul> <li> <p>A new replica to be added to an existing regional table or global table. This request invokes the <code>CreateTableReplica</code> action in the destination Region.</p> </li> <li> <p>New parameters for an existing replica. This request invokes the <code>UpdateTable</code> action in the destination Region.</p> </li> <li> <p>An existing replica to be deleted. The request invokes the <code>DeleteTableReplica</code> action in the destination Region, deleting the replica and all if its items in the destination Region.</p> </li> </ul></p>
2204#[derive(Clone, Debug, Default, PartialEq, Serialize)]
2205#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
2206pub struct ReplicationGroupUpdate {
2207 /// <p>The parameters required for creating a replica for the table.</p>
2208 #[serde(rename = "Create")]
2209 #[serde(skip_serializing_if = "Option::is_none")]
2210 pub create: Option<CreateReplicationGroupMemberAction>,
2211 /// <p>The parameters required for deleting a replica for the table.</p>
2212 #[serde(rename = "Delete")]
2213 #[serde(skip_serializing_if = "Option::is_none")]
2214 pub delete: Option<DeleteReplicationGroupMemberAction>,
2215 /// <p>The parameters required for updating a replica for the table.</p>
2216 #[serde(rename = "Update")]
2217 #[serde(skip_serializing_if = "Option::is_none")]
2218 pub update: Option<UpdateReplicationGroupMemberAction>,
2219}
2220
2221/// <p>Contains details for the restore.</p>
2222#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
2223#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
2224pub struct RestoreSummary {
2225 /// <p>Point in time or source backup time.</p>
2226 #[serde(rename = "RestoreDateTime")]
2227 pub restore_date_time: f64,
2228 /// <p>Indicates if a restore is in progress or not.</p>
2229 #[serde(rename = "RestoreInProgress")]
2230 pub restore_in_progress: bool,
2231 /// <p>The Amazon Resource Name (ARN) of the backup from which the table was restored.</p>
2232 #[serde(rename = "SourceBackupArn")]
2233 #[serde(skip_serializing_if = "Option::is_none")]
2234 pub source_backup_arn: Option<String>,
2235 /// <p>The ARN of the source table of the backup that is being restored.</p>
2236 #[serde(rename = "SourceTableArn")]
2237 #[serde(skip_serializing_if = "Option::is_none")]
2238 pub source_table_arn: Option<String>,
2239}
2240
2241#[derive(Clone, Debug, Default, PartialEq, Serialize)]
2242#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
2243pub struct RestoreTableFromBackupInput {
2244 /// <p>The Amazon Resource Name (ARN) associated with the backup.</p>
2245 #[serde(rename = "BackupArn")]
2246 pub backup_arn: String,
2247 /// <p>The billing mode of the restored table.</p>
2248 #[serde(rename = "BillingModeOverride")]
2249 #[serde(skip_serializing_if = "Option::is_none")]
2250 pub billing_mode_override: Option<String>,
2251 /// <p>List of global secondary indexes for the restored table. The indexes provided should match existing secondary indexes. You can choose to exclude some or all of the indexes at the time of restore.</p>
2252 #[serde(rename = "GlobalSecondaryIndexOverride")]
2253 #[serde(skip_serializing_if = "Option::is_none")]
2254 pub global_secondary_index_override: Option<Vec<GlobalSecondaryIndex>>,
2255 /// <p>List of local secondary indexes for the restored table. The indexes provided should match existing secondary indexes. You can choose to exclude some or all of the indexes at the time of restore.</p>
2256 #[serde(rename = "LocalSecondaryIndexOverride")]
2257 #[serde(skip_serializing_if = "Option::is_none")]
2258 pub local_secondary_index_override: Option<Vec<LocalSecondaryIndex>>,
2259 /// <p>Provisioned throughput settings for the restored table.</p>
2260 #[serde(rename = "ProvisionedThroughputOverride")]
2261 #[serde(skip_serializing_if = "Option::is_none")]
2262 pub provisioned_throughput_override: Option<ProvisionedThroughput>,
2263 /// <p>The new server-side encryption settings for the restored table.</p>
2264 #[serde(rename = "SSESpecificationOverride")]
2265 #[serde(skip_serializing_if = "Option::is_none")]
2266 pub sse_specification_override: Option<SSESpecification>,
2267 /// <p>The name of the new table to which the backup must be restored.</p>
2268 #[serde(rename = "TargetTableName")]
2269 pub target_table_name: String,
2270}
2271
2272#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
2273#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
2274pub struct RestoreTableFromBackupOutput {
2275 /// <p>The description of the table created from an existing backup.</p>
2276 #[serde(rename = "TableDescription")]
2277 #[serde(skip_serializing_if = "Option::is_none")]
2278 pub table_description: Option<TableDescription>,
2279}
2280
2281#[derive(Clone, Debug, Default, PartialEq, Serialize)]
2282#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
2283pub struct RestoreTableToPointInTimeInput {
2284 /// <p>The billing mode of the restored table.</p>
2285 #[serde(rename = "BillingModeOverride")]
2286 #[serde(skip_serializing_if = "Option::is_none")]
2287 pub billing_mode_override: Option<String>,
2288 /// <p>List of global secondary indexes for the restored table. The indexes provided should match existing secondary indexes. You can choose to exclude some or all of the indexes at the time of restore.</p>
2289 #[serde(rename = "GlobalSecondaryIndexOverride")]
2290 #[serde(skip_serializing_if = "Option::is_none")]
2291 pub global_secondary_index_override: Option<Vec<GlobalSecondaryIndex>>,
2292 /// <p>List of local secondary indexes for the restored table. The indexes provided should match existing secondary indexes. You can choose to exclude some or all of the indexes at the time of restore.</p>
2293 #[serde(rename = "LocalSecondaryIndexOverride")]
2294 #[serde(skip_serializing_if = "Option::is_none")]
2295 pub local_secondary_index_override: Option<Vec<LocalSecondaryIndex>>,
2296 /// <p>Provisioned throughput settings for the restored table.</p>
2297 #[serde(rename = "ProvisionedThroughputOverride")]
2298 #[serde(skip_serializing_if = "Option::is_none")]
2299 pub provisioned_throughput_override: Option<ProvisionedThroughput>,
2300 /// <p>Time in the past to restore the table to.</p>
2301 #[serde(rename = "RestoreDateTime")]
2302 #[serde(skip_serializing_if = "Option::is_none")]
2303 pub restore_date_time: Option<f64>,
2304 /// <p>The new server-side encryption settings for the restored table.</p>
2305 #[serde(rename = "SSESpecificationOverride")]
2306 #[serde(skip_serializing_if = "Option::is_none")]
2307 pub sse_specification_override: Option<SSESpecification>,
2308 /// <p>The DynamoDB table that will be restored. This value is an Amazon Resource Name (ARN).</p>
2309 #[serde(rename = "SourceTableArn")]
2310 #[serde(skip_serializing_if = "Option::is_none")]
2311 pub source_table_arn: Option<String>,
2312 /// <p>Name of the source table that is being restored.</p>
2313 #[serde(rename = "SourceTableName")]
2314 #[serde(skip_serializing_if = "Option::is_none")]
2315 pub source_table_name: Option<String>,
2316 /// <p>The name of the new table to which it must be restored to.</p>
2317 #[serde(rename = "TargetTableName")]
2318 pub target_table_name: String,
2319 /// <p>Restore the table to the latest possible time. <code>LatestRestorableDateTime</code> is typically 5 minutes before the current time. </p>
2320 #[serde(rename = "UseLatestRestorableTime")]
2321 #[serde(skip_serializing_if = "Option::is_none")]
2322 pub use_latest_restorable_time: Option<bool>,
2323}
2324
2325#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
2326#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
2327pub struct RestoreTableToPointInTimeOutput {
2328 /// <p>Represents the properties of a table.</p>
2329 #[serde(rename = "TableDescription")]
2330 #[serde(skip_serializing_if = "Option::is_none")]
2331 pub table_description: Option<TableDescription>,
2332}
2333
2334/// <p>The description of the server-side encryption status on the specified table.</p>
2335#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
2336#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
2337pub struct SSEDescription {
2338 /// <p>Indicates the time, in UNIX epoch date format, when DynamoDB detected that the table's AWS KMS key was inaccessible. This attribute will automatically be cleared when DynamoDB detects that the table's AWS KMS key is accessible again. DynamoDB will initiate the table archival process when table's AWS KMS key remains inaccessible for more than seven days from this date.</p>
2339 #[serde(rename = "InaccessibleEncryptionDateTime")]
2340 #[serde(skip_serializing_if = "Option::is_none")]
2341 pub inaccessible_encryption_date_time: Option<f64>,
2342 /// <p>The AWS KMS customer master key (CMK) ARN used for the AWS KMS encryption.</p>
2343 #[serde(rename = "KMSMasterKeyArn")]
2344 #[serde(skip_serializing_if = "Option::is_none")]
2345 pub kms_master_key_arn: Option<String>,
2346 /// <p><p>Server-side encryption type. The only supported value is:</p> <ul> <li> <p> <code>KMS</code> - Server-side encryption that uses AWS Key Management Service. The key is stored in your account and is managed by AWS KMS (AWS KMS charges apply).</p> </li> </ul></p>
2347 #[serde(rename = "SSEType")]
2348 #[serde(skip_serializing_if = "Option::is_none")]
2349 pub sse_type: Option<String>,
2350 /// <p><p>Represents the current state of server-side encryption. The only supported values are:</p> <ul> <li> <p> <code>ENABLED</code> - Server-side encryption is enabled.</p> </li> <li> <p> <code>UPDATING</code> - Server-side encryption is being updated.</p> </li> </ul></p>
2351 #[serde(rename = "Status")]
2352 #[serde(skip_serializing_if = "Option::is_none")]
2353 pub status: Option<String>,
2354}
2355
2356/// <p>Represents the settings used to enable server-side encryption.</p>
2357#[derive(Clone, Debug, Default, PartialEq, Serialize)]
2358#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
2359pub struct SSESpecification {
2360 /// <p>Indicates whether server-side encryption is done using an AWS managed CMK or an AWS owned CMK. If enabled (true), server-side encryption type is set to <code>KMS</code> and an AWS managed CMK is used (AWS KMS charges apply). If disabled (false) or not specified, server-side encryption is set to AWS owned CMK.</p>
2361 #[serde(rename = "Enabled")]
2362 #[serde(skip_serializing_if = "Option::is_none")]
2363 pub enabled: Option<bool>,
2364 /// <p>The AWS KMS customer master key (CMK) that should be used for the AWS KMS encryption. To specify a CMK, use its key ID, Amazon Resource Name (ARN), alias name, or alias ARN. Note that you should only provide this parameter if the key is different from the default DynamoDB customer master key alias/aws/dynamodb.</p>
2365 #[serde(rename = "KMSMasterKeyId")]
2366 #[serde(skip_serializing_if = "Option::is_none")]
2367 pub kms_master_key_id: Option<String>,
2368 /// <p><p>Server-side encryption type. The only supported value is:</p> <ul> <li> <p> <code>KMS</code> - Server-side encryption that uses AWS Key Management Service. The key is stored in your account and is managed by AWS KMS (AWS KMS charges apply).</p> </li> </ul></p>
2369 #[serde(rename = "SSEType")]
2370 #[serde(skip_serializing_if = "Option::is_none")]
2371 pub sse_type: Option<String>,
2372}
2373
2374/// <p>Represents the input of a <code>Scan</code> operation.</p>
2375#[derive(Clone, Debug, Default, PartialEq, Serialize)]
2376#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
2377pub struct ScanInput {
2378 /// <p>This is a legacy parameter. Use <code>ProjectionExpression</code> instead. For more information, see <a href="https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/LegacyConditionalParameters.AttributesToGet.html">AttributesToGet</a> in the <i>Amazon DynamoDB Developer Guide</i>.</p>
2379 #[serde(rename = "AttributesToGet")]
2380 #[serde(skip_serializing_if = "Option::is_none")]
2381 pub attributes_to_get: Option<Vec<String>>,
2382 /// <p>This is a legacy parameter. Use <code>FilterExpression</code> instead. For more information, see <a href="https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/LegacyConditionalParameters.ConditionalOperator.html">ConditionalOperator</a> in the <i>Amazon DynamoDB Developer Guide</i>.</p>
2383 #[serde(rename = "ConditionalOperator")]
2384 #[serde(skip_serializing_if = "Option::is_none")]
2385 pub conditional_operator: Option<String>,
2386 /// <p>A Boolean value that determines the read consistency model during the scan:</p> <ul> <li> <p>If <code>ConsistentRead</code> is <code>false</code>, then the data returned from <code>Scan</code> might not contain the results from other recently completed write operations (<code>PutItem</code>, <code>UpdateItem</code>, or <code>DeleteItem</code>).</p> </li> <li> <p>If <code>ConsistentRead</code> is <code>true</code>, then all of the write operations that completed before the <code>Scan</code> began are guaranteed to be contained in the <code>Scan</code> response.</p> </li> </ul> <p>The default setting for <code>ConsistentRead</code> is <code>false</code>.</p> <p>The <code>ConsistentRead</code> parameter is not supported on global secondary indexes. If you scan a global secondary index with <code>ConsistentRead</code> set to true, you will receive a <code>ValidationException</code>.</p>
2387 #[serde(rename = "ConsistentRead")]
2388 #[serde(skip_serializing_if = "Option::is_none")]
2389 pub consistent_read: Option<bool>,
2390 /// <p>The primary key of the first item that this operation will evaluate. Use the value that was returned for <code>LastEvaluatedKey</code> in the previous operation.</p> <p>The data type for <code>ExclusiveStartKey</code> must be String, Number or Binary. No set data types are allowed.</p> <p>In a parallel scan, a <code>Scan</code> request that includes <code>ExclusiveStartKey</code> must specify the same segment whose previous <code>Scan</code> returned the corresponding value of <code>LastEvaluatedKey</code>.</p>
2391 #[serde(rename = "ExclusiveStartKey")]
2392 #[serde(skip_serializing_if = "Option::is_none")]
2393 pub exclusive_start_key: Option<::std::collections::HashMap<String, AttributeValue>>,
2394 /// <p>One or more substitution tokens for attribute names in an expression. The following are some use cases for using <code>ExpressionAttributeNames</code>:</p> <ul> <li> <p>To access an attribute whose name conflicts with a DynamoDB reserved word.</p> </li> <li> <p>To create a placeholder for repeating occurrences of an attribute name in an expression.</p> </li> <li> <p>To prevent special characters in an attribute name from being misinterpreted in an expression.</p> </li> </ul> <p>Use the <b>#</b> character in an expression to dereference an attribute name. For example, consider the following attribute name:</p> <ul> <li> <p> <code>Percentile</code> </p> </li> </ul> <p>The name of this attribute conflicts with a reserved word, so it cannot be used directly in an expression. (For the complete list of reserved words, see <a href="https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/ReservedWords.html">Reserved Words</a> in the <i>Amazon DynamoDB Developer Guide</i>). To work around this, you could specify the following for <code>ExpressionAttributeNames</code>:</p> <ul> <li> <p> <code>{"#P":"Percentile"}</code> </p> </li> </ul> <p>You could then use this substitution in an expression, as in this example:</p> <ul> <li> <p> <code>#P = :val</code> </p> </li> </ul> <note> <p>Tokens that begin with the <b>:</b> character are <i>expression attribute values</i>, which are placeholders for the actual value at runtime.</p> </note> <p>For more information on expression attribute names, see <a href="https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Expressions.AccessingItemAttributes.html">Specifying Item Attributes</a> in the <i>Amazon DynamoDB Developer Guide</i>.</p>
2395 #[serde(rename = "ExpressionAttributeNames")]
2396 #[serde(skip_serializing_if = "Option::is_none")]
2397 pub expression_attribute_names: Option<::std::collections::HashMap<String, String>>,
2398 /// <p>One or more values that can be substituted in an expression.</p> <p>Use the <b>:</b> (colon) character in an expression to dereference an attribute value. For example, suppose that you wanted to check whether the value of the <code>ProductStatus</code> attribute was one of the following: </p> <p> <code>Available | Backordered | Discontinued</code> </p> <p>You would first need to specify <code>ExpressionAttributeValues</code> as follows:</p> <p> <code>{ ":avail":{"S":"Available"}, ":back":{"S":"Backordered"}, ":disc":{"S":"Discontinued"} }</code> </p> <p>You could then use these values in an expression, such as this:</p> <p> <code>ProductStatus IN (:avail, :back, :disc)</code> </p> <p>For more information on expression attribute values, see <a href="https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Expressions.SpecifyingConditions.html">Condition Expressions</a> in the <i>Amazon DynamoDB Developer Guide</i>.</p>
2399 #[serde(rename = "ExpressionAttributeValues")]
2400 #[serde(skip_serializing_if = "Option::is_none")]
2401 pub expression_attribute_values: Option<::std::collections::HashMap<String, AttributeValue>>,
2402 /// <p>A string that contains conditions that DynamoDB applies after the <code>Scan</code> operation, but before the data is returned to you. Items that do not satisfy the <code>FilterExpression</code> criteria are not returned.</p> <note> <p>A <code>FilterExpression</code> is applied after the items have already been read; the process of filtering does not consume any additional read capacity units.</p> </note> <p>For more information, see <a href="https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/QueryAndScan.html#FilteringResults">Filter Expressions</a> in the <i>Amazon DynamoDB Developer Guide</i>.</p>
2403 #[serde(rename = "FilterExpression")]
2404 #[serde(skip_serializing_if = "Option::is_none")]
2405 pub filter_expression: Option<String>,
2406 /// <p>The name of a secondary index to scan. This index can be any local secondary index or global secondary index. Note that if you use the <code>IndexName</code> parameter, you must also provide <code>TableName</code>.</p>
2407 #[serde(rename = "IndexName")]
2408 #[serde(skip_serializing_if = "Option::is_none")]
2409 pub index_name: Option<String>,
2410 /// <p>The maximum number of items to evaluate (not necessarily the number of matching items). If DynamoDB processes the number of items up to the limit while processing the results, it stops the operation and returns the matching values up to that point, and a key in <code>LastEvaluatedKey</code> to apply in a subsequent operation, so that you can pick up where you left off. Also, if the processed dataset size exceeds 1 MB before DynamoDB reaches this limit, it stops the operation and returns the matching values up to the limit, and a key in <code>LastEvaluatedKey</code> to apply in a subsequent operation to continue the operation. For more information, see <a href="https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/QueryAndScan.html">Working with Queries</a> in the <i>Amazon DynamoDB Developer Guide</i>.</p>
2411 #[serde(rename = "Limit")]
2412 #[serde(skip_serializing_if = "Option::is_none")]
2413 pub limit: Option<i64>,
2414 /// <p>A string that identifies one or more attributes to retrieve from the specified table or index. These attributes can include scalars, sets, or elements of a JSON document. The attributes in the expression must be separated by commas.</p> <p>If no attribute names are specified, then all attributes will be returned. If any of the requested attributes are not found, they will not appear in the result.</p> <p>For more information, see <a href="https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Expressions.AccessingItemAttributes.html">Specifying Item Attributes</a> in the <i>Amazon DynamoDB Developer Guide</i>.</p>
2415 #[serde(rename = "ProjectionExpression")]
2416 #[serde(skip_serializing_if = "Option::is_none")]
2417 pub projection_expression: Option<String>,
2418 #[serde(rename = "ReturnConsumedCapacity")]
2419 #[serde(skip_serializing_if = "Option::is_none")]
2420 pub return_consumed_capacity: Option<String>,
2421 /// <p>This is a legacy parameter. Use <code>FilterExpression</code> instead. For more information, see <a href="https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/LegacyConditionalParameters.ScanFilter.html">ScanFilter</a> in the <i>Amazon DynamoDB Developer Guide</i>.</p>
2422 #[serde(rename = "ScanFilter")]
2423 #[serde(skip_serializing_if = "Option::is_none")]
2424 pub scan_filter: Option<::std::collections::HashMap<String, Condition>>,
2425 /// <p>For a parallel <code>Scan</code> request, <code>Segment</code> identifies an individual segment to be scanned by an application worker.</p> <p>Segment IDs are zero-based, so the first segment is always 0. For example, if you want to use four application threads to scan a table or an index, then the first thread specifies a <code>Segment</code> value of 0, the second thread specifies 1, and so on.</p> <p>The value of <code>LastEvaluatedKey</code> returned from a parallel <code>Scan</code> request must be used as <code>ExclusiveStartKey</code> with the same segment ID in a subsequent <code>Scan</code> operation.</p> <p>The value for <code>Segment</code> must be greater than or equal to 0, and less than the value provided for <code>TotalSegments</code>.</p> <p>If you provide <code>Segment</code>, you must also provide <code>TotalSegments</code>.</p>
2426 #[serde(rename = "Segment")]
2427 #[serde(skip_serializing_if = "Option::is_none")]
2428 pub segment: Option<i64>,
2429 /// <p><p>The attributes to be returned in the result. You can retrieve all item attributes, specific item attributes, the count of matching items, or in the case of an index, some or all of the attributes projected into the index.</p> <ul> <li> <p> <code>ALL<em>ATTRIBUTES</code> - Returns all of the item attributes from the specified table or index. If you query a local secondary index, then for each matching item in the index, DynamoDB fetches the entire item from the parent table. If the index is configured to project all item attributes, then all of the data can be obtained from the local secondary index, and no fetching is required.</p> </li> <li> <p> <code>ALL</em>PROJECTED<em>ATTRIBUTES</code> - Allowed only when querying an index. Retrieves all attributes that have been projected into the index. If the index is configured to project all attributes, this return value is equivalent to specifying <code>ALL</em>ATTRIBUTES</code>.</p> </li> <li> <p> <code>COUNT</code> - Returns the number of matching items, rather than the matching items themselves.</p> </li> <li> <p> <code>SPECIFIC<em>ATTRIBUTES</code> - Returns only the attributes listed in <code>AttributesToGet</code>. This return value is equivalent to specifying <code>AttributesToGet</code> without specifying any value for <code>Select</code>.</p> <p>If you query or scan a local secondary index and request only attributes that are projected into that index, the operation reads only the index and not the table. If any of the requested attributes are not projected into the local secondary index, DynamoDB fetches each of these attributes from the parent table. This extra fetching incurs additional throughput cost and latency.</p> <p>If you query or scan a global secondary index, you can only request attributes that are projected into the index. Global secondary index queries cannot fetch attributes from the parent table.</p> </li> </ul> <p>If neither <code>Select</code> nor <code>AttributesToGet</code> are specified, DynamoDB defaults to <code>ALL</em>ATTRIBUTES</code> when accessing a table, and <code>ALL<em>PROJECTED</em>ATTRIBUTES</code> when accessing an index. You cannot use both <code>Select</code> and <code>AttributesToGet</code> together in a single request, unless the value for <code>Select</code> is <code>SPECIFIC<em>ATTRIBUTES</code>. (This usage is equivalent to specifying <code>AttributesToGet</code> without any value for <code>Select</code>.)</p> <note> <p>If you use the <code>ProjectionExpression</code> parameter, then the value for <code>Select</code> can only be <code>SPECIFIC</em>ATTRIBUTES</code>. Any other value for <code>Select</code> will return an error.</p> </note></p>
2430 #[serde(rename = "Select")]
2431 #[serde(skip_serializing_if = "Option::is_none")]
2432 pub select: Option<String>,
2433 /// <p>The name of the table containing the requested items; or, if you provide <code>IndexName</code>, the name of the table to which that index belongs.</p>
2434 #[serde(rename = "TableName")]
2435 pub table_name: String,
2436 /// <p>For a parallel <code>Scan</code> request, <code>TotalSegments</code> represents the total number of segments into which the <code>Scan</code> operation will be divided. The value of <code>TotalSegments</code> corresponds to the number of application workers that will perform the parallel scan. For example, if you want to use four application threads to scan a table or an index, specify a <code>TotalSegments</code> value of 4.</p> <p>The value for <code>TotalSegments</code> must be greater than or equal to 1, and less than or equal to 1000000. If you specify a <code>TotalSegments</code> value of 1, the <code>Scan</code> operation will be sequential rather than parallel.</p> <p>If you specify <code>TotalSegments</code>, you must also specify <code>Segment</code>.</p>
2437 #[serde(rename = "TotalSegments")]
2438 #[serde(skip_serializing_if = "Option::is_none")]
2439 pub total_segments: Option<i64>,
2440}
2441
2442/// <p>Represents the output of a <code>Scan</code> operation.</p>
2443#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
2444#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
2445pub struct ScanOutput {
2446 /// <p>The capacity units consumed by the <code>Scan</code> operation. The data returned includes the total provisioned throughput consumed, along with statistics for the table and any indexes involved in the operation. <code>ConsumedCapacity</code> is only returned if the <code>ReturnConsumedCapacity</code> parameter was specified. For more information, see <a href="https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/ProvisionedThroughputIntro.html">Provisioned Throughput</a> in the <i>Amazon DynamoDB Developer Guide</i>.</p>
2447 #[serde(rename = "ConsumedCapacity")]
2448 #[serde(skip_serializing_if = "Option::is_none")]
2449 pub consumed_capacity: Option<ConsumedCapacity>,
2450 /// <p>The number of items in the response.</p> <p>If you set <code>ScanFilter</code> in the request, then <code>Count</code> is the number of items returned after the filter was applied, and <code>ScannedCount</code> is the number of matching items before the filter was applied.</p> <p>If you did not use a filter in the request, then <code>Count</code> is the same as <code>ScannedCount</code>.</p>
2451 #[serde(rename = "Count")]
2452 #[serde(skip_serializing_if = "Option::is_none")]
2453 pub count: Option<i64>,
2454 /// <p>An array of item attributes that match the scan criteria. Each element in this array consists of an attribute name and the value for that attribute.</p>
2455 #[serde(rename = "Items")]
2456 #[serde(skip_serializing_if = "Option::is_none")]
2457 pub items: Option<Vec<::std::collections::HashMap<String, AttributeValue>>>,
2458 /// <p>The primary key of the item where the operation stopped, inclusive of the previous result set. Use this value to start a new operation, excluding this value in the new request.</p> <p>If <code>LastEvaluatedKey</code> is empty, then the "last page" of results has been processed and there is no more data to be retrieved.</p> <p>If <code>LastEvaluatedKey</code> is not empty, it does not necessarily mean that there is more data in the result set. The only way to know when you have reached the end of the result set is when <code>LastEvaluatedKey</code> is empty.</p>
2459 #[serde(rename = "LastEvaluatedKey")]
2460 #[serde(skip_serializing_if = "Option::is_none")]
2461 pub last_evaluated_key: Option<::std::collections::HashMap<String, AttributeValue>>,
2462 /// <p>The number of items evaluated, before any <code>ScanFilter</code> is applied. A high <code>ScannedCount</code> value with few, or no, <code>Count</code> results indicates an inefficient <code>Scan</code> operation. For more information, see <a href="https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/QueryAndScan.html#Count">Count and ScannedCount</a> in the <i>Amazon DynamoDB Developer Guide</i>.</p> <p>If you did not use a filter in the request, then <code>ScannedCount</code> is the same as <code>Count</code>.</p>
2463 #[serde(rename = "ScannedCount")]
2464 #[serde(skip_serializing_if = "Option::is_none")]
2465 pub scanned_count: Option<i64>,
2466}
2467
2468/// <p>Contains the details of the table when the backup was created. </p>
2469#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
2470#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
2471pub struct SourceTableDetails {
2472 /// <p><p>Controls how you are charged for read and write throughput and how you manage capacity. This setting can be changed later.</p> <ul> <li> <p> <code>PROVISIONED</code> - Sets the read/write capacity mode to <code>PROVISIONED</code>. We recommend using <code>PROVISIONED</code> for predictable workloads.</p> </li> <li> <p> <code>PAY<em>PER</em>REQUEST</code> - Sets the read/write capacity mode to <code>PAY<em>PER</em>REQUEST</code>. We recommend using <code>PAY<em>PER</em>REQUEST</code> for unpredictable workloads. </p> </li> </ul></p>
2473 #[serde(rename = "BillingMode")]
2474 #[serde(skip_serializing_if = "Option::is_none")]
2475 pub billing_mode: Option<String>,
2476 /// <p>Number of items in the table. Note that this is an approximate value. </p>
2477 #[serde(rename = "ItemCount")]
2478 #[serde(skip_serializing_if = "Option::is_none")]
2479 pub item_count: Option<i64>,
2480 /// <p>Schema of the table. </p>
2481 #[serde(rename = "KeySchema")]
2482 pub key_schema: Vec<KeySchemaElement>,
2483 /// <p>Read IOPs and Write IOPS on the table when the backup was created.</p>
2484 #[serde(rename = "ProvisionedThroughput")]
2485 pub provisioned_throughput: ProvisionedThroughput,
2486 /// <p>ARN of the table for which backup was created. </p>
2487 #[serde(rename = "TableArn")]
2488 #[serde(skip_serializing_if = "Option::is_none")]
2489 pub table_arn: Option<String>,
2490 /// <p>Time when the source table was created. </p>
2491 #[serde(rename = "TableCreationDateTime")]
2492 pub table_creation_date_time: f64,
2493 /// <p>Unique identifier for the table for which the backup was created. </p>
2494 #[serde(rename = "TableId")]
2495 pub table_id: String,
2496 /// <p>The name of the table for which the backup was created. </p>
2497 #[serde(rename = "TableName")]
2498 pub table_name: String,
2499 /// <p>Size of the table in bytes. Note that this is an approximate value.</p>
2500 #[serde(rename = "TableSizeBytes")]
2501 #[serde(skip_serializing_if = "Option::is_none")]
2502 pub table_size_bytes: Option<i64>,
2503}
2504
2505/// <p>Contains the details of the features enabled on the table when the backup was created. For example, LSIs, GSIs, streams, TTL. </p>
2506#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
2507#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
2508pub struct SourceTableFeatureDetails {
2509 /// <p>Represents the GSI properties for the table when the backup was created. It includes the IndexName, KeySchema, Projection, and ProvisionedThroughput for the GSIs on the table at the time of backup. </p>
2510 #[serde(rename = "GlobalSecondaryIndexes")]
2511 #[serde(skip_serializing_if = "Option::is_none")]
2512 pub global_secondary_indexes: Option<Vec<GlobalSecondaryIndexInfo>>,
2513 /// <p>Represents the LSI properties for the table when the backup was created. It includes the IndexName, KeySchema and Projection for the LSIs on the table at the time of backup. </p>
2514 #[serde(rename = "LocalSecondaryIndexes")]
2515 #[serde(skip_serializing_if = "Option::is_none")]
2516 pub local_secondary_indexes: Option<Vec<LocalSecondaryIndexInfo>>,
2517 /// <p>The description of the server-side encryption status on the table when the backup was created.</p>
2518 #[serde(rename = "SSEDescription")]
2519 #[serde(skip_serializing_if = "Option::is_none")]
2520 pub sse_description: Option<SSEDescription>,
2521 /// <p>Stream settings on the table when the backup was created.</p>
2522 #[serde(rename = "StreamDescription")]
2523 #[serde(skip_serializing_if = "Option::is_none")]
2524 pub stream_description: Option<StreamSpecification>,
2525 /// <p>Time to Live settings on the table when the backup was created.</p>
2526 #[serde(rename = "TimeToLiveDescription")]
2527 #[serde(skip_serializing_if = "Option::is_none")]
2528 pub time_to_live_description: Option<TimeToLiveDescription>,
2529}
2530
2531/// <p>Represents the DynamoDB Streams configuration for a table in DynamoDB.</p>
2532#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
2533pub struct StreamSpecification {
2534 /// <p>Indicates whether DynamoDB Streams is enabled (true) or disabled (false) on the table.</p>
2535 #[serde(rename = "StreamEnabled")]
2536 pub stream_enabled: bool,
2537 /// <p><p> When an item in the table is modified, <code>StreamViewType</code> determines what information is written to the stream for this table. Valid values for <code>StreamViewType</code> are:</p> <ul> <li> <p> <code>KEYS<em>ONLY</code> - Only the key attributes of the modified item are written to the stream.</p> </li> <li> <p> <code>NEW</em>IMAGE</code> - The entire item, as it appears after it was modified, is written to the stream.</p> </li> <li> <p> <code>OLD<em>IMAGE</code> - The entire item, as it appeared before it was modified, is written to the stream.</p> </li> <li> <p> <code>NEW</em>AND<em>OLD</em>IMAGES</code> - Both the new and the old item images of the item are written to the stream.</p> </li> </ul></p>
2538 #[serde(rename = "StreamViewType")]
2539 #[serde(skip_serializing_if = "Option::is_none")]
2540 pub stream_view_type: Option<String>,
2541}
2542
2543/// <p>Represents the auto scaling configuration for a global table.</p>
2544#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
2545#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
2546pub struct TableAutoScalingDescription {
2547 /// <p>Represents replicas of the global table.</p>
2548 #[serde(rename = "Replicas")]
2549 #[serde(skip_serializing_if = "Option::is_none")]
2550 pub replicas: Option<Vec<ReplicaAutoScalingDescription>>,
2551 /// <p>The name of the table.</p>
2552 #[serde(rename = "TableName")]
2553 #[serde(skip_serializing_if = "Option::is_none")]
2554 pub table_name: Option<String>,
2555 /// <p><p>The current state of the table:</p> <ul> <li> <p> <code>CREATING</code> - The table is being created.</p> </li> <li> <p> <code>UPDATING</code> - The table is being updated.</p> </li> <li> <p> <code>DELETING</code> - The table is being deleted.</p> </li> <li> <p> <code>ACTIVE</code> - The table is ready for use.</p> </li> </ul></p>
2556 #[serde(rename = "TableStatus")]
2557 #[serde(skip_serializing_if = "Option::is_none")]
2558 pub table_status: Option<String>,
2559}
2560
2561/// <p>Represents the properties of a table.</p>
2562#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
2563#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
2564pub struct TableDescription {
2565 /// <p>Contains information about the table archive.</p>
2566 #[serde(rename = "ArchivalSummary")]
2567 #[serde(skip_serializing_if = "Option::is_none")]
2568 pub archival_summary: Option<ArchivalSummary>,
2569 /// <p><p>An array of <code>AttributeDefinition</code> objects. Each of these objects describes one attribute in the table and index key schema.</p> <p>Each <code>AttributeDefinition</code> object in this array is composed of:</p> <ul> <li> <p> <code>AttributeName</code> - The name of the attribute.</p> </li> <li> <p> <code>AttributeType</code> - The data type for the attribute.</p> </li> </ul></p>
2570 #[serde(rename = "AttributeDefinitions")]
2571 #[serde(skip_serializing_if = "Option::is_none")]
2572 pub attribute_definitions: Option<Vec<AttributeDefinition>>,
2573 /// <p>Contains the details for the read/write capacity mode.</p>
2574 #[serde(rename = "BillingModeSummary")]
2575 #[serde(skip_serializing_if = "Option::is_none")]
2576 pub billing_mode_summary: Option<BillingModeSummary>,
2577 /// <p>The date and time when the table was created, in <a href="http://www.epochconverter.com/">UNIX epoch time</a> format.</p>
2578 #[serde(rename = "CreationDateTime")]
2579 #[serde(skip_serializing_if = "Option::is_none")]
2580 pub creation_date_time: Option<f64>,
2581 /// <p>The global secondary indexes, if any, on the table. Each index is scoped to a given partition key value. Each element is composed of:</p> <ul> <li> <p> <code>Backfilling</code> - If true, then the index is currently in the backfilling phase. Backfilling occurs only when a new global secondary index is added to the table. It is the process by which DynamoDB populates the new index with data from the table. (This attribute does not appear for indexes that were created during a <code>CreateTable</code> operation.) </p> <p> You can delete an index that is being created during the <code>Backfilling</code> phase when <code>IndexStatus</code> is set to CREATING and <code>Backfilling</code> is true. You can't delete the index that is being created when <code>IndexStatus</code> is set to CREATING and <code>Backfilling</code> is false. (This attribute does not appear for indexes that were created during a <code>CreateTable</code> operation.)</p> </li> <li> <p> <code>IndexName</code> - The name of the global secondary index.</p> </li> <li> <p> <code>IndexSizeBytes</code> - The total size of the global secondary index, in bytes. DynamoDB updates this value approximately every six hours. Recent changes might not be reflected in this value. </p> </li> <li> <p> <code>IndexStatus</code> - The current status of the global secondary index:</p> <ul> <li> <p> <code>CREATING</code> - The index is being created.</p> </li> <li> <p> <code>UPDATING</code> - The index is being updated.</p> </li> <li> <p> <code>DELETING</code> - The index is being deleted.</p> </li> <li> <p> <code>ACTIVE</code> - The index is ready for use.</p> </li> </ul> </li> <li> <p> <code>ItemCount</code> - The number of items in the global secondary index. DynamoDB updates this value approximately every six hours. Recent changes might not be reflected in this value. </p> </li> <li> <p> <code>KeySchema</code> - Specifies the complete index key schema. The attribute names in the key schema must be between 1 and 255 characters (inclusive). The key schema must begin with the same partition key as the table.</p> </li> <li> <p> <code>Projection</code> - Specifies attributes that are copied (projected) from the table into the index. These are in addition to the primary key attributes and index key attributes, which are automatically projected. Each attribute specification is composed of:</p> <ul> <li> <p> <code>ProjectionType</code> - One of the following:</p> <ul> <li> <p> <code>KEYS_ONLY</code> - Only the index and primary keys are projected into the index.</p> </li> <li> <p> <code>INCLUDE</code> - Only the specified table attributes are projected into the index. The list of projected attributes is in <code>NonKeyAttributes</code>.</p> </li> <li> <p> <code>ALL</code> - All of the table attributes are projected into the index.</p> </li> </ul> </li> <li> <p> <code>NonKeyAttributes</code> - A list of one or more non-key attribute names that are projected into the secondary index. The total count of attributes provided in <code>NonKeyAttributes</code>, summed across all of the secondary indexes, must not exceed 20. If you project the same attribute into two different indexes, this counts as two distinct attributes when determining the total.</p> </li> </ul> </li> <li> <p> <code>ProvisionedThroughput</code> - The provisioned throughput settings for the global secondary index, consisting of read and write capacity units, along with data about increases and decreases. </p> </li> </ul> <p>If the table is in the <code>DELETING</code> state, no information about indexes will be returned.</p>
2582 #[serde(rename = "GlobalSecondaryIndexes")]
2583 #[serde(skip_serializing_if = "Option::is_none")]
2584 pub global_secondary_indexes: Option<Vec<GlobalSecondaryIndexDescription>>,
2585 /// <p>Represents the version of <a href="https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/GlobalTables.html">global tables</a> in use, if the table is replicated across AWS Regions.</p>
2586 #[serde(rename = "GlobalTableVersion")]
2587 #[serde(skip_serializing_if = "Option::is_none")]
2588 pub global_table_version: Option<String>,
2589 /// <p>The number of items in the specified table. DynamoDB updates this value approximately every six hours. Recent changes might not be reflected in this value.</p>
2590 #[serde(rename = "ItemCount")]
2591 #[serde(skip_serializing_if = "Option::is_none")]
2592 pub item_count: Option<i64>,
2593 /// <p>The primary key structure for the table. Each <code>KeySchemaElement</code> consists of:</p> <ul> <li> <p> <code>AttributeName</code> - The name of the attribute.</p> </li> <li> <p> <code>KeyType</code> - The role of the attribute:</p> <ul> <li> <p> <code>HASH</code> - partition key</p> </li> <li> <p> <code>RANGE</code> - sort key</p> </li> </ul> <note> <p>The partition key of an item is also known as its <i>hash attribute</i>. The term "hash attribute" derives from DynamoDB's usage of an internal hash function to evenly distribute data items across partitions, based on their partition key values.</p> <p>The sort key of an item is also known as its <i>range attribute</i>. The term "range attribute" derives from the way DynamoDB stores items with the same partition key physically close together, in sorted order by the sort key value.</p> </note> </li> </ul> <p>For more information about primary keys, see <a href="https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/DataModel.html#DataModelPrimaryKey">Primary Key</a> in the <i>Amazon DynamoDB Developer Guide</i>.</p>
2594 #[serde(rename = "KeySchema")]
2595 #[serde(skip_serializing_if = "Option::is_none")]
2596 pub key_schema: Option<Vec<KeySchemaElement>>,
2597 /// <p>The Amazon Resource Name (ARN) that uniquely identifies the latest stream for this table.</p>
2598 #[serde(rename = "LatestStreamArn")]
2599 #[serde(skip_serializing_if = "Option::is_none")]
2600 pub latest_stream_arn: Option<String>,
2601 /// <p><p>A timestamp, in ISO 8601 format, for this stream.</p> <p>Note that <code>LatestStreamLabel</code> is not a unique identifier for the stream, because it is possible that a stream from another table might have the same timestamp. However, the combination of the following three elements is guaranteed to be unique:</p> <ul> <li> <p>AWS customer ID</p> </li> <li> <p>Table name</p> </li> <li> <p> <code>StreamLabel</code> </p> </li> </ul></p>
2602 #[serde(rename = "LatestStreamLabel")]
2603 #[serde(skip_serializing_if = "Option::is_none")]
2604 pub latest_stream_label: Option<String>,
2605 /// <p>Represents one or more local secondary indexes on the table. Each index is scoped to a given partition key value. Tables with one or more local secondary indexes are subject to an item collection size limit, where the amount of data within a given item collection cannot exceed 10 GB. Each element is composed of:</p> <ul> <li> <p> <code>IndexName</code> - The name of the local secondary index.</p> </li> <li> <p> <code>KeySchema</code> - Specifies the complete index key schema. The attribute names in the key schema must be between 1 and 255 characters (inclusive). The key schema must begin with the same partition key as the table.</p> </li> <li> <p> <code>Projection</code> - Specifies attributes that are copied (projected) from the table into the index. These are in addition to the primary key attributes and index key attributes, which are automatically projected. Each attribute specification is composed of:</p> <ul> <li> <p> <code>ProjectionType</code> - One of the following:</p> <ul> <li> <p> <code>KEYS_ONLY</code> - Only the index and primary keys are projected into the index.</p> </li> <li> <p> <code>INCLUDE</code> - Only the specified table attributes are projected into the index. The list of projected attributes is in <code>NonKeyAttributes</code>.</p> </li> <li> <p> <code>ALL</code> - All of the table attributes are projected into the index.</p> </li> </ul> </li> <li> <p> <code>NonKeyAttributes</code> - A list of one or more non-key attribute names that are projected into the secondary index. The total count of attributes provided in <code>NonKeyAttributes</code>, summed across all of the secondary indexes, must not exceed 20. If you project the same attribute into two different indexes, this counts as two distinct attributes when determining the total.</p> </li> </ul> </li> <li> <p> <code>IndexSizeBytes</code> - Represents the total size of the index, in bytes. DynamoDB updates this value approximately every six hours. Recent changes might not be reflected in this value.</p> </li> <li> <p> <code>ItemCount</code> - Represents the number of items in the index. DynamoDB updates this value approximately every six hours. Recent changes might not be reflected in this value.</p> </li> </ul> <p>If the table is in the <code>DELETING</code> state, no information about indexes will be returned.</p>
2606 #[serde(rename = "LocalSecondaryIndexes")]
2607 #[serde(skip_serializing_if = "Option::is_none")]
2608 pub local_secondary_indexes: Option<Vec<LocalSecondaryIndexDescription>>,
2609 /// <p>The provisioned throughput settings for the table, consisting of read and write capacity units, along with data about increases and decreases.</p>
2610 #[serde(rename = "ProvisionedThroughput")]
2611 #[serde(skip_serializing_if = "Option::is_none")]
2612 pub provisioned_throughput: Option<ProvisionedThroughputDescription>,
2613 /// <p>Represents replicas of the table.</p>
2614 #[serde(rename = "Replicas")]
2615 #[serde(skip_serializing_if = "Option::is_none")]
2616 pub replicas: Option<Vec<ReplicaDescription>>,
2617 /// <p>Contains details for the restore.</p>
2618 #[serde(rename = "RestoreSummary")]
2619 #[serde(skip_serializing_if = "Option::is_none")]
2620 pub restore_summary: Option<RestoreSummary>,
2621 /// <p>The description of the server-side encryption status on the specified table.</p>
2622 #[serde(rename = "SSEDescription")]
2623 #[serde(skip_serializing_if = "Option::is_none")]
2624 pub sse_description: Option<SSEDescription>,
2625 /// <p>The current DynamoDB Streams configuration for the table.</p>
2626 #[serde(rename = "StreamSpecification")]
2627 #[serde(skip_serializing_if = "Option::is_none")]
2628 pub stream_specification: Option<StreamSpecification>,
2629 /// <p>The Amazon Resource Name (ARN) that uniquely identifies the table.</p>
2630 #[serde(rename = "TableArn")]
2631 #[serde(skip_serializing_if = "Option::is_none")]
2632 pub table_arn: Option<String>,
2633 /// <p>Unique identifier for the table for which the backup was created. </p>
2634 #[serde(rename = "TableId")]
2635 #[serde(skip_serializing_if = "Option::is_none")]
2636 pub table_id: Option<String>,
2637 /// <p>The name of the table.</p>
2638 #[serde(rename = "TableName")]
2639 #[serde(skip_serializing_if = "Option::is_none")]
2640 pub table_name: Option<String>,
2641 /// <p>The total size of the specified table, in bytes. DynamoDB updates this value approximately every six hours. Recent changes might not be reflected in this value.</p>
2642 #[serde(rename = "TableSizeBytes")]
2643 #[serde(skip_serializing_if = "Option::is_none")]
2644 pub table_size_bytes: Option<i64>,
2645 /// <p><p>The current state of the table:</p> <ul> <li> <p> <code>CREATING</code> - The table is being created.</p> </li> <li> <p> <code>UPDATING</code> - The table is being updated.</p> </li> <li> <p> <code>DELETING</code> - The table is being deleted.</p> </li> <li> <p> <code>ACTIVE</code> - The table is ready for use.</p> </li> <li> <p> <code>INACCESSIBLE<em>ENCRYPTION</em>CREDENTIALS</code> - The AWS KMS key used to encrypt the table in inaccessible. Table operations may fail due to failure to use the AWS KMS key. DynamoDB will initiate the table archival process when a table's AWS KMS key remains inaccessible for more than seven days. </p> </li> <li> <p> <code>ARCHIVING</code> - The table is being archived. Operations are not allowed until archival is complete. </p> </li> <li> <p> <code>ARCHIVED</code> - The table has been archived. See the ArchivalReason for more information. </p> </li> </ul></p>
2646 #[serde(rename = "TableStatus")]
2647 #[serde(skip_serializing_if = "Option::is_none")]
2648 pub table_status: Option<String>,
2649}
2650
2651/// <p>Describes a tag. A tag is a key-value pair. You can add up to 50 tags to a single DynamoDB table. </p> <p> AWS-assigned tag names and values are automatically assigned the <code>aws:</code> prefix, which the user cannot assign. AWS-assigned tag names do not count towards the tag limit of 50. User-assigned tag names have the prefix <code>user:</code> in the Cost Allocation Report. You cannot backdate the application of a tag. </p> <p>For an overview on tagging DynamoDB resources, see <a href="https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Tagging.html">Tagging for DynamoDB</a> in the <i>Amazon DynamoDB Developer Guide</i>.</p>
2652#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
2653pub struct Tag {
2654 /// <p>The key of the tag. Tag keys are case sensitive. Each DynamoDB table can only have up to one tag with the same key. If you try to add an existing tag (same key), the existing tag value will be updated to the new value. </p>
2655 #[serde(rename = "Key")]
2656 pub key: String,
2657 /// <p>The value of the tag. Tag values are case-sensitive and can be null.</p>
2658 #[serde(rename = "Value")]
2659 pub value: String,
2660}
2661
2662#[derive(Clone, Debug, Default, PartialEq, Serialize)]
2663#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
2664pub struct TagResourceInput {
2665 /// <p>Identifies the Amazon DynamoDB resource to which tags should be added. This value is an Amazon Resource Name (ARN).</p>
2666 #[serde(rename = "ResourceArn")]
2667 pub resource_arn: String,
2668 /// <p>The tags to be assigned to the Amazon DynamoDB resource.</p>
2669 #[serde(rename = "Tags")]
2670 pub tags: Vec<Tag>,
2671}
2672
2673/// <p>The description of the Time to Live (TTL) status on the specified table. </p>
2674#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
2675#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
2676pub struct TimeToLiveDescription {
2677 /// <p> The name of the TTL attribute for items in the table.</p>
2678 #[serde(rename = "AttributeName")]
2679 #[serde(skip_serializing_if = "Option::is_none")]
2680 pub attribute_name: Option<String>,
2681 /// <p> The TTL status for the table.</p>
2682 #[serde(rename = "TimeToLiveStatus")]
2683 #[serde(skip_serializing_if = "Option::is_none")]
2684 pub time_to_live_status: Option<String>,
2685}
2686
2687/// <p>Represents the settings used to enable or disable Time to Live (TTL) for the specified table.</p>
2688#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
2689pub struct TimeToLiveSpecification {
2690 /// <p>The name of the TTL attribute used to store the expiration time for items in the table.</p>
2691 #[serde(rename = "AttributeName")]
2692 pub attribute_name: String,
2693 /// <p>Indicates whether TTL is to be enabled (true) or disabled (false) on the table.</p>
2694 #[serde(rename = "Enabled")]
2695 pub enabled: bool,
2696}
2697
2698/// <p>Specifies an item to be retrieved as part of the transaction.</p>
2699#[derive(Clone, Debug, Default, PartialEq, Serialize)]
2700#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
2701pub struct TransactGetItem {
2702 /// <p>Contains the primary key that identifies the item to get, together with the name of the table that contains the item, and optionally the specific attributes of the item to retrieve.</p>
2703 #[serde(rename = "Get")]
2704 pub get: Get,
2705}
2706
2707#[derive(Clone, Debug, Default, PartialEq, Serialize)]
2708#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
2709pub struct TransactGetItemsInput {
2710 /// <p>A value of <code>TOTAL</code> causes consumed capacity information to be returned, and a value of <code>NONE</code> prevents that information from being returned. No other value is valid.</p>
2711 #[serde(rename = "ReturnConsumedCapacity")]
2712 #[serde(skip_serializing_if = "Option::is_none")]
2713 pub return_consumed_capacity: Option<String>,
2714 /// <p>An ordered array of up to 25 <code>TransactGetItem</code> objects, each of which contains a <code>Get</code> structure.</p>
2715 #[serde(rename = "TransactItems")]
2716 pub transact_items: Vec<TransactGetItem>,
2717}
2718
2719#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
2720#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
2721pub struct TransactGetItemsOutput {
2722 /// <p>If the <i>ReturnConsumedCapacity</i> value was <code>TOTAL</code>, this is an array of <code>ConsumedCapacity</code> objects, one for each table addressed by <code>TransactGetItem</code> objects in the <i>TransactItems</i> parameter. These <code>ConsumedCapacity</code> objects report the read-capacity units consumed by the <code>TransactGetItems</code> call in that table.</p>
2723 #[serde(rename = "ConsumedCapacity")]
2724 #[serde(skip_serializing_if = "Option::is_none")]
2725 pub consumed_capacity: Option<Vec<ConsumedCapacity>>,
2726 /// <p>An ordered array of up to 25 <code>ItemResponse</code> objects, each of which corresponds to the <code>TransactGetItem</code> object in the same position in the <i>TransactItems</i> array. Each <code>ItemResponse</code> object contains a Map of the name-value pairs that are the projected attributes of the requested item.</p> <p>If a requested item could not be retrieved, the corresponding <code>ItemResponse</code> object is Null, or if the requested item has no projected attributes, the corresponding <code>ItemResponse</code> object is an empty Map. </p>
2727 #[serde(rename = "Responses")]
2728 #[serde(skip_serializing_if = "Option::is_none")]
2729 pub responses: Option<Vec<ItemResponse>>,
2730}
2731
2732/// <p>A list of requests that can perform update, put, delete, or check operations on multiple items in one or more tables atomically.</p>
2733#[derive(Clone, Debug, Default, PartialEq, Serialize)]
2734#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
2735pub struct TransactWriteItem {
2736 /// <p>A request to perform a check item operation.</p>
2737 #[serde(rename = "ConditionCheck")]
2738 #[serde(skip_serializing_if = "Option::is_none")]
2739 pub condition_check: Option<ConditionCheck>,
2740 /// <p>A request to perform a <code>DeleteItem</code> operation.</p>
2741 #[serde(rename = "Delete")]
2742 #[serde(skip_serializing_if = "Option::is_none")]
2743 pub delete: Option<Delete>,
2744 /// <p>A request to perform a <code>PutItem</code> operation.</p>
2745 #[serde(rename = "Put")]
2746 #[serde(skip_serializing_if = "Option::is_none")]
2747 pub put: Option<Put>,
2748 /// <p>A request to perform an <code>UpdateItem</code> operation.</p>
2749 #[serde(rename = "Update")]
2750 #[serde(skip_serializing_if = "Option::is_none")]
2751 pub update: Option<Update>,
2752}
2753
2754#[derive(Clone, Debug, Default, PartialEq, Serialize)]
2755#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
2756pub struct TransactWriteItemsInput {
2757 /// <p>Providing a <code>ClientRequestToken</code> makes the call to <code>TransactWriteItems</code> idempotent, meaning that multiple identical calls have the same effect as one single call.</p> <p>Although multiple identical calls using the same client request token produce the same result on the server (no side effects), the responses to the calls might not be the same. If the <code>ReturnConsumedCapacity></code> parameter is set, then the initial <code>TransactWriteItems</code> call returns the amount of write capacity units consumed in making the changes. Subsequent <code>TransactWriteItems</code> calls with the same client token return the number of read capacity units consumed in reading the item.</p> <p>A client request token is valid for 10 minutes after the first request that uses it is completed. After 10 minutes, any request with the same client token is treated as a new request. Do not resubmit the same request with the same client token for more than 10 minutes, or the result might not be idempotent.</p> <p>If you submit a request with the same client token but a change in other parameters within the 10-minute idempotency window, DynamoDB returns an <code>IdempotentParameterMismatch</code> exception.</p>
2758 #[serde(rename = "ClientRequestToken")]
2759 #[serde(skip_serializing_if = "Option::is_none")]
2760 pub client_request_token: Option<String>,
2761 #[serde(rename = "ReturnConsumedCapacity")]
2762 #[serde(skip_serializing_if = "Option::is_none")]
2763 pub return_consumed_capacity: Option<String>,
2764 /// <p>Determines whether item collection metrics are returned. If set to <code>SIZE</code>, the response includes statistics about item collections (if any), that were modified during the operation and are returned in the response. If set to <code>NONE</code> (the default), no statistics are returned. </p>
2765 #[serde(rename = "ReturnItemCollectionMetrics")]
2766 #[serde(skip_serializing_if = "Option::is_none")]
2767 pub return_item_collection_metrics: Option<String>,
2768 /// <p>An ordered array of up to 25 <code>TransactWriteItem</code> objects, each of which contains a <code>ConditionCheck</code>, <code>Put</code>, <code>Update</code>, or <code>Delete</code> object. These can operate on items in different tables, but the tables must reside in the same AWS account and Region, and no two of them can operate on the same item. </p>
2769 #[serde(rename = "TransactItems")]
2770 pub transact_items: Vec<TransactWriteItem>,
2771}
2772
2773#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
2774#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
2775pub struct TransactWriteItemsOutput {
2776 /// <p>The capacity units consumed by the entire <code>TransactWriteItems</code> operation. The values of the list are ordered according to the ordering of the <code>TransactItems</code> request parameter. </p>
2777 #[serde(rename = "ConsumedCapacity")]
2778 #[serde(skip_serializing_if = "Option::is_none")]
2779 pub consumed_capacity: Option<Vec<ConsumedCapacity>>,
2780 /// <p>A list of tables that were processed by <code>TransactWriteItems</code> and, for each table, information about any item collections that were affected by individual <code>UpdateItem</code>, <code>PutItem</code>, or <code>DeleteItem</code> operations. </p>
2781 #[serde(rename = "ItemCollectionMetrics")]
2782 #[serde(skip_serializing_if = "Option::is_none")]
2783 pub item_collection_metrics:
2784 Option<::std::collections::HashMap<String, Vec<ItemCollectionMetrics>>>,
2785}
2786
2787#[derive(Clone, Debug, Default, PartialEq, Serialize)]
2788#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
2789pub struct UntagResourceInput {
2790 /// <p>The DynamoDB resource that the tags will be removed from. This value is an Amazon Resource Name (ARN).</p>
2791 #[serde(rename = "ResourceArn")]
2792 pub resource_arn: String,
2793 /// <p>A list of tag keys. Existing tags of the resource whose keys are members of this list will be removed from the DynamoDB resource.</p>
2794 #[serde(rename = "TagKeys")]
2795 pub tag_keys: Vec<String>,
2796}
2797
2798/// <p>Represents a request to perform an <code>UpdateItem</code> operation.</p>
2799#[derive(Clone, Debug, Default, PartialEq, Serialize)]
2800#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
2801pub struct Update {
2802 /// <p>A condition that must be satisfied in order for a conditional update to succeed.</p>
2803 #[serde(rename = "ConditionExpression")]
2804 #[serde(skip_serializing_if = "Option::is_none")]
2805 pub condition_expression: Option<String>,
2806 /// <p>One or more substitution tokens for attribute names in an expression.</p>
2807 #[serde(rename = "ExpressionAttributeNames")]
2808 #[serde(skip_serializing_if = "Option::is_none")]
2809 pub expression_attribute_names: Option<::std::collections::HashMap<String, String>>,
2810 /// <p>One or more values that can be substituted in an expression.</p>
2811 #[serde(rename = "ExpressionAttributeValues")]
2812 #[serde(skip_serializing_if = "Option::is_none")]
2813 pub expression_attribute_values: Option<::std::collections::HashMap<String, AttributeValue>>,
2814 /// <p>The primary key of the item to be updated. Each element consists of an attribute name and a value for that attribute.</p>
2815 #[serde(rename = "Key")]
2816 pub key: ::std::collections::HashMap<String, AttributeValue>,
2817 /// <p>Use <code>ReturnValuesOnConditionCheckFailure</code> to get the item attributes if the <code>Update</code> condition fails. For <code>ReturnValuesOnConditionCheckFailure</code>, the valid values are: NONE, ALL_OLD, UPDATED_OLD, ALL_NEW, UPDATED_NEW.</p>
2818 #[serde(rename = "ReturnValuesOnConditionCheckFailure")]
2819 #[serde(skip_serializing_if = "Option::is_none")]
2820 pub return_values_on_condition_check_failure: Option<String>,
2821 /// <p>Name of the table for the <code>UpdateItem</code> request.</p>
2822 #[serde(rename = "TableName")]
2823 pub table_name: String,
2824 /// <p>An expression that defines one or more attributes to be updated, the action to be performed on them, and new value(s) for them.</p>
2825 #[serde(rename = "UpdateExpression")]
2826 pub update_expression: String,
2827}
2828
2829#[derive(Clone, Debug, Default, PartialEq, Serialize)]
2830#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
2831pub struct UpdateContinuousBackupsInput {
2832 /// <p>Represents the settings used to enable point in time recovery.</p>
2833 #[serde(rename = "PointInTimeRecoverySpecification")]
2834 pub point_in_time_recovery_specification: PointInTimeRecoverySpecification,
2835 /// <p>The name of the table.</p>
2836 #[serde(rename = "TableName")]
2837 pub table_name: String,
2838}
2839
2840#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
2841#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
2842pub struct UpdateContinuousBackupsOutput {
2843 /// <p>Represents the continuous backups and point in time recovery settings on the table.</p>
2844 #[serde(rename = "ContinuousBackupsDescription")]
2845 #[serde(skip_serializing_if = "Option::is_none")]
2846 pub continuous_backups_description: Option<ContinuousBackupsDescription>,
2847}
2848
2849#[derive(Clone, Debug, Default, PartialEq, Serialize)]
2850#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
2851pub struct UpdateContributorInsightsInput {
2852 /// <p>Represents the contributor insights action.</p>
2853 #[serde(rename = "ContributorInsightsAction")]
2854 pub contributor_insights_action: String,
2855 /// <p>The global secondary index name, if applicable.</p>
2856 #[serde(rename = "IndexName")]
2857 #[serde(skip_serializing_if = "Option::is_none")]
2858 pub index_name: Option<String>,
2859 /// <p>The name of the table.</p>
2860 #[serde(rename = "TableName")]
2861 pub table_name: String,
2862}
2863
2864#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
2865#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
2866pub struct UpdateContributorInsightsOutput {
2867 /// <p>The status of contributor insights</p>
2868 #[serde(rename = "ContributorInsightsStatus")]
2869 #[serde(skip_serializing_if = "Option::is_none")]
2870 pub contributor_insights_status: Option<String>,
2871 /// <p>The name of the global secondary index, if applicable.</p>
2872 #[serde(rename = "IndexName")]
2873 #[serde(skip_serializing_if = "Option::is_none")]
2874 pub index_name: Option<String>,
2875 /// <p>The name of the table.</p>
2876 #[serde(rename = "TableName")]
2877 #[serde(skip_serializing_if = "Option::is_none")]
2878 pub table_name: Option<String>,
2879}
2880
2881/// <p>Represents the new provisioned throughput settings to be applied to a global secondary index.</p>
2882#[derive(Clone, Debug, Default, PartialEq, Serialize)]
2883#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
2884pub struct UpdateGlobalSecondaryIndexAction {
2885 /// <p>The name of the global secondary index to be updated.</p>
2886 #[serde(rename = "IndexName")]
2887 pub index_name: String,
2888 /// <p>Represents the provisioned throughput settings for the specified global secondary index.</p> <p>For current minimum and maximum provisioned throughput values, see <a href="https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Limits.html">Limits</a> in the <i>Amazon DynamoDB Developer Guide</i>.</p>
2889 #[serde(rename = "ProvisionedThroughput")]
2890 pub provisioned_throughput: ProvisionedThroughput,
2891}
2892
2893#[derive(Clone, Debug, Default, PartialEq, Serialize)]
2894#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
2895pub struct UpdateGlobalTableInput {
2896 /// <p>The global table name.</p>
2897 #[serde(rename = "GlobalTableName")]
2898 pub global_table_name: String,
2899 /// <p>A list of Regions that should be added or removed from the global table.</p>
2900 #[serde(rename = "ReplicaUpdates")]
2901 pub replica_updates: Vec<ReplicaUpdate>,
2902}
2903
2904#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
2905#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
2906pub struct UpdateGlobalTableOutput {
2907 /// <p>Contains the details of the global table.</p>
2908 #[serde(rename = "GlobalTableDescription")]
2909 #[serde(skip_serializing_if = "Option::is_none")]
2910 pub global_table_description: Option<GlobalTableDescription>,
2911}
2912
2913#[derive(Clone, Debug, Default, PartialEq, Serialize)]
2914#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
2915pub struct UpdateGlobalTableSettingsInput {
2916 /// <p><p>The billing mode of the global table. If <code>GlobalTableBillingMode</code> is not specified, the global table defaults to <code>PROVISIONED</code> capacity billing mode.</p> <ul> <li> <p> <code>PROVISIONED</code> - We recommend using <code>PROVISIONED</code> for predictable workloads. <code>PROVISIONED</code> sets the billing mode to <a href="https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/HowItWorks.ReadWriteCapacityMode.html#HowItWorks.ProvisionedThroughput.Manual">Provisioned Mode</a>.</p> </li> <li> <p> <code>PAY<em>PER</em>REQUEST</code> - We recommend using <code>PAY<em>PER</em>REQUEST</code> for unpredictable workloads. <code>PAY<em>PER</em>REQUEST</code> sets the billing mode to <a href="https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/HowItWorks.ReadWriteCapacityMode.html#HowItWorks.OnDemand">On-Demand Mode</a>. </p> </li> </ul></p>
2917 #[serde(rename = "GlobalTableBillingMode")]
2918 #[serde(skip_serializing_if = "Option::is_none")]
2919 pub global_table_billing_mode: Option<String>,
2920 /// <p>Represents the settings of a global secondary index for a global table that will be modified.</p>
2921 #[serde(rename = "GlobalTableGlobalSecondaryIndexSettingsUpdate")]
2922 #[serde(skip_serializing_if = "Option::is_none")]
2923 pub global_table_global_secondary_index_settings_update:
2924 Option<Vec<GlobalTableGlobalSecondaryIndexSettingsUpdate>>,
2925 /// <p>The name of the global table</p>
2926 #[serde(rename = "GlobalTableName")]
2927 pub global_table_name: String,
2928 /// <p>Auto scaling settings for managing provisioned write capacity for the global table.</p>
2929 #[serde(rename = "GlobalTableProvisionedWriteCapacityAutoScalingSettingsUpdate")]
2930 #[serde(skip_serializing_if = "Option::is_none")]
2931 pub global_table_provisioned_write_capacity_auto_scaling_settings_update:
2932 Option<AutoScalingSettingsUpdate>,
2933 /// <p>The maximum number of writes consumed per second before DynamoDB returns a <code>ThrottlingException.</code> </p>
2934 #[serde(rename = "GlobalTableProvisionedWriteCapacityUnits")]
2935 #[serde(skip_serializing_if = "Option::is_none")]
2936 pub global_table_provisioned_write_capacity_units: Option<i64>,
2937 /// <p>Represents the settings for a global table in a Region that will be modified.</p>
2938 #[serde(rename = "ReplicaSettingsUpdate")]
2939 #[serde(skip_serializing_if = "Option::is_none")]
2940 pub replica_settings_update: Option<Vec<ReplicaSettingsUpdate>>,
2941}
2942
2943#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
2944#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
2945pub struct UpdateGlobalTableSettingsOutput {
2946 /// <p>The name of the global table.</p>
2947 #[serde(rename = "GlobalTableName")]
2948 #[serde(skip_serializing_if = "Option::is_none")]
2949 pub global_table_name: Option<String>,
2950 /// <p>The Region-specific settings for the global table.</p>
2951 #[serde(rename = "ReplicaSettings")]
2952 #[serde(skip_serializing_if = "Option::is_none")]
2953 pub replica_settings: Option<Vec<ReplicaSettingsDescription>>,
2954}
2955
2956/// <p>Represents the input of an <code>UpdateItem</code> operation.</p>
2957#[derive(Clone, Debug, Default, PartialEq, Serialize)]
2958#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
2959pub struct UpdateItemInput {
2960 /// <p>This is a legacy parameter. Use <code>UpdateExpression</code> instead. For more information, see <a href="https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/LegacyConditionalParameters.AttributeUpdates.html">AttributeUpdates</a> in the <i>Amazon DynamoDB Developer Guide</i>.</p>
2961 #[serde(rename = "AttributeUpdates")]
2962 #[serde(skip_serializing_if = "Option::is_none")]
2963 pub attribute_updates: Option<::std::collections::HashMap<String, AttributeValueUpdate>>,
2964 /// <p>A condition that must be satisfied in order for a conditional update to succeed.</p> <p>An expression can contain any of the following:</p> <ul> <li> <p>Functions: <code>attribute_exists | attribute_not_exists | attribute_type | contains | begins_with | size</code> </p> <p>These function names are case-sensitive.</p> </li> <li> <p>Comparison operators: <code>= | <> | < | > | <= | >= | BETWEEN | IN </code> </p> </li> <li> <p> Logical operators: <code>AND | OR | NOT</code> </p> </li> </ul> <p>For more information about condition expressions, see <a href="https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Expressions.SpecifyingConditions.html">Specifying Conditions</a> in the <i>Amazon DynamoDB Developer Guide</i>.</p>
2965 #[serde(rename = "ConditionExpression")]
2966 #[serde(skip_serializing_if = "Option::is_none")]
2967 pub condition_expression: Option<String>,
2968 /// <p>This is a legacy parameter. Use <code>ConditionExpression</code> instead. For more information, see <a href="https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/LegacyConditionalParameters.ConditionalOperator.html">ConditionalOperator</a> in the <i>Amazon DynamoDB Developer Guide</i>.</p>
2969 #[serde(rename = "ConditionalOperator")]
2970 #[serde(skip_serializing_if = "Option::is_none")]
2971 pub conditional_operator: Option<String>,
2972 /// <p>This is a legacy parameter. Use <code>ConditionExpression</code> instead. For more information, see <a href="https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/LegacyConditionalParameters.Expected.html">Expected</a> in the <i>Amazon DynamoDB Developer Guide</i>.</p>
2973 #[serde(rename = "Expected")]
2974 #[serde(skip_serializing_if = "Option::is_none")]
2975 pub expected: Option<::std::collections::HashMap<String, ExpectedAttributeValue>>,
2976 /// <p>One or more substitution tokens for attribute names in an expression. The following are some use cases for using <code>ExpressionAttributeNames</code>:</p> <ul> <li> <p>To access an attribute whose name conflicts with a DynamoDB reserved word.</p> </li> <li> <p>To create a placeholder for repeating occurrences of an attribute name in an expression.</p> </li> <li> <p>To prevent special characters in an attribute name from being misinterpreted in an expression.</p> </li> </ul> <p>Use the <b>#</b> character in an expression to dereference an attribute name. For example, consider the following attribute name:</p> <ul> <li> <p> <code>Percentile</code> </p> </li> </ul> <p>The name of this attribute conflicts with a reserved word, so it cannot be used directly in an expression. (For the complete list of reserved words, see <a href="https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/ReservedWords.html">Reserved Words</a> in the <i>Amazon DynamoDB Developer Guide</i>.) To work around this, you could specify the following for <code>ExpressionAttributeNames</code>:</p> <ul> <li> <p> <code>{"#P":"Percentile"}</code> </p> </li> </ul> <p>You could then use this substitution in an expression, as in this example:</p> <ul> <li> <p> <code>#P = :val</code> </p> </li> </ul> <note> <p>Tokens that begin with the <b>:</b> character are <i>expression attribute values</i>, which are placeholders for the actual value at runtime.</p> </note> <p>For more information about expression attribute names, see <a href="https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Expressions.AccessingItemAttributes.html">Specifying Item Attributes</a> in the <i>Amazon DynamoDB Developer Guide</i>.</p>
2977 #[serde(rename = "ExpressionAttributeNames")]
2978 #[serde(skip_serializing_if = "Option::is_none")]
2979 pub expression_attribute_names: Option<::std::collections::HashMap<String, String>>,
2980 /// <p>One or more values that can be substituted in an expression.</p> <p>Use the <b>:</b> (colon) character in an expression to dereference an attribute value. For example, suppose that you wanted to check whether the value of the <code>ProductStatus</code> attribute was one of the following: </p> <p> <code>Available | Backordered | Discontinued</code> </p> <p>You would first need to specify <code>ExpressionAttributeValues</code> as follows:</p> <p> <code>{ ":avail":{"S":"Available"}, ":back":{"S":"Backordered"}, ":disc":{"S":"Discontinued"} }</code> </p> <p>You could then use these values in an expression, such as this:</p> <p> <code>ProductStatus IN (:avail, :back, :disc)</code> </p> <p>For more information on expression attribute values, see <a href="https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Expressions.SpecifyingConditions.html">Condition Expressions</a> in the <i>Amazon DynamoDB Developer Guide</i>.</p>
2981 #[serde(rename = "ExpressionAttributeValues")]
2982 #[serde(skip_serializing_if = "Option::is_none")]
2983 pub expression_attribute_values: Option<::std::collections::HashMap<String, AttributeValue>>,
2984 /// <p>The primary key of the item to be updated. Each element consists of an attribute name and a value for that attribute.</p> <p>For the primary key, you must provide all of the attributes. For example, with a simple primary key, you only need to provide a value for the partition key. For a composite primary key, you must provide values for both the partition key and the sort key.</p>
2985 #[serde(rename = "Key")]
2986 pub key: ::std::collections::HashMap<String, AttributeValue>,
2987 #[serde(rename = "ReturnConsumedCapacity")]
2988 #[serde(skip_serializing_if = "Option::is_none")]
2989 pub return_consumed_capacity: Option<String>,
2990 /// <p>Determines whether item collection metrics are returned. If set to <code>SIZE</code>, the response includes statistics about item collections, if any, that were modified during the operation are returned in the response. If set to <code>NONE</code> (the default), no statistics are returned.</p>
2991 #[serde(rename = "ReturnItemCollectionMetrics")]
2992 #[serde(skip_serializing_if = "Option::is_none")]
2993 pub return_item_collection_metrics: Option<String>,
2994 /// <p>Use <code>ReturnValues</code> if you want to get the item attributes as they appear before or after they are updated. For <code>UpdateItem</code>, the valid values are:</p> <ul> <li> <p> <code>NONE</code> - If <code>ReturnValues</code> is not specified, or if its value is <code>NONE</code>, then nothing is returned. (This setting is the default for <code>ReturnValues</code>.)</p> </li> <li> <p> <code>ALL_OLD</code> - Returns all of the attributes of the item, as they appeared before the UpdateItem operation.</p> </li> <li> <p> <code>UPDATED_OLD</code> - Returns only the updated attributes, as they appeared before the UpdateItem operation.</p> </li> <li> <p> <code>ALL_NEW</code> - Returns all of the attributes of the item, as they appear after the UpdateItem operation.</p> </li> <li> <p> <code>UPDATED_NEW</code> - Returns only the updated attributes, as they appear after the UpdateItem operation.</p> </li> </ul> <p>There is no additional cost associated with requesting a return value aside from the small network and processing overhead of receiving a larger response. No read capacity units are consumed.</p> <p>The values returned are strongly consistent.</p>
2995 #[serde(rename = "ReturnValues")]
2996 #[serde(skip_serializing_if = "Option::is_none")]
2997 pub return_values: Option<String>,
2998 /// <p>The name of the table containing the item to update.</p>
2999 #[serde(rename = "TableName")]
3000 pub table_name: String,
3001 /// <p>An expression that defines one or more attributes to be updated, the action to be performed on them, and new values for them.</p> <p>The following action values are available for <code>UpdateExpression</code>.</p> <ul> <li> <p> <code>SET</code> - Adds one or more attributes and values to an item. If any of these attributes already exist, they are replaced by the new values. You can also use <code>SET</code> to add or subtract from an attribute that is of type Number. For example: <code>SET myNum = myNum + :val</code> </p> <p> <code>SET</code> supports the following functions:</p> <ul> <li> <p> <code>if_not_exists (path, operand)</code> - if the item does not contain an attribute at the specified path, then <code>if_not_exists</code> evaluates to operand; otherwise, it evaluates to path. You can use this function to avoid overwriting an attribute that may already be present in the item.</p> </li> <li> <p> <code>list_append (operand, operand)</code> - evaluates to a list with a new element added to it. You can append the new element to the start or the end of the list by reversing the order of the operands.</p> </li> </ul> <p>These function names are case-sensitive.</p> </li> <li> <p> <code>REMOVE</code> - Removes one or more attributes from an item.</p> </li> <li> <p> <code>ADD</code> - Adds the specified value to the item, if the attribute does not already exist. If the attribute does exist, then the behavior of <code>ADD</code> depends on the data type of the attribute:</p> <ul> <li> <p>If the existing attribute is a number, and if <code>Value</code> is also a number, then <code>Value</code> is mathematically added to the existing attribute. If <code>Value</code> is a negative number, then it is subtracted from the existing attribute.</p> <note> <p>If you use <code>ADD</code> to increment or decrement a number value for an item that doesn't exist before the update, DynamoDB uses <code>0</code> as the initial value.</p> <p>Similarly, if you use <code>ADD</code> for an existing item to increment or decrement an attribute value that doesn't exist before the update, DynamoDB uses <code>0</code> as the initial value. For example, suppose that the item you want to update doesn't have an attribute named <code>itemcount</code>, but you decide to <code>ADD</code> the number <code>3</code> to this attribute anyway. DynamoDB will create the <code>itemcount</code> attribute, set its initial value to <code>0</code>, and finally add <code>3</code> to it. The result will be a new <code>itemcount</code> attribute in the item, with a value of <code>3</code>.</p> </note> </li> <li> <p>If the existing data type is a set and if <code>Value</code> is also a set, then <code>Value</code> is added to the existing set. For example, if the attribute value is the set <code>[1,2]</code>, and the <code>ADD</code> action specified <code>[3]</code>, then the final attribute value is <code>[1,2,3]</code>. An error occurs if an <code>ADD</code> action is specified for a set attribute and the attribute type specified does not match the existing set type. </p> <p>Both sets must have the same primitive data type. For example, if the existing data type is a set of strings, the <code>Value</code> must also be a set of strings.</p> </li> </ul> <important> <p>The <code>ADD</code> action only supports Number and set data types. In addition, <code>ADD</code> can only be used on top-level attributes, not nested attributes.</p> </important> </li> <li> <p> <code>DELETE</code> - Deletes an element from a set.</p> <p>If a set of values is specified, then those values are subtracted from the old set. For example, if the attribute value was the set <code>[a,b,c]</code> and the <code>DELETE</code> action specifies <code>[a,c]</code>, then the final attribute value is <code>[b]</code>. Specifying an empty set is an error.</p> <important> <p>The <code>DELETE</code> action only supports set data types. In addition, <code>DELETE</code> can only be used on top-level attributes, not nested attributes.</p> </important> </li> </ul> <p>You can have many actions in a single expression, such as the following: <code>SET a=:value1, b=:value2 DELETE :value3, :value4, :value5</code> </p> <p>For more information on update expressions, see <a href="https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Expressions.Modifying.html">Modifying Items and Attributes</a> in the <i>Amazon DynamoDB Developer Guide</i>.</p>
3002 #[serde(rename = "UpdateExpression")]
3003 #[serde(skip_serializing_if = "Option::is_none")]
3004 pub update_expression: Option<String>,
3005}
3006
3007/// <p>Represents the output of an <code>UpdateItem</code> operation.</p>
3008#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
3009#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
3010pub struct UpdateItemOutput {
3011 /// <p>A map of attribute values as they appear before or after the <code>UpdateItem</code> operation, as determined by the <code>ReturnValues</code> parameter.</p> <p>The <code>Attributes</code> map is only present if <code>ReturnValues</code> was specified as something other than <code>NONE</code> in the request. Each element represents one attribute.</p>
3012 #[serde(rename = "Attributes")]
3013 #[serde(skip_serializing_if = "Option::is_none")]
3014 pub attributes: Option<::std::collections::HashMap<String, AttributeValue>>,
3015 /// <p>The capacity units consumed by the <code>UpdateItem</code> operation. The data returned includes the total provisioned throughput consumed, along with statistics for the table and any indexes involved in the operation. <code>ConsumedCapacity</code> is only returned if the <code>ReturnConsumedCapacity</code> parameter was specified. For more information, see <a href="https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/ProvisionedThroughputIntro.html">Provisioned Throughput</a> in the <i>Amazon DynamoDB Developer Guide</i>.</p>
3016 #[serde(rename = "ConsumedCapacity")]
3017 #[serde(skip_serializing_if = "Option::is_none")]
3018 pub consumed_capacity: Option<ConsumedCapacity>,
3019 /// <p><p>Information about item collections, if any, that were affected by the <code>UpdateItem</code> operation. <code>ItemCollectionMetrics</code> is only returned if the <code>ReturnItemCollectionMetrics</code> parameter was specified. If the table does not have any local secondary indexes, this information is not returned in the response.</p> <p>Each <code>ItemCollectionMetrics</code> element consists of:</p> <ul> <li> <p> <code>ItemCollectionKey</code> - The partition key value of the item collection. This is the same as the partition key value of the item itself.</p> </li> <li> <p> <code>SizeEstimateRangeGB</code> - An estimate of item collection size, in gigabytes. This value is a two-element array containing a lower bound and an upper bound for the estimate. The estimate includes the size of all the items in the table, plus the size of all attributes projected into all of the local secondary indexes on that table. Use this estimate to measure whether a local secondary index is approaching its size limit.</p> <p>The estimate is subject to change over time; therefore, do not rely on the precision or accuracy of the estimate.</p> </li> </ul></p>
3020 #[serde(rename = "ItemCollectionMetrics")]
3021 #[serde(skip_serializing_if = "Option::is_none")]
3022 pub item_collection_metrics: Option<ItemCollectionMetrics>,
3023}
3024
3025/// <p>Represents a replica to be modified.</p>
3026#[derive(Clone, Debug, Default, PartialEq, Serialize)]
3027#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
3028pub struct UpdateReplicationGroupMemberAction {
3029 /// <p>Replica-specific global secondary index settings.</p>
3030 #[serde(rename = "GlobalSecondaryIndexes")]
3031 #[serde(skip_serializing_if = "Option::is_none")]
3032 pub global_secondary_indexes: Option<Vec<ReplicaGlobalSecondaryIndex>>,
3033 /// <p>The AWS KMS customer master key (CMK) of the replica that should be used for AWS KMS encryption. To specify a CMK, use its key ID, Amazon Resource Name (ARN), alias name, or alias ARN. Note that you should only provide this parameter if the key is different from the default DynamoDB KMS master key alias/aws/dynamodb.</p>
3034 #[serde(rename = "KMSMasterKeyId")]
3035 #[serde(skip_serializing_if = "Option::is_none")]
3036 pub kms_master_key_id: Option<String>,
3037 /// <p>Replica-specific provisioned throughput. If not specified, uses the source table's provisioned throughput settings.</p>
3038 #[serde(rename = "ProvisionedThroughputOverride")]
3039 #[serde(skip_serializing_if = "Option::is_none")]
3040 pub provisioned_throughput_override: Option<ProvisionedThroughputOverride>,
3041 /// <p>The Region where the replica exists.</p>
3042 #[serde(rename = "RegionName")]
3043 pub region_name: String,
3044}
3045
3046/// <p>Represents the input of an <code>UpdateTable</code> operation.</p>
3047#[derive(Clone, Debug, Default, PartialEq, Serialize)]
3048#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
3049pub struct UpdateTableInput {
3050 /// <p>An array of attributes that describe the key schema for the table and indexes. If you are adding a new global secondary index to the table, <code>AttributeDefinitions</code> must include the key element(s) of the new index.</p>
3051 #[serde(rename = "AttributeDefinitions")]
3052 #[serde(skip_serializing_if = "Option::is_none")]
3053 pub attribute_definitions: Option<Vec<AttributeDefinition>>,
3054 /// <p><p>Controls how you are charged for read and write throughput and how you manage capacity. When switching from pay-per-request to provisioned capacity, initial provisioned capacity values must be set. The initial provisioned capacity values are estimated based on the consumed read and write capacity of your table and global secondary indexes over the past 30 minutes.</p> <ul> <li> <p> <code>PROVISIONED</code> - We recommend using <code>PROVISIONED</code> for predictable workloads. <code>PROVISIONED</code> sets the billing mode to <a href="https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/HowItWorks.ReadWriteCapacityMode.html#HowItWorks.ProvisionedThroughput.Manual">Provisioned Mode</a>.</p> </li> <li> <p> <code>PAY<em>PER</em>REQUEST</code> - We recommend using <code>PAY<em>PER</em>REQUEST</code> for unpredictable workloads. <code>PAY<em>PER</em>REQUEST</code> sets the billing mode to <a href="https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/HowItWorks.ReadWriteCapacityMode.html#HowItWorks.OnDemand">On-Demand Mode</a>. </p> </li> </ul></p>
3055 #[serde(rename = "BillingMode")]
3056 #[serde(skip_serializing_if = "Option::is_none")]
3057 pub billing_mode: Option<String>,
3058 /// <p>An array of one or more global secondary indexes for the table. For each index in the array, you can request one action:</p> <ul> <li> <p> <code>Create</code> - add a new global secondary index to the table.</p> </li> <li> <p> <code>Update</code> - modify the provisioned throughput settings of an existing global secondary index.</p> </li> <li> <p> <code>Delete</code> - remove a global secondary index from the table.</p> </li> </ul> <p>You can create or delete only one global secondary index per <code>UpdateTable</code> operation.</p> <p>For more information, see <a href="https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/GSI.OnlineOps.html">Managing Global Secondary Indexes</a> in the <i>Amazon DynamoDB Developer Guide</i>. </p>
3059 #[serde(rename = "GlobalSecondaryIndexUpdates")]
3060 #[serde(skip_serializing_if = "Option::is_none")]
3061 pub global_secondary_index_updates: Option<Vec<GlobalSecondaryIndexUpdate>>,
3062 /// <p>The new provisioned throughput settings for the specified table or index.</p>
3063 #[serde(rename = "ProvisionedThroughput")]
3064 #[serde(skip_serializing_if = "Option::is_none")]
3065 pub provisioned_throughput: Option<ProvisionedThroughput>,
3066 /// <p><p>A list of replica update actions (create, delete, or update) for the table.</p> <note> <p>This property only applies to <a href="https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/globaltables.V2.html">Version 2019.11.21</a> of global tables.</p> </note></p>
3067 #[serde(rename = "ReplicaUpdates")]
3068 #[serde(skip_serializing_if = "Option::is_none")]
3069 pub replica_updates: Option<Vec<ReplicationGroupUpdate>>,
3070 /// <p>The new server-side encryption settings for the specified table.</p>
3071 #[serde(rename = "SSESpecification")]
3072 #[serde(skip_serializing_if = "Option::is_none")]
3073 pub sse_specification: Option<SSESpecification>,
3074 /// <p><p>Represents the DynamoDB Streams configuration for the table.</p> <note> <p>You receive a <code>ResourceInUseException</code> if you try to enable a stream on a table that already has a stream, or if you try to disable a stream on a table that doesn't have a stream.</p> </note></p>
3075 #[serde(rename = "StreamSpecification")]
3076 #[serde(skip_serializing_if = "Option::is_none")]
3077 pub stream_specification: Option<StreamSpecification>,
3078 /// <p>The name of the table to be updated.</p>
3079 #[serde(rename = "TableName")]
3080 pub table_name: String,
3081}
3082
3083/// <p>Represents the output of an <code>UpdateTable</code> operation.</p>
3084#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
3085#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
3086pub struct UpdateTableOutput {
3087 /// <p>Represents the properties of the table.</p>
3088 #[serde(rename = "TableDescription")]
3089 #[serde(skip_serializing_if = "Option::is_none")]
3090 pub table_description: Option<TableDescription>,
3091}
3092
3093#[derive(Clone, Debug, Default, PartialEq, Serialize)]
3094#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
3095pub struct UpdateTableReplicaAutoScalingInput {
3096 /// <p>Represents the auto scaling settings of the global secondary indexes of the replica to be updated.</p>
3097 #[serde(rename = "GlobalSecondaryIndexUpdates")]
3098 #[serde(skip_serializing_if = "Option::is_none")]
3099 pub global_secondary_index_updates: Option<Vec<GlobalSecondaryIndexAutoScalingUpdate>>,
3100 #[serde(rename = "ProvisionedWriteCapacityAutoScalingUpdate")]
3101 #[serde(skip_serializing_if = "Option::is_none")]
3102 pub provisioned_write_capacity_auto_scaling_update: Option<AutoScalingSettingsUpdate>,
3103 /// <p>Represents the auto scaling settings of replicas of the table that will be modified.</p>
3104 #[serde(rename = "ReplicaUpdates")]
3105 #[serde(skip_serializing_if = "Option::is_none")]
3106 pub replica_updates: Option<Vec<ReplicaAutoScalingUpdate>>,
3107 /// <p>The name of the global table to be updated.</p>
3108 #[serde(rename = "TableName")]
3109 pub table_name: String,
3110}
3111
3112#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
3113#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
3114pub struct UpdateTableReplicaAutoScalingOutput {
3115 /// <p>Returns information about the auto scaling settings of a table with replicas.</p>
3116 #[serde(rename = "TableAutoScalingDescription")]
3117 #[serde(skip_serializing_if = "Option::is_none")]
3118 pub table_auto_scaling_description: Option<TableAutoScalingDescription>,
3119}
3120
3121/// <p>Represents the input of an <code>UpdateTimeToLive</code> operation.</p>
3122#[derive(Clone, Debug, Default, PartialEq, Serialize)]
3123#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
3124pub struct UpdateTimeToLiveInput {
3125 /// <p>The name of the table to be configured.</p>
3126 #[serde(rename = "TableName")]
3127 pub table_name: String,
3128 /// <p>Represents the settings used to enable or disable Time to Live for the specified table.</p>
3129 #[serde(rename = "TimeToLiveSpecification")]
3130 pub time_to_live_specification: TimeToLiveSpecification,
3131}
3132
3133#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
3134#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
3135pub struct UpdateTimeToLiveOutput {
3136 /// <p>Represents the output of an <code>UpdateTimeToLive</code> operation.</p>
3137 #[serde(rename = "TimeToLiveSpecification")]
3138 #[serde(skip_serializing_if = "Option::is_none")]
3139 pub time_to_live_specification: Option<TimeToLiveSpecification>,
3140}
3141
3142/// <p>Represents an operation to perform - either <code>DeleteItem</code> or <code>PutItem</code>. You can only request one of these operations, not both, in a single <code>WriteRequest</code>. If you do need to perform both of these operations, you need to provide two separate <code>WriteRequest</code> objects.</p>
3143#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
3144pub struct WriteRequest {
3145 /// <p>A request to perform a <code>DeleteItem</code> operation.</p>
3146 #[serde(rename = "DeleteRequest")]
3147 #[serde(skip_serializing_if = "Option::is_none")]
3148 pub delete_request: Option<DeleteRequest>,
3149 /// <p>A request to perform a <code>PutItem</code> operation.</p>
3150 #[serde(rename = "PutRequest")]
3151 #[serde(skip_serializing_if = "Option::is_none")]
3152 pub put_request: Option<PutRequest>,
3153}
3154
3155/// Errors returned by BatchGetItem
3156#[derive(Debug, PartialEq)]
3157pub enum BatchGetItemError {
3158 /// <p>An error occurred on the server side.</p>
3159 InternalServerError(String),
3160 /// <p>Your request rate is too high. The AWS SDKs for DynamoDB automatically retry requests that receive this exception. Your request is eventually successful, unless your retry queue is too large to finish. Reduce the frequency of requests and use exponential backoff. For more information, go to <a href="https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Programming.Errors.html#Programming.Errors.RetryAndBackoff">Error Retries and Exponential Backoff</a> in the <i>Amazon DynamoDB Developer Guide</i>.</p>
3161 ProvisionedThroughputExceeded(String),
3162 /// <p>Throughput exceeds the current throughput limit for your account. Please contact AWS Support at <a href="https://aws.amazon.com/support">AWS Support</a> to request a limit increase.</p>
3163 RequestLimitExceeded(String),
3164 /// <p>The operation tried to access a nonexistent table or index. The resource might not be specified correctly, or its status might not be <code>ACTIVE</code>.</p>
3165 ResourceNotFound(String),
3166}
3167
3168impl BatchGetItemError {
3169 pub fn from_response(res: BufferedHttpResponse) -> RusotoError<BatchGetItemError> {
3170 if let Some(err) = proto::json::Error::parse(&res) {
3171 match err.typ.as_str() {
3172 "InternalServerError" => {
3173 return RusotoError::Service(BatchGetItemError::InternalServerError(err.msg))
3174 }
3175 "ProvisionedThroughputExceededException" => {
3176 return RusotoError::Service(BatchGetItemError::ProvisionedThroughputExceeded(
3177 err.msg,
3178 ))
3179 }
3180 "RequestLimitExceeded" => {
3181 return RusotoError::Service(BatchGetItemError::RequestLimitExceeded(err.msg))
3182 }
3183 "ResourceNotFoundException" => {
3184 return RusotoError::Service(BatchGetItemError::ResourceNotFound(err.msg))
3185 }
3186 "ValidationException" => return RusotoError::Validation(err.msg),
3187 _ => {}
3188 }
3189 }
3190 RusotoError::Unknown(res)
3191 }
3192}
3193impl fmt::Display for BatchGetItemError {
3194 #[allow(unused_variables)]
3195 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
3196 match *self {
3197 BatchGetItemError::InternalServerError(ref cause) => write!(f, "{}", cause),
3198 BatchGetItemError::ProvisionedThroughputExceeded(ref cause) => write!(f, "{}", cause),
3199 BatchGetItemError::RequestLimitExceeded(ref cause) => write!(f, "{}", cause),
3200 BatchGetItemError::ResourceNotFound(ref cause) => write!(f, "{}", cause),
3201 }
3202 }
3203}
3204impl Error for BatchGetItemError {}
3205/// Errors returned by BatchWriteItem
3206#[derive(Debug, PartialEq)]
3207pub enum BatchWriteItemError {
3208 /// <p>An error occurred on the server side.</p>
3209 InternalServerError(String),
3210 /// <p>An item collection is too large. This exception is only returned for tables that have one or more local secondary indexes.</p>
3211 ItemCollectionSizeLimitExceeded(String),
3212 /// <p>Your request rate is too high. The AWS SDKs for DynamoDB automatically retry requests that receive this exception. Your request is eventually successful, unless your retry queue is too large to finish. Reduce the frequency of requests and use exponential backoff. For more information, go to <a href="https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Programming.Errors.html#Programming.Errors.RetryAndBackoff">Error Retries and Exponential Backoff</a> in the <i>Amazon DynamoDB Developer Guide</i>.</p>
3213 ProvisionedThroughputExceeded(String),
3214 /// <p>Throughput exceeds the current throughput limit for your account. Please contact AWS Support at <a href="https://aws.amazon.com/support">AWS Support</a> to request a limit increase.</p>
3215 RequestLimitExceeded(String),
3216 /// <p>The operation tried to access a nonexistent table or index. The resource might not be specified correctly, or its status might not be <code>ACTIVE</code>.</p>
3217 ResourceNotFound(String),
3218}
3219
3220impl BatchWriteItemError {
3221 pub fn from_response(res: BufferedHttpResponse) -> RusotoError<BatchWriteItemError> {
3222 if let Some(err) = proto::json::Error::parse(&res) {
3223 match err.typ.as_str() {
3224 "InternalServerError" => {
3225 return RusotoError::Service(BatchWriteItemError::InternalServerError(err.msg))
3226 }
3227 "ItemCollectionSizeLimitExceededException" => {
3228 return RusotoError::Service(
3229 BatchWriteItemError::ItemCollectionSizeLimitExceeded(err.msg),
3230 )
3231 }
3232 "ProvisionedThroughputExceededException" => {
3233 return RusotoError::Service(
3234 BatchWriteItemError::ProvisionedThroughputExceeded(err.msg),
3235 )
3236 }
3237 "RequestLimitExceeded" => {
3238 return RusotoError::Service(BatchWriteItemError::RequestLimitExceeded(err.msg))
3239 }
3240 "ResourceNotFoundException" => {
3241 return RusotoError::Service(BatchWriteItemError::ResourceNotFound(err.msg))
3242 }
3243 "ValidationException" => return RusotoError::Validation(err.msg),
3244 _ => {}
3245 }
3246 }
3247 RusotoError::Unknown(res)
3248 }
3249}
3250impl fmt::Display for BatchWriteItemError {
3251 #[allow(unused_variables)]
3252 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
3253 match *self {
3254 BatchWriteItemError::InternalServerError(ref cause) => write!(f, "{}", cause),
3255 BatchWriteItemError::ItemCollectionSizeLimitExceeded(ref cause) => {
3256 write!(f, "{}", cause)
3257 }
3258 BatchWriteItemError::ProvisionedThroughputExceeded(ref cause) => write!(f, "{}", cause),
3259 BatchWriteItemError::RequestLimitExceeded(ref cause) => write!(f, "{}", cause),
3260 BatchWriteItemError::ResourceNotFound(ref cause) => write!(f, "{}", cause),
3261 }
3262 }
3263}
3264impl Error for BatchWriteItemError {}
3265/// Errors returned by CreateBackup
3266#[derive(Debug, PartialEq)]
3267pub enum CreateBackupError {
3268 /// <p>There is another ongoing conflicting backup control plane operation on the table. The backup is either being created, deleted or restored to a table.</p>
3269 BackupInUse(String),
3270 /// <p>Backups have not yet been enabled for this table.</p>
3271 ContinuousBackupsUnavailable(String),
3272 /// <p>An error occurred on the server side.</p>
3273 InternalServerError(String),
3274 /// <p>There is no limit to the number of daily on-demand backups that can be taken. </p> <p>Up to 50 simultaneous table operations are allowed per account. These operations include <code>CreateTable</code>, <code>UpdateTable</code>, <code>DeleteTable</code>,<code>UpdateTimeToLive</code>, <code>RestoreTableFromBackup</code>, and <code>RestoreTableToPointInTime</code>. </p> <p>The only exception is when you are creating a table with one or more secondary indexes. You can have up to 25 such requests running at a time; however, if the table or index specifications are complex, DynamoDB might temporarily reduce the number of concurrent operations.</p> <p>There is a soft account limit of 256 tables.</p>
3275 LimitExceeded(String),
3276 /// <p>A target table with the specified name is either being created or deleted. </p>
3277 TableInUse(String),
3278 /// <p>A source table with the name <code>TableName</code> does not currently exist within the subscriber's account.</p>
3279 TableNotFound(String),
3280}
3281
3282impl CreateBackupError {
3283 pub fn from_response(res: BufferedHttpResponse) -> RusotoError<CreateBackupError> {
3284 if let Some(err) = proto::json::Error::parse(&res) {
3285 match err.typ.as_str() {
3286 "BackupInUseException" => {
3287 return RusotoError::Service(CreateBackupError::BackupInUse(err.msg))
3288 }
3289 "ContinuousBackupsUnavailableException" => {
3290 return RusotoError::Service(CreateBackupError::ContinuousBackupsUnavailable(
3291 err.msg,
3292 ))
3293 }
3294 "InternalServerError" => {
3295 return RusotoError::Service(CreateBackupError::InternalServerError(err.msg))
3296 }
3297 "LimitExceededException" => {
3298 return RusotoError::Service(CreateBackupError::LimitExceeded(err.msg))
3299 }
3300 "TableInUseException" => {
3301 return RusotoError::Service(CreateBackupError::TableInUse(err.msg))
3302 }
3303 "TableNotFoundException" => {
3304 return RusotoError::Service(CreateBackupError::TableNotFound(err.msg))
3305 }
3306 "ValidationException" => return RusotoError::Validation(err.msg),
3307 _ => {}
3308 }
3309 }
3310 RusotoError::Unknown(res)
3311 }
3312}
3313impl fmt::Display for CreateBackupError {
3314 #[allow(unused_variables)]
3315 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
3316 match *self {
3317 CreateBackupError::BackupInUse(ref cause) => write!(f, "{}", cause),
3318 CreateBackupError::ContinuousBackupsUnavailable(ref cause) => write!(f, "{}", cause),
3319 CreateBackupError::InternalServerError(ref cause) => write!(f, "{}", cause),
3320 CreateBackupError::LimitExceeded(ref cause) => write!(f, "{}", cause),
3321 CreateBackupError::TableInUse(ref cause) => write!(f, "{}", cause),
3322 CreateBackupError::TableNotFound(ref cause) => write!(f, "{}", cause),
3323 }
3324 }
3325}
3326impl Error for CreateBackupError {}
3327/// Errors returned by CreateGlobalTable
3328#[derive(Debug, PartialEq)]
3329pub enum CreateGlobalTableError {
3330 /// <p>The specified global table already exists.</p>
3331 GlobalTableAlreadyExists(String),
3332 /// <p>An error occurred on the server side.</p>
3333 InternalServerError(String),
3334 /// <p>There is no limit to the number of daily on-demand backups that can be taken. </p> <p>Up to 50 simultaneous table operations are allowed per account. These operations include <code>CreateTable</code>, <code>UpdateTable</code>, <code>DeleteTable</code>,<code>UpdateTimeToLive</code>, <code>RestoreTableFromBackup</code>, and <code>RestoreTableToPointInTime</code>. </p> <p>The only exception is when you are creating a table with one or more secondary indexes. You can have up to 25 such requests running at a time; however, if the table or index specifications are complex, DynamoDB might temporarily reduce the number of concurrent operations.</p> <p>There is a soft account limit of 256 tables.</p>
3335 LimitExceeded(String),
3336 /// <p>A source table with the name <code>TableName</code> does not currently exist within the subscriber's account.</p>
3337 TableNotFound(String),
3338}
3339
3340impl CreateGlobalTableError {
3341 pub fn from_response(res: BufferedHttpResponse) -> RusotoError<CreateGlobalTableError> {
3342 if let Some(err) = proto::json::Error::parse(&res) {
3343 match err.typ.as_str() {
3344 "GlobalTableAlreadyExistsException" => {
3345 return RusotoError::Service(CreateGlobalTableError::GlobalTableAlreadyExists(
3346 err.msg,
3347 ))
3348 }
3349 "InternalServerError" => {
3350 return RusotoError::Service(CreateGlobalTableError::InternalServerError(
3351 err.msg,
3352 ))
3353 }
3354 "LimitExceededException" => {
3355 return RusotoError::Service(CreateGlobalTableError::LimitExceeded(err.msg))
3356 }
3357 "TableNotFoundException" => {
3358 return RusotoError::Service(CreateGlobalTableError::TableNotFound(err.msg))
3359 }
3360 "ValidationException" => return RusotoError::Validation(err.msg),
3361 _ => {}
3362 }
3363 }
3364 RusotoError::Unknown(res)
3365 }
3366}
3367impl fmt::Display for CreateGlobalTableError {
3368 #[allow(unused_variables)]
3369 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
3370 match *self {
3371 CreateGlobalTableError::GlobalTableAlreadyExists(ref cause) => write!(f, "{}", cause),
3372 CreateGlobalTableError::InternalServerError(ref cause) => write!(f, "{}", cause),
3373 CreateGlobalTableError::LimitExceeded(ref cause) => write!(f, "{}", cause),
3374 CreateGlobalTableError::TableNotFound(ref cause) => write!(f, "{}", cause),
3375 }
3376 }
3377}
3378impl Error for CreateGlobalTableError {}
3379/// Errors returned by CreateTable
3380#[derive(Debug, PartialEq)]
3381pub enum CreateTableError {
3382 /// <p>An error occurred on the server side.</p>
3383 InternalServerError(String),
3384 /// <p>There is no limit to the number of daily on-demand backups that can be taken. </p> <p>Up to 50 simultaneous table operations are allowed per account. These operations include <code>CreateTable</code>, <code>UpdateTable</code>, <code>DeleteTable</code>,<code>UpdateTimeToLive</code>, <code>RestoreTableFromBackup</code>, and <code>RestoreTableToPointInTime</code>. </p> <p>The only exception is when you are creating a table with one or more secondary indexes. You can have up to 25 such requests running at a time; however, if the table or index specifications are complex, DynamoDB might temporarily reduce the number of concurrent operations.</p> <p>There is a soft account limit of 256 tables.</p>
3385 LimitExceeded(String),
3386 /// <p>The operation conflicts with the resource's availability. For example, you attempted to recreate an existing table, or tried to delete a table currently in the <code>CREATING</code> state.</p>
3387 ResourceInUse(String),
3388}
3389
3390impl CreateTableError {
3391 pub fn from_response(res: BufferedHttpResponse) -> RusotoError<CreateTableError> {
3392 if let Some(err) = proto::json::Error::parse(&res) {
3393 match err.typ.as_str() {
3394 "InternalServerError" => {
3395 return RusotoError::Service(CreateTableError::InternalServerError(err.msg))
3396 }
3397 "LimitExceededException" => {
3398 return RusotoError::Service(CreateTableError::LimitExceeded(err.msg))
3399 }
3400 "ResourceInUseException" => {
3401 return RusotoError::Service(CreateTableError::ResourceInUse(err.msg))
3402 }
3403 "ValidationException" => return RusotoError::Validation(err.msg),
3404 _ => {}
3405 }
3406 }
3407 RusotoError::Unknown(res)
3408 }
3409}
3410impl fmt::Display for CreateTableError {
3411 #[allow(unused_variables)]
3412 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
3413 match *self {
3414 CreateTableError::InternalServerError(ref cause) => write!(f, "{}", cause),
3415 CreateTableError::LimitExceeded(ref cause) => write!(f, "{}", cause),
3416 CreateTableError::ResourceInUse(ref cause) => write!(f, "{}", cause),
3417 }
3418 }
3419}
3420impl Error for CreateTableError {}
3421/// Errors returned by DeleteBackup
3422#[derive(Debug, PartialEq)]
3423pub enum DeleteBackupError {
3424 /// <p>There is another ongoing conflicting backup control plane operation on the table. The backup is either being created, deleted or restored to a table.</p>
3425 BackupInUse(String),
3426 /// <p>Backup not found for the given BackupARN. </p>
3427 BackupNotFound(String),
3428 /// <p>An error occurred on the server side.</p>
3429 InternalServerError(String),
3430 /// <p>There is no limit to the number of daily on-demand backups that can be taken. </p> <p>Up to 50 simultaneous table operations are allowed per account. These operations include <code>CreateTable</code>, <code>UpdateTable</code>, <code>DeleteTable</code>,<code>UpdateTimeToLive</code>, <code>RestoreTableFromBackup</code>, and <code>RestoreTableToPointInTime</code>. </p> <p>The only exception is when you are creating a table with one or more secondary indexes. You can have up to 25 such requests running at a time; however, if the table or index specifications are complex, DynamoDB might temporarily reduce the number of concurrent operations.</p> <p>There is a soft account limit of 256 tables.</p>
3431 LimitExceeded(String),
3432}
3433
3434impl DeleteBackupError {
3435 pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DeleteBackupError> {
3436 if let Some(err) = proto::json::Error::parse(&res) {
3437 match err.typ.as_str() {
3438 "BackupInUseException" => {
3439 return RusotoError::Service(DeleteBackupError::BackupInUse(err.msg))
3440 }
3441 "BackupNotFoundException" => {
3442 return RusotoError::Service(DeleteBackupError::BackupNotFound(err.msg))
3443 }
3444 "InternalServerError" => {
3445 return RusotoError::Service(DeleteBackupError::InternalServerError(err.msg))
3446 }
3447 "LimitExceededException" => {
3448 return RusotoError::Service(DeleteBackupError::LimitExceeded(err.msg))
3449 }
3450 "ValidationException" => return RusotoError::Validation(err.msg),
3451 _ => {}
3452 }
3453 }
3454 RusotoError::Unknown(res)
3455 }
3456}
3457impl fmt::Display for DeleteBackupError {
3458 #[allow(unused_variables)]
3459 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
3460 match *self {
3461 DeleteBackupError::BackupInUse(ref cause) => write!(f, "{}", cause),
3462 DeleteBackupError::BackupNotFound(ref cause) => write!(f, "{}", cause),
3463 DeleteBackupError::InternalServerError(ref cause) => write!(f, "{}", cause),
3464 DeleteBackupError::LimitExceeded(ref cause) => write!(f, "{}", cause),
3465 }
3466 }
3467}
3468impl Error for DeleteBackupError {}
3469/// Errors returned by DeleteItem
3470#[derive(Debug, PartialEq)]
3471pub enum DeleteItemError {
3472 /// <p>A condition specified in the operation could not be evaluated.</p>
3473 ConditionalCheckFailed(String),
3474 /// <p>An error occurred on the server side.</p>
3475 InternalServerError(String),
3476 /// <p>An item collection is too large. This exception is only returned for tables that have one or more local secondary indexes.</p>
3477 ItemCollectionSizeLimitExceeded(String),
3478 /// <p>Your request rate is too high. The AWS SDKs for DynamoDB automatically retry requests that receive this exception. Your request is eventually successful, unless your retry queue is too large to finish. Reduce the frequency of requests and use exponential backoff. For more information, go to <a href="https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Programming.Errors.html#Programming.Errors.RetryAndBackoff">Error Retries and Exponential Backoff</a> in the <i>Amazon DynamoDB Developer Guide</i>.</p>
3479 ProvisionedThroughputExceeded(String),
3480 /// <p>Throughput exceeds the current throughput limit for your account. Please contact AWS Support at <a href="https://aws.amazon.com/support">AWS Support</a> to request a limit increase.</p>
3481 RequestLimitExceeded(String),
3482 /// <p>The operation tried to access a nonexistent table or index. The resource might not be specified correctly, or its status might not be <code>ACTIVE</code>.</p>
3483 ResourceNotFound(String),
3484 /// <p>Operation was rejected because there is an ongoing transaction for the item.</p>
3485 TransactionConflict(String),
3486}
3487
3488impl DeleteItemError {
3489 pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DeleteItemError> {
3490 if let Some(err) = proto::json::Error::parse(&res) {
3491 match err.typ.as_str() {
3492 "ConditionalCheckFailedException" => {
3493 return RusotoError::Service(DeleteItemError::ConditionalCheckFailed(err.msg))
3494 }
3495 "InternalServerError" => {
3496 return RusotoError::Service(DeleteItemError::InternalServerError(err.msg))
3497 }
3498 "ItemCollectionSizeLimitExceededException" => {
3499 return RusotoError::Service(DeleteItemError::ItemCollectionSizeLimitExceeded(
3500 err.msg,
3501 ))
3502 }
3503 "ProvisionedThroughputExceededException" => {
3504 return RusotoError::Service(DeleteItemError::ProvisionedThroughputExceeded(
3505 err.msg,
3506 ))
3507 }
3508 "RequestLimitExceeded" => {
3509 return RusotoError::Service(DeleteItemError::RequestLimitExceeded(err.msg))
3510 }
3511 "ResourceNotFoundException" => {
3512 return RusotoError::Service(DeleteItemError::ResourceNotFound(err.msg))
3513 }
3514 "TransactionConflictException" => {
3515 return RusotoError::Service(DeleteItemError::TransactionConflict(err.msg))
3516 }
3517 "ValidationException" => return RusotoError::Validation(err.msg),
3518 _ => {}
3519 }
3520 }
3521 RusotoError::Unknown(res)
3522 }
3523}
3524impl fmt::Display for DeleteItemError {
3525 #[allow(unused_variables)]
3526 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
3527 match *self {
3528 DeleteItemError::ConditionalCheckFailed(ref cause) => write!(f, "{}", cause),
3529 DeleteItemError::InternalServerError(ref cause) => write!(f, "{}", cause),
3530 DeleteItemError::ItemCollectionSizeLimitExceeded(ref cause) => write!(f, "{}", cause),
3531 DeleteItemError::ProvisionedThroughputExceeded(ref cause) => write!(f, "{}", cause),
3532 DeleteItemError::RequestLimitExceeded(ref cause) => write!(f, "{}", cause),
3533 DeleteItemError::ResourceNotFound(ref cause) => write!(f, "{}", cause),
3534 DeleteItemError::TransactionConflict(ref cause) => write!(f, "{}", cause),
3535 }
3536 }
3537}
3538impl Error for DeleteItemError {}
3539/// Errors returned by DeleteTable
3540#[derive(Debug, PartialEq)]
3541pub enum DeleteTableError {
3542 /// <p>An error occurred on the server side.</p>
3543 InternalServerError(String),
3544 /// <p>There is no limit to the number of daily on-demand backups that can be taken. </p> <p>Up to 50 simultaneous table operations are allowed per account. These operations include <code>CreateTable</code>, <code>UpdateTable</code>, <code>DeleteTable</code>,<code>UpdateTimeToLive</code>, <code>RestoreTableFromBackup</code>, and <code>RestoreTableToPointInTime</code>. </p> <p>The only exception is when you are creating a table with one or more secondary indexes. You can have up to 25 such requests running at a time; however, if the table or index specifications are complex, DynamoDB might temporarily reduce the number of concurrent operations.</p> <p>There is a soft account limit of 256 tables.</p>
3545 LimitExceeded(String),
3546 /// <p>The operation conflicts with the resource's availability. For example, you attempted to recreate an existing table, or tried to delete a table currently in the <code>CREATING</code> state.</p>
3547 ResourceInUse(String),
3548 /// <p>The operation tried to access a nonexistent table or index. The resource might not be specified correctly, or its status might not be <code>ACTIVE</code>.</p>
3549 ResourceNotFound(String),
3550}
3551
3552impl DeleteTableError {
3553 pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DeleteTableError> {
3554 if let Some(err) = proto::json::Error::parse(&res) {
3555 match err.typ.as_str() {
3556 "InternalServerError" => {
3557 return RusotoError::Service(DeleteTableError::InternalServerError(err.msg))
3558 }
3559 "LimitExceededException" => {
3560 return RusotoError::Service(DeleteTableError::LimitExceeded(err.msg))
3561 }
3562 "ResourceInUseException" => {
3563 return RusotoError::Service(DeleteTableError::ResourceInUse(err.msg))
3564 }
3565 "ResourceNotFoundException" => {
3566 return RusotoError::Service(DeleteTableError::ResourceNotFound(err.msg))
3567 }
3568 "ValidationException" => return RusotoError::Validation(err.msg),
3569 _ => {}
3570 }
3571 }
3572 RusotoError::Unknown(res)
3573 }
3574}
3575impl fmt::Display for DeleteTableError {
3576 #[allow(unused_variables)]
3577 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
3578 match *self {
3579 DeleteTableError::InternalServerError(ref cause) => write!(f, "{}", cause),
3580 DeleteTableError::LimitExceeded(ref cause) => write!(f, "{}", cause),
3581 DeleteTableError::ResourceInUse(ref cause) => write!(f, "{}", cause),
3582 DeleteTableError::ResourceNotFound(ref cause) => write!(f, "{}", cause),
3583 }
3584 }
3585}
3586impl Error for DeleteTableError {}
3587/// Errors returned by DescribeBackup
3588#[derive(Debug, PartialEq)]
3589pub enum DescribeBackupError {
3590 /// <p>Backup not found for the given BackupARN. </p>
3591 BackupNotFound(String),
3592 /// <p>An error occurred on the server side.</p>
3593 InternalServerError(String),
3594}
3595
3596impl DescribeBackupError {
3597 pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DescribeBackupError> {
3598 if let Some(err) = proto::json::Error::parse(&res) {
3599 match err.typ.as_str() {
3600 "BackupNotFoundException" => {
3601 return RusotoError::Service(DescribeBackupError::BackupNotFound(err.msg))
3602 }
3603 "InternalServerError" => {
3604 return RusotoError::Service(DescribeBackupError::InternalServerError(err.msg))
3605 }
3606 "ValidationException" => return RusotoError::Validation(err.msg),
3607 _ => {}
3608 }
3609 }
3610 RusotoError::Unknown(res)
3611 }
3612}
3613impl fmt::Display for DescribeBackupError {
3614 #[allow(unused_variables)]
3615 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
3616 match *self {
3617 DescribeBackupError::BackupNotFound(ref cause) => write!(f, "{}", cause),
3618 DescribeBackupError::InternalServerError(ref cause) => write!(f, "{}", cause),
3619 }
3620 }
3621}
3622impl Error for DescribeBackupError {}
3623/// Errors returned by DescribeContinuousBackups
3624#[derive(Debug, PartialEq)]
3625pub enum DescribeContinuousBackupsError {
3626 /// <p>An error occurred on the server side.</p>
3627 InternalServerError(String),
3628 /// <p>A source table with the name <code>TableName</code> does not currently exist within the subscriber's account.</p>
3629 TableNotFound(String),
3630}
3631
3632impl DescribeContinuousBackupsError {
3633 pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DescribeContinuousBackupsError> {
3634 if let Some(err) = proto::json::Error::parse(&res) {
3635 match err.typ.as_str() {
3636 "InternalServerError" => {
3637 return RusotoError::Service(
3638 DescribeContinuousBackupsError::InternalServerError(err.msg),
3639 )
3640 }
3641 "TableNotFoundException" => {
3642 return RusotoError::Service(DescribeContinuousBackupsError::TableNotFound(
3643 err.msg,
3644 ))
3645 }
3646 "ValidationException" => return RusotoError::Validation(err.msg),
3647 _ => {}
3648 }
3649 }
3650 RusotoError::Unknown(res)
3651 }
3652}
3653impl fmt::Display for DescribeContinuousBackupsError {
3654 #[allow(unused_variables)]
3655 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
3656 match *self {
3657 DescribeContinuousBackupsError::InternalServerError(ref cause) => {
3658 write!(f, "{}", cause)
3659 }
3660 DescribeContinuousBackupsError::TableNotFound(ref cause) => write!(f, "{}", cause),
3661 }
3662 }
3663}
3664impl Error for DescribeContinuousBackupsError {}
3665/// Errors returned by DescribeContributorInsights
3666#[derive(Debug, PartialEq)]
3667pub enum DescribeContributorInsightsError {
3668 /// <p>An error occurred on the server side.</p>
3669 InternalServerError(String),
3670 /// <p>The operation tried to access a nonexistent table or index. The resource might not be specified correctly, or its status might not be <code>ACTIVE</code>.</p>
3671 ResourceNotFound(String),
3672}
3673
3674impl DescribeContributorInsightsError {
3675 pub fn from_response(
3676 res: BufferedHttpResponse,
3677 ) -> RusotoError<DescribeContributorInsightsError> {
3678 if let Some(err) = proto::json::Error::parse(&res) {
3679 match err.typ.as_str() {
3680 "InternalServerError" => {
3681 return RusotoError::Service(
3682 DescribeContributorInsightsError::InternalServerError(err.msg),
3683 )
3684 }
3685 "ResourceNotFoundException" => {
3686 return RusotoError::Service(
3687 DescribeContributorInsightsError::ResourceNotFound(err.msg),
3688 )
3689 }
3690 "ValidationException" => return RusotoError::Validation(err.msg),
3691 _ => {}
3692 }
3693 }
3694 RusotoError::Unknown(res)
3695 }
3696}
3697impl fmt::Display for DescribeContributorInsightsError {
3698 #[allow(unused_variables)]
3699 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
3700 match *self {
3701 DescribeContributorInsightsError::InternalServerError(ref cause) => {
3702 write!(f, "{}", cause)
3703 }
3704 DescribeContributorInsightsError::ResourceNotFound(ref cause) => write!(f, "{}", cause),
3705 }
3706 }
3707}
3708impl Error for DescribeContributorInsightsError {}
3709/// Errors returned by DescribeEndpoints
3710#[derive(Debug, PartialEq)]
3711pub enum DescribeEndpointsError {}
3712
3713impl DescribeEndpointsError {
3714 pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DescribeEndpointsError> {
3715 if let Some(err) = proto::json::Error::parse(&res) {
3716 match err.typ.as_str() {
3717 "ValidationException" => return RusotoError::Validation(err.msg),
3718 _ => {}
3719 }
3720 }
3721 RusotoError::Unknown(res)
3722 }
3723}
3724impl fmt::Display for DescribeEndpointsError {
3725 #[allow(unused_variables)]
3726 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
3727 match *self {}
3728 }
3729}
3730impl Error for DescribeEndpointsError {}
3731/// Errors returned by DescribeGlobalTable
3732#[derive(Debug, PartialEq)]
3733pub enum DescribeGlobalTableError {
3734 /// <p>The specified global table does not exist.</p>
3735 GlobalTableNotFound(String),
3736 /// <p>An error occurred on the server side.</p>
3737 InternalServerError(String),
3738}
3739
3740impl DescribeGlobalTableError {
3741 pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DescribeGlobalTableError> {
3742 if let Some(err) = proto::json::Error::parse(&res) {
3743 match err.typ.as_str() {
3744 "GlobalTableNotFoundException" => {
3745 return RusotoError::Service(DescribeGlobalTableError::GlobalTableNotFound(
3746 err.msg,
3747 ))
3748 }
3749 "InternalServerError" => {
3750 return RusotoError::Service(DescribeGlobalTableError::InternalServerError(
3751 err.msg,
3752 ))
3753 }
3754 "ValidationException" => return RusotoError::Validation(err.msg),
3755 _ => {}
3756 }
3757 }
3758 RusotoError::Unknown(res)
3759 }
3760}
3761impl fmt::Display for DescribeGlobalTableError {
3762 #[allow(unused_variables)]
3763 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
3764 match *self {
3765 DescribeGlobalTableError::GlobalTableNotFound(ref cause) => write!(f, "{}", cause),
3766 DescribeGlobalTableError::InternalServerError(ref cause) => write!(f, "{}", cause),
3767 }
3768 }
3769}
3770impl Error for DescribeGlobalTableError {}
3771/// Errors returned by DescribeGlobalTableSettings
3772#[derive(Debug, PartialEq)]
3773pub enum DescribeGlobalTableSettingsError {
3774 /// <p>The specified global table does not exist.</p>
3775 GlobalTableNotFound(String),
3776 /// <p>An error occurred on the server side.</p>
3777 InternalServerError(String),
3778}
3779
3780impl DescribeGlobalTableSettingsError {
3781 pub fn from_response(
3782 res: BufferedHttpResponse,
3783 ) -> RusotoError<DescribeGlobalTableSettingsError> {
3784 if let Some(err) = proto::json::Error::parse(&res) {
3785 match err.typ.as_str() {
3786 "GlobalTableNotFoundException" => {
3787 return RusotoError::Service(
3788 DescribeGlobalTableSettingsError::GlobalTableNotFound(err.msg),
3789 )
3790 }
3791 "InternalServerError" => {
3792 return RusotoError::Service(
3793 DescribeGlobalTableSettingsError::InternalServerError(err.msg),
3794 )
3795 }
3796 "ValidationException" => return RusotoError::Validation(err.msg),
3797 _ => {}
3798 }
3799 }
3800 RusotoError::Unknown(res)
3801 }
3802}
3803impl fmt::Display for DescribeGlobalTableSettingsError {
3804 #[allow(unused_variables)]
3805 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
3806 match *self {
3807 DescribeGlobalTableSettingsError::GlobalTableNotFound(ref cause) => {
3808 write!(f, "{}", cause)
3809 }
3810 DescribeGlobalTableSettingsError::InternalServerError(ref cause) => {
3811 write!(f, "{}", cause)
3812 }
3813 }
3814 }
3815}
3816impl Error for DescribeGlobalTableSettingsError {}
3817/// Errors returned by DescribeLimits
3818#[derive(Debug, PartialEq)]
3819pub enum DescribeLimitsError {
3820 /// <p>An error occurred on the server side.</p>
3821 InternalServerError(String),
3822}
3823
3824impl DescribeLimitsError {
3825 pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DescribeLimitsError> {
3826 if let Some(err) = proto::json::Error::parse(&res) {
3827 match err.typ.as_str() {
3828 "InternalServerError" => {
3829 return RusotoError::Service(DescribeLimitsError::InternalServerError(err.msg))
3830 }
3831 "ValidationException" => return RusotoError::Validation(err.msg),
3832 _ => {}
3833 }
3834 }
3835 RusotoError::Unknown(res)
3836 }
3837}
3838impl fmt::Display for DescribeLimitsError {
3839 #[allow(unused_variables)]
3840 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
3841 match *self {
3842 DescribeLimitsError::InternalServerError(ref cause) => write!(f, "{}", cause),
3843 }
3844 }
3845}
3846impl Error for DescribeLimitsError {}
3847/// Errors returned by DescribeTable
3848#[derive(Debug, PartialEq)]
3849pub enum DescribeTableError {
3850 /// <p>An error occurred on the server side.</p>
3851 InternalServerError(String),
3852 /// <p>The operation tried to access a nonexistent table or index. The resource might not be specified correctly, or its status might not be <code>ACTIVE</code>.</p>
3853 ResourceNotFound(String),
3854}
3855
3856impl DescribeTableError {
3857 pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DescribeTableError> {
3858 if let Some(err) = proto::json::Error::parse(&res) {
3859 match err.typ.as_str() {
3860 "InternalServerError" => {
3861 return RusotoError::Service(DescribeTableError::InternalServerError(err.msg))
3862 }
3863 "ResourceNotFoundException" => {
3864 return RusotoError::Service(DescribeTableError::ResourceNotFound(err.msg))
3865 }
3866 "ValidationException" => return RusotoError::Validation(err.msg),
3867 _ => {}
3868 }
3869 }
3870 RusotoError::Unknown(res)
3871 }
3872}
3873impl fmt::Display for DescribeTableError {
3874 #[allow(unused_variables)]
3875 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
3876 match *self {
3877 DescribeTableError::InternalServerError(ref cause) => write!(f, "{}", cause),
3878 DescribeTableError::ResourceNotFound(ref cause) => write!(f, "{}", cause),
3879 }
3880 }
3881}
3882impl Error for DescribeTableError {}
3883/// Errors returned by DescribeTableReplicaAutoScaling
3884#[derive(Debug, PartialEq)]
3885pub enum DescribeTableReplicaAutoScalingError {
3886 /// <p>An error occurred on the server side.</p>
3887 InternalServerError(String),
3888 /// <p>The operation tried to access a nonexistent table or index. The resource might not be specified correctly, or its status might not be <code>ACTIVE</code>.</p>
3889 ResourceNotFound(String),
3890}
3891
3892impl DescribeTableReplicaAutoScalingError {
3893 pub fn from_response(
3894 res: BufferedHttpResponse,
3895 ) -> RusotoError<DescribeTableReplicaAutoScalingError> {
3896 if let Some(err) = proto::json::Error::parse(&res) {
3897 match err.typ.as_str() {
3898 "InternalServerError" => {
3899 return RusotoError::Service(
3900 DescribeTableReplicaAutoScalingError::InternalServerError(err.msg),
3901 )
3902 }
3903 "ResourceNotFoundException" => {
3904 return RusotoError::Service(
3905 DescribeTableReplicaAutoScalingError::ResourceNotFound(err.msg),
3906 )
3907 }
3908 "ValidationException" => return RusotoError::Validation(err.msg),
3909 _ => {}
3910 }
3911 }
3912 RusotoError::Unknown(res)
3913 }
3914}
3915impl fmt::Display for DescribeTableReplicaAutoScalingError {
3916 #[allow(unused_variables)]
3917 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
3918 match *self {
3919 DescribeTableReplicaAutoScalingError::InternalServerError(ref cause) => {
3920 write!(f, "{}", cause)
3921 }
3922 DescribeTableReplicaAutoScalingError::ResourceNotFound(ref cause) => {
3923 write!(f, "{}", cause)
3924 }
3925 }
3926 }
3927}
3928impl Error for DescribeTableReplicaAutoScalingError {}
3929/// Errors returned by DescribeTimeToLive
3930#[derive(Debug, PartialEq)]
3931pub enum DescribeTimeToLiveError {
3932 /// <p>An error occurred on the server side.</p>
3933 InternalServerError(String),
3934 /// <p>The operation tried to access a nonexistent table or index. The resource might not be specified correctly, or its status might not be <code>ACTIVE</code>.</p>
3935 ResourceNotFound(String),
3936}
3937
3938impl DescribeTimeToLiveError {
3939 pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DescribeTimeToLiveError> {
3940 if let Some(err) = proto::json::Error::parse(&res) {
3941 match err.typ.as_str() {
3942 "InternalServerError" => {
3943 return RusotoError::Service(DescribeTimeToLiveError::InternalServerError(
3944 err.msg,
3945 ))
3946 }
3947 "ResourceNotFoundException" => {
3948 return RusotoError::Service(DescribeTimeToLiveError::ResourceNotFound(err.msg))
3949 }
3950 "ValidationException" => return RusotoError::Validation(err.msg),
3951 _ => {}
3952 }
3953 }
3954 RusotoError::Unknown(res)
3955 }
3956}
3957impl fmt::Display for DescribeTimeToLiveError {
3958 #[allow(unused_variables)]
3959 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
3960 match *self {
3961 DescribeTimeToLiveError::InternalServerError(ref cause) => write!(f, "{}", cause),
3962 DescribeTimeToLiveError::ResourceNotFound(ref cause) => write!(f, "{}", cause),
3963 }
3964 }
3965}
3966impl Error for DescribeTimeToLiveError {}
3967/// Errors returned by GetItem
3968#[derive(Debug, PartialEq)]
3969pub enum GetItemError {
3970 /// <p>An error occurred on the server side.</p>
3971 InternalServerError(String),
3972 /// <p>Your request rate is too high. The AWS SDKs for DynamoDB automatically retry requests that receive this exception. Your request is eventually successful, unless your retry queue is too large to finish. Reduce the frequency of requests and use exponential backoff. For more information, go to <a href="https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Programming.Errors.html#Programming.Errors.RetryAndBackoff">Error Retries and Exponential Backoff</a> in the <i>Amazon DynamoDB Developer Guide</i>.</p>
3973 ProvisionedThroughputExceeded(String),
3974 /// <p>Throughput exceeds the current throughput limit for your account. Please contact AWS Support at <a href="https://aws.amazon.com/support">AWS Support</a> to request a limit increase.</p>
3975 RequestLimitExceeded(String),
3976 /// <p>The operation tried to access a nonexistent table or index. The resource might not be specified correctly, or its status might not be <code>ACTIVE</code>.</p>
3977 ResourceNotFound(String),
3978}
3979
3980impl GetItemError {
3981 pub fn from_response(res: BufferedHttpResponse) -> RusotoError<GetItemError> {
3982 if let Some(err) = proto::json::Error::parse(&res) {
3983 match err.typ.as_str() {
3984 "InternalServerError" => {
3985 return RusotoError::Service(GetItemError::InternalServerError(err.msg))
3986 }
3987 "ProvisionedThroughputExceededException" => {
3988 return RusotoError::Service(GetItemError::ProvisionedThroughputExceeded(
3989 err.msg,
3990 ))
3991 }
3992 "RequestLimitExceeded" => {
3993 return RusotoError::Service(GetItemError::RequestLimitExceeded(err.msg))
3994 }
3995 "ResourceNotFoundException" => {
3996 return RusotoError::Service(GetItemError::ResourceNotFound(err.msg))
3997 }
3998 "ValidationException" => return RusotoError::Validation(err.msg),
3999 _ => {}
4000 }
4001 }
4002 RusotoError::Unknown(res)
4003 }
4004}
4005impl fmt::Display for GetItemError {
4006 #[allow(unused_variables)]
4007 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
4008 match *self {
4009 GetItemError::InternalServerError(ref cause) => write!(f, "{}", cause),
4010 GetItemError::ProvisionedThroughputExceeded(ref cause) => write!(f, "{}", cause),
4011 GetItemError::RequestLimitExceeded(ref cause) => write!(f, "{}", cause),
4012 GetItemError::ResourceNotFound(ref cause) => write!(f, "{}", cause),
4013 }
4014 }
4015}
4016impl Error for GetItemError {}
4017/// Errors returned by ListBackups
4018#[derive(Debug, PartialEq)]
4019pub enum ListBackupsError {
4020 /// <p>An error occurred on the server side.</p>
4021 InternalServerError(String),
4022}
4023
4024impl ListBackupsError {
4025 pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ListBackupsError> {
4026 if let Some(err) = proto::json::Error::parse(&res) {
4027 match err.typ.as_str() {
4028 "InternalServerError" => {
4029 return RusotoError::Service(ListBackupsError::InternalServerError(err.msg))
4030 }
4031 "ValidationException" => return RusotoError::Validation(err.msg),
4032 _ => {}
4033 }
4034 }
4035 RusotoError::Unknown(res)
4036 }
4037}
4038impl fmt::Display for ListBackupsError {
4039 #[allow(unused_variables)]
4040 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
4041 match *self {
4042 ListBackupsError::InternalServerError(ref cause) => write!(f, "{}", cause),
4043 }
4044 }
4045}
4046impl Error for ListBackupsError {}
4047/// Errors returned by ListContributorInsights
4048#[derive(Debug, PartialEq)]
4049pub enum ListContributorInsightsError {
4050 /// <p>An error occurred on the server side.</p>
4051 InternalServerError(String),
4052 /// <p>The operation tried to access a nonexistent table or index. The resource might not be specified correctly, or its status might not be <code>ACTIVE</code>.</p>
4053 ResourceNotFound(String),
4054}
4055
4056impl ListContributorInsightsError {
4057 pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ListContributorInsightsError> {
4058 if let Some(err) = proto::json::Error::parse(&res) {
4059 match err.typ.as_str() {
4060 "InternalServerError" => {
4061 return RusotoError::Service(ListContributorInsightsError::InternalServerError(
4062 err.msg,
4063 ))
4064 }
4065 "ResourceNotFoundException" => {
4066 return RusotoError::Service(ListContributorInsightsError::ResourceNotFound(
4067 err.msg,
4068 ))
4069 }
4070 "ValidationException" => return RusotoError::Validation(err.msg),
4071 _ => {}
4072 }
4073 }
4074 RusotoError::Unknown(res)
4075 }
4076}
4077impl fmt::Display for ListContributorInsightsError {
4078 #[allow(unused_variables)]
4079 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
4080 match *self {
4081 ListContributorInsightsError::InternalServerError(ref cause) => write!(f, "{}", cause),
4082 ListContributorInsightsError::ResourceNotFound(ref cause) => write!(f, "{}", cause),
4083 }
4084 }
4085}
4086impl Error for ListContributorInsightsError {}
4087/// Errors returned by ListGlobalTables
4088#[derive(Debug, PartialEq)]
4089pub enum ListGlobalTablesError {
4090 /// <p>An error occurred on the server side.</p>
4091 InternalServerError(String),
4092}
4093
4094impl ListGlobalTablesError {
4095 pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ListGlobalTablesError> {
4096 if let Some(err) = proto::json::Error::parse(&res) {
4097 match err.typ.as_str() {
4098 "InternalServerError" => {
4099 return RusotoError::Service(ListGlobalTablesError::InternalServerError(
4100 err.msg,
4101 ))
4102 }
4103 "ValidationException" => return RusotoError::Validation(err.msg),
4104 _ => {}
4105 }
4106 }
4107 RusotoError::Unknown(res)
4108 }
4109}
4110impl fmt::Display for ListGlobalTablesError {
4111 #[allow(unused_variables)]
4112 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
4113 match *self {
4114 ListGlobalTablesError::InternalServerError(ref cause) => write!(f, "{}", cause),
4115 }
4116 }
4117}
4118impl Error for ListGlobalTablesError {}
4119/// Errors returned by ListTables
4120#[derive(Debug, PartialEq)]
4121pub enum ListTablesError {
4122 /// <p>An error occurred on the server side.</p>
4123 InternalServerError(String),
4124}
4125
4126impl ListTablesError {
4127 pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ListTablesError> {
4128 if let Some(err) = proto::json::Error::parse(&res) {
4129 match err.typ.as_str() {
4130 "InternalServerError" => {
4131 return RusotoError::Service(ListTablesError::InternalServerError(err.msg))
4132 }
4133 "ValidationException" => return RusotoError::Validation(err.msg),
4134 _ => {}
4135 }
4136 }
4137 RusotoError::Unknown(res)
4138 }
4139}
4140impl fmt::Display for ListTablesError {
4141 #[allow(unused_variables)]
4142 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
4143 match *self {
4144 ListTablesError::InternalServerError(ref cause) => write!(f, "{}", cause),
4145 }
4146 }
4147}
4148impl Error for ListTablesError {}
4149/// Errors returned by ListTagsOfResource
4150#[derive(Debug, PartialEq)]
4151pub enum ListTagsOfResourceError {
4152 /// <p>An error occurred on the server side.</p>
4153 InternalServerError(String),
4154 /// <p>The operation tried to access a nonexistent table or index. The resource might not be specified correctly, or its status might not be <code>ACTIVE</code>.</p>
4155 ResourceNotFound(String),
4156}
4157
4158impl ListTagsOfResourceError {
4159 pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ListTagsOfResourceError> {
4160 if let Some(err) = proto::json::Error::parse(&res) {
4161 match err.typ.as_str() {
4162 "InternalServerError" => {
4163 return RusotoError::Service(ListTagsOfResourceError::InternalServerError(
4164 err.msg,
4165 ))
4166 }
4167 "ResourceNotFoundException" => {
4168 return RusotoError::Service(ListTagsOfResourceError::ResourceNotFound(err.msg))
4169 }
4170 "ValidationException" => return RusotoError::Validation(err.msg),
4171 _ => {}
4172 }
4173 }
4174 RusotoError::Unknown(res)
4175 }
4176}
4177impl fmt::Display for ListTagsOfResourceError {
4178 #[allow(unused_variables)]
4179 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
4180 match *self {
4181 ListTagsOfResourceError::InternalServerError(ref cause) => write!(f, "{}", cause),
4182 ListTagsOfResourceError::ResourceNotFound(ref cause) => write!(f, "{}", cause),
4183 }
4184 }
4185}
4186impl Error for ListTagsOfResourceError {}
4187/// Errors returned by PutItem
4188#[derive(Debug, PartialEq)]
4189pub enum PutItemError {
4190 /// <p>A condition specified in the operation could not be evaluated.</p>
4191 ConditionalCheckFailed(String),
4192 /// <p>An error occurred on the server side.</p>
4193 InternalServerError(String),
4194 /// <p>An item collection is too large. This exception is only returned for tables that have one or more local secondary indexes.</p>
4195 ItemCollectionSizeLimitExceeded(String),
4196 /// <p>Your request rate is too high. The AWS SDKs for DynamoDB automatically retry requests that receive this exception. Your request is eventually successful, unless your retry queue is too large to finish. Reduce the frequency of requests and use exponential backoff. For more information, go to <a href="https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Programming.Errors.html#Programming.Errors.RetryAndBackoff">Error Retries and Exponential Backoff</a> in the <i>Amazon DynamoDB Developer Guide</i>.</p>
4197 ProvisionedThroughputExceeded(String),
4198 /// <p>Throughput exceeds the current throughput limit for your account. Please contact AWS Support at <a href="https://aws.amazon.com/support">AWS Support</a> to request a limit increase.</p>
4199 RequestLimitExceeded(String),
4200 /// <p>The operation tried to access a nonexistent table or index. The resource might not be specified correctly, or its status might not be <code>ACTIVE</code>.</p>
4201 ResourceNotFound(String),
4202 /// <p>Operation was rejected because there is an ongoing transaction for the item.</p>
4203 TransactionConflict(String),
4204}
4205
4206impl PutItemError {
4207 pub fn from_response(res: BufferedHttpResponse) -> RusotoError<PutItemError> {
4208 if let Some(err) = proto::json::Error::parse(&res) {
4209 match err.typ.as_str() {
4210 "ConditionalCheckFailedException" => {
4211 return RusotoError::Service(PutItemError::ConditionalCheckFailed(err.msg))
4212 }
4213 "InternalServerError" => {
4214 return RusotoError::Service(PutItemError::InternalServerError(err.msg))
4215 }
4216 "ItemCollectionSizeLimitExceededException" => {
4217 return RusotoError::Service(PutItemError::ItemCollectionSizeLimitExceeded(
4218 err.msg,
4219 ))
4220 }
4221 "ProvisionedThroughputExceededException" => {
4222 return RusotoError::Service(PutItemError::ProvisionedThroughputExceeded(
4223 err.msg,
4224 ))
4225 }
4226 "RequestLimitExceeded" => {
4227 return RusotoError::Service(PutItemError::RequestLimitExceeded(err.msg))
4228 }
4229 "ResourceNotFoundException" => {
4230 return RusotoError::Service(PutItemError::ResourceNotFound(err.msg))
4231 }
4232 "TransactionConflictException" => {
4233 return RusotoError::Service(PutItemError::TransactionConflict(err.msg))
4234 }
4235 "ValidationException" => return RusotoError::Validation(err.msg),
4236 _ => {}
4237 }
4238 }
4239 RusotoError::Unknown(res)
4240 }
4241}
4242impl fmt::Display for PutItemError {
4243 #[allow(unused_variables)]
4244 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
4245 match *self {
4246 PutItemError::ConditionalCheckFailed(ref cause) => write!(f, "{}", cause),
4247 PutItemError::InternalServerError(ref cause) => write!(f, "{}", cause),
4248 PutItemError::ItemCollectionSizeLimitExceeded(ref cause) => write!(f, "{}", cause),
4249 PutItemError::ProvisionedThroughputExceeded(ref cause) => write!(f, "{}", cause),
4250 PutItemError::RequestLimitExceeded(ref cause) => write!(f, "{}", cause),
4251 PutItemError::ResourceNotFound(ref cause) => write!(f, "{}", cause),
4252 PutItemError::TransactionConflict(ref cause) => write!(f, "{}", cause),
4253 }
4254 }
4255}
4256impl Error for PutItemError {}
4257/// Errors returned by Query
4258#[derive(Debug, PartialEq)]
4259pub enum QueryError {
4260 /// <p>An error occurred on the server side.</p>
4261 InternalServerError(String),
4262 /// <p>Your request rate is too high. The AWS SDKs for DynamoDB automatically retry requests that receive this exception. Your request is eventually successful, unless your retry queue is too large to finish. Reduce the frequency of requests and use exponential backoff. For more information, go to <a href="https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Programming.Errors.html#Programming.Errors.RetryAndBackoff">Error Retries and Exponential Backoff</a> in the <i>Amazon DynamoDB Developer Guide</i>.</p>
4263 ProvisionedThroughputExceeded(String),
4264 /// <p>Throughput exceeds the current throughput limit for your account. Please contact AWS Support at <a href="https://aws.amazon.com/support">AWS Support</a> to request a limit increase.</p>
4265 RequestLimitExceeded(String),
4266 /// <p>The operation tried to access a nonexistent table or index. The resource might not be specified correctly, or its status might not be <code>ACTIVE</code>.</p>
4267 ResourceNotFound(String),
4268}
4269
4270impl QueryError {
4271 pub fn from_response(res: BufferedHttpResponse) -> RusotoError<QueryError> {
4272 if let Some(err) = proto::json::Error::parse(&res) {
4273 match err.typ.as_str() {
4274 "InternalServerError" => {
4275 return RusotoError::Service(QueryError::InternalServerError(err.msg))
4276 }
4277 "ProvisionedThroughputExceededException" => {
4278 return RusotoError::Service(QueryError::ProvisionedThroughputExceeded(err.msg))
4279 }
4280 "RequestLimitExceeded" => {
4281 return RusotoError::Service(QueryError::RequestLimitExceeded(err.msg))
4282 }
4283 "ResourceNotFoundException" => {
4284 return RusotoError::Service(QueryError::ResourceNotFound(err.msg))
4285 }
4286 "ValidationException" => return RusotoError::Validation(err.msg),
4287 _ => {}
4288 }
4289 }
4290 RusotoError::Unknown(res)
4291 }
4292}
4293impl fmt::Display for QueryError {
4294 #[allow(unused_variables)]
4295 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
4296 match *self {
4297 QueryError::InternalServerError(ref cause) => write!(f, "{}", cause),
4298 QueryError::ProvisionedThroughputExceeded(ref cause) => write!(f, "{}", cause),
4299 QueryError::RequestLimitExceeded(ref cause) => write!(f, "{}", cause),
4300 QueryError::ResourceNotFound(ref cause) => write!(f, "{}", cause),
4301 }
4302 }
4303}
4304impl Error for QueryError {}
4305/// Errors returned by RestoreTableFromBackup
4306#[derive(Debug, PartialEq)]
4307pub enum RestoreTableFromBackupError {
4308 /// <p>There is another ongoing conflicting backup control plane operation on the table. The backup is either being created, deleted or restored to a table.</p>
4309 BackupInUse(String),
4310 /// <p>Backup not found for the given BackupARN. </p>
4311 BackupNotFound(String),
4312 /// <p>An error occurred on the server side.</p>
4313 InternalServerError(String),
4314 /// <p>There is no limit to the number of daily on-demand backups that can be taken. </p> <p>Up to 50 simultaneous table operations are allowed per account. These operations include <code>CreateTable</code>, <code>UpdateTable</code>, <code>DeleteTable</code>,<code>UpdateTimeToLive</code>, <code>RestoreTableFromBackup</code>, and <code>RestoreTableToPointInTime</code>. </p> <p>The only exception is when you are creating a table with one or more secondary indexes. You can have up to 25 such requests running at a time; however, if the table or index specifications are complex, DynamoDB might temporarily reduce the number of concurrent operations.</p> <p>There is a soft account limit of 256 tables.</p>
4315 LimitExceeded(String),
4316 /// <p>A target table with the specified name already exists. </p>
4317 TableAlreadyExists(String),
4318 /// <p>A target table with the specified name is either being created or deleted. </p>
4319 TableInUse(String),
4320}
4321
4322impl RestoreTableFromBackupError {
4323 pub fn from_response(res: BufferedHttpResponse) -> RusotoError<RestoreTableFromBackupError> {
4324 if let Some(err) = proto::json::Error::parse(&res) {
4325 match err.typ.as_str() {
4326 "BackupInUseException" => {
4327 return RusotoError::Service(RestoreTableFromBackupError::BackupInUse(err.msg))
4328 }
4329 "BackupNotFoundException" => {
4330 return RusotoError::Service(RestoreTableFromBackupError::BackupNotFound(
4331 err.msg,
4332 ))
4333 }
4334 "InternalServerError" => {
4335 return RusotoError::Service(RestoreTableFromBackupError::InternalServerError(
4336 err.msg,
4337 ))
4338 }
4339 "LimitExceededException" => {
4340 return RusotoError::Service(RestoreTableFromBackupError::LimitExceeded(
4341 err.msg,
4342 ))
4343 }
4344 "TableAlreadyExistsException" => {
4345 return RusotoError::Service(RestoreTableFromBackupError::TableAlreadyExists(
4346 err.msg,
4347 ))
4348 }
4349 "TableInUseException" => {
4350 return RusotoError::Service(RestoreTableFromBackupError::TableInUse(err.msg))
4351 }
4352 "ValidationException" => return RusotoError::Validation(err.msg),
4353 _ => {}
4354 }
4355 }
4356 RusotoError::Unknown(res)
4357 }
4358}
4359impl fmt::Display for RestoreTableFromBackupError {
4360 #[allow(unused_variables)]
4361 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
4362 match *self {
4363 RestoreTableFromBackupError::BackupInUse(ref cause) => write!(f, "{}", cause),
4364 RestoreTableFromBackupError::BackupNotFound(ref cause) => write!(f, "{}", cause),
4365 RestoreTableFromBackupError::InternalServerError(ref cause) => write!(f, "{}", cause),
4366 RestoreTableFromBackupError::LimitExceeded(ref cause) => write!(f, "{}", cause),
4367 RestoreTableFromBackupError::TableAlreadyExists(ref cause) => write!(f, "{}", cause),
4368 RestoreTableFromBackupError::TableInUse(ref cause) => write!(f, "{}", cause),
4369 }
4370 }
4371}
4372impl Error for RestoreTableFromBackupError {}
4373/// Errors returned by RestoreTableToPointInTime
4374#[derive(Debug, PartialEq)]
4375pub enum RestoreTableToPointInTimeError {
4376 /// <p>An error occurred on the server side.</p>
4377 InternalServerError(String),
4378 /// <p>An invalid restore time was specified. RestoreDateTime must be between EarliestRestorableDateTime and LatestRestorableDateTime.</p>
4379 InvalidRestoreTime(String),
4380 /// <p>There is no limit to the number of daily on-demand backups that can be taken. </p> <p>Up to 50 simultaneous table operations are allowed per account. These operations include <code>CreateTable</code>, <code>UpdateTable</code>, <code>DeleteTable</code>,<code>UpdateTimeToLive</code>, <code>RestoreTableFromBackup</code>, and <code>RestoreTableToPointInTime</code>. </p> <p>The only exception is when you are creating a table with one or more secondary indexes. You can have up to 25 such requests running at a time; however, if the table or index specifications are complex, DynamoDB might temporarily reduce the number of concurrent operations.</p> <p>There is a soft account limit of 256 tables.</p>
4381 LimitExceeded(String),
4382 /// <p>Point in time recovery has not yet been enabled for this source table.</p>
4383 PointInTimeRecoveryUnavailable(String),
4384 /// <p>A target table with the specified name already exists. </p>
4385 TableAlreadyExists(String),
4386 /// <p>A target table with the specified name is either being created or deleted. </p>
4387 TableInUse(String),
4388 /// <p>A source table with the name <code>TableName</code> does not currently exist within the subscriber's account.</p>
4389 TableNotFound(String),
4390}
4391
4392impl RestoreTableToPointInTimeError {
4393 pub fn from_response(res: BufferedHttpResponse) -> RusotoError<RestoreTableToPointInTimeError> {
4394 if let Some(err) = proto::json::Error::parse(&res) {
4395 match err.typ.as_str() {
4396 "InternalServerError" => {
4397 return RusotoError::Service(
4398 RestoreTableToPointInTimeError::InternalServerError(err.msg),
4399 )
4400 }
4401 "InvalidRestoreTimeException" => {
4402 return RusotoError::Service(
4403 RestoreTableToPointInTimeError::InvalidRestoreTime(err.msg),
4404 )
4405 }
4406 "LimitExceededException" => {
4407 return RusotoError::Service(RestoreTableToPointInTimeError::LimitExceeded(
4408 err.msg,
4409 ))
4410 }
4411 "PointInTimeRecoveryUnavailableException" => {
4412 return RusotoError::Service(
4413 RestoreTableToPointInTimeError::PointInTimeRecoveryUnavailable(err.msg),
4414 )
4415 }
4416 "TableAlreadyExistsException" => {
4417 return RusotoError::Service(
4418 RestoreTableToPointInTimeError::TableAlreadyExists(err.msg),
4419 )
4420 }
4421 "TableInUseException" => {
4422 return RusotoError::Service(RestoreTableToPointInTimeError::TableInUse(
4423 err.msg,
4424 ))
4425 }
4426 "TableNotFoundException" => {
4427 return RusotoError::Service(RestoreTableToPointInTimeError::TableNotFound(
4428 err.msg,
4429 ))
4430 }
4431 "ValidationException" => return RusotoError::Validation(err.msg),
4432 _ => {}
4433 }
4434 }
4435 RusotoError::Unknown(res)
4436 }
4437}
4438impl fmt::Display for RestoreTableToPointInTimeError {
4439 #[allow(unused_variables)]
4440 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
4441 match *self {
4442 RestoreTableToPointInTimeError::InternalServerError(ref cause) => {
4443 write!(f, "{}", cause)
4444 }
4445 RestoreTableToPointInTimeError::InvalidRestoreTime(ref cause) => write!(f, "{}", cause),
4446 RestoreTableToPointInTimeError::LimitExceeded(ref cause) => write!(f, "{}", cause),
4447 RestoreTableToPointInTimeError::PointInTimeRecoveryUnavailable(ref cause) => {
4448 write!(f, "{}", cause)
4449 }
4450 RestoreTableToPointInTimeError::TableAlreadyExists(ref cause) => write!(f, "{}", cause),
4451 RestoreTableToPointInTimeError::TableInUse(ref cause) => write!(f, "{}", cause),
4452 RestoreTableToPointInTimeError::TableNotFound(ref cause) => write!(f, "{}", cause),
4453 }
4454 }
4455}
4456impl Error for RestoreTableToPointInTimeError {}
4457/// Errors returned by Scan
4458#[derive(Debug, PartialEq)]
4459pub enum ScanError {
4460 /// <p>An error occurred on the server side.</p>
4461 InternalServerError(String),
4462 /// <p>Your request rate is too high. The AWS SDKs for DynamoDB automatically retry requests that receive this exception. Your request is eventually successful, unless your retry queue is too large to finish. Reduce the frequency of requests and use exponential backoff. For more information, go to <a href="https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Programming.Errors.html#Programming.Errors.RetryAndBackoff">Error Retries and Exponential Backoff</a> in the <i>Amazon DynamoDB Developer Guide</i>.</p>
4463 ProvisionedThroughputExceeded(String),
4464 /// <p>Throughput exceeds the current throughput limit for your account. Please contact AWS Support at <a href="https://aws.amazon.com/support">AWS Support</a> to request a limit increase.</p>
4465 RequestLimitExceeded(String),
4466 /// <p>The operation tried to access a nonexistent table or index. The resource might not be specified correctly, or its status might not be <code>ACTIVE</code>.</p>
4467 ResourceNotFound(String),
4468}
4469
4470impl ScanError {
4471 pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ScanError> {
4472 if let Some(err) = proto::json::Error::parse(&res) {
4473 match err.typ.as_str() {
4474 "InternalServerError" => {
4475 return RusotoError::Service(ScanError::InternalServerError(err.msg))
4476 }
4477 "ProvisionedThroughputExceededException" => {
4478 return RusotoError::Service(ScanError::ProvisionedThroughputExceeded(err.msg))
4479 }
4480 "RequestLimitExceeded" => {
4481 return RusotoError::Service(ScanError::RequestLimitExceeded(err.msg))
4482 }
4483 "ResourceNotFoundException" => {
4484 return RusotoError::Service(ScanError::ResourceNotFound(err.msg))
4485 }
4486 "ValidationException" => return RusotoError::Validation(err.msg),
4487 _ => {}
4488 }
4489 }
4490 RusotoError::Unknown(res)
4491 }
4492}
4493impl fmt::Display for ScanError {
4494 #[allow(unused_variables)]
4495 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
4496 match *self {
4497 ScanError::InternalServerError(ref cause) => write!(f, "{}", cause),
4498 ScanError::ProvisionedThroughputExceeded(ref cause) => write!(f, "{}", cause),
4499 ScanError::RequestLimitExceeded(ref cause) => write!(f, "{}", cause),
4500 ScanError::ResourceNotFound(ref cause) => write!(f, "{}", cause),
4501 }
4502 }
4503}
4504impl Error for ScanError {}
4505/// Errors returned by TagResource
4506#[derive(Debug, PartialEq)]
4507pub enum TagResourceError {
4508 /// <p>An error occurred on the server side.</p>
4509 InternalServerError(String),
4510 /// <p>There is no limit to the number of daily on-demand backups that can be taken. </p> <p>Up to 50 simultaneous table operations are allowed per account. These operations include <code>CreateTable</code>, <code>UpdateTable</code>, <code>DeleteTable</code>,<code>UpdateTimeToLive</code>, <code>RestoreTableFromBackup</code>, and <code>RestoreTableToPointInTime</code>. </p> <p>The only exception is when you are creating a table with one or more secondary indexes. You can have up to 25 such requests running at a time; however, if the table or index specifications are complex, DynamoDB might temporarily reduce the number of concurrent operations.</p> <p>There is a soft account limit of 256 tables.</p>
4511 LimitExceeded(String),
4512 /// <p>The operation conflicts with the resource's availability. For example, you attempted to recreate an existing table, or tried to delete a table currently in the <code>CREATING</code> state.</p>
4513 ResourceInUse(String),
4514 /// <p>The operation tried to access a nonexistent table or index. The resource might not be specified correctly, or its status might not be <code>ACTIVE</code>.</p>
4515 ResourceNotFound(String),
4516}
4517
4518impl TagResourceError {
4519 pub fn from_response(res: BufferedHttpResponse) -> RusotoError<TagResourceError> {
4520 if let Some(err) = proto::json::Error::parse(&res) {
4521 match err.typ.as_str() {
4522 "InternalServerError" => {
4523 return RusotoError::Service(TagResourceError::InternalServerError(err.msg))
4524 }
4525 "LimitExceededException" => {
4526 return RusotoError::Service(TagResourceError::LimitExceeded(err.msg))
4527 }
4528 "ResourceInUseException" => {
4529 return RusotoError::Service(TagResourceError::ResourceInUse(err.msg))
4530 }
4531 "ResourceNotFoundException" => {
4532 return RusotoError::Service(TagResourceError::ResourceNotFound(err.msg))
4533 }
4534 "ValidationException" => return RusotoError::Validation(err.msg),
4535 _ => {}
4536 }
4537 }
4538 RusotoError::Unknown(res)
4539 }
4540}
4541impl fmt::Display for TagResourceError {
4542 #[allow(unused_variables)]
4543 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
4544 match *self {
4545 TagResourceError::InternalServerError(ref cause) => write!(f, "{}", cause),
4546 TagResourceError::LimitExceeded(ref cause) => write!(f, "{}", cause),
4547 TagResourceError::ResourceInUse(ref cause) => write!(f, "{}", cause),
4548 TagResourceError::ResourceNotFound(ref cause) => write!(f, "{}", cause),
4549 }
4550 }
4551}
4552impl Error for TagResourceError {}
4553/// Errors returned by TransactGetItems
4554#[derive(Debug, PartialEq)]
4555pub enum TransactGetItemsError {
4556 /// <p>An error occurred on the server side.</p>
4557 InternalServerError(String),
4558 /// <p>Your request rate is too high. The AWS SDKs for DynamoDB automatically retry requests that receive this exception. Your request is eventually successful, unless your retry queue is too large to finish. Reduce the frequency of requests and use exponential backoff. For more information, go to <a href="https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Programming.Errors.html#Programming.Errors.RetryAndBackoff">Error Retries and Exponential Backoff</a> in the <i>Amazon DynamoDB Developer Guide</i>.</p>
4559 ProvisionedThroughputExceeded(String),
4560 /// <p>Throughput exceeds the current throughput limit for your account. Please contact AWS Support at <a href="https://aws.amazon.com/support">AWS Support</a> to request a limit increase.</p>
4561 RequestLimitExceeded(String),
4562 /// <p>The operation tried to access a nonexistent table or index. The resource might not be specified correctly, or its status might not be <code>ACTIVE</code>.</p>
4563 ResourceNotFound(String),
4564 /// <p><p>The entire transaction request was canceled.</p> <p>DynamoDB cancels a <code>TransactWriteItems</code> request under the following circumstances:</p> <ul> <li> <p>A condition in one of the condition expressions is not met.</p> </li> <li> <p>A table in the <code>TransactWriteItems</code> request is in a different account or region.</p> </li> <li> <p>More than one action in the <code>TransactWriteItems</code> operation targets the same item.</p> </li> <li> <p>There is insufficient provisioned capacity for the transaction to be completed.</p> </li> <li> <p>An item size becomes too large (larger than 400 KB), or a local secondary index (LSI) becomes too large, or a similar validation error occurs because of changes made by the transaction.</p> </li> <li> <p>There is a user error, such as an invalid data format.</p> </li> </ul> <p>DynamoDB cancels a <code>TransactGetItems</code> request under the following circumstances:</p> <ul> <li> <p>There is an ongoing <code>TransactGetItems</code> operation that conflicts with a concurrent <code>PutItem</code>, <code>UpdateItem</code>, <code>DeleteItem</code> or <code>TransactWriteItems</code> request. In this case the <code>TransactGetItems</code> operation fails with a <code>TransactionCanceledException</code>.</p> </li> <li> <p>A table in the <code>TransactGetItems</code> request is in a different account or region.</p> </li> <li> <p>There is insufficient provisioned capacity for the transaction to be completed.</p> </li> <li> <p>There is a user error, such as an invalid data format.</p> </li> </ul> <note> <p>If using Java, DynamoDB lists the cancellation reasons on the <code>CancellationReasons</code> property. This property is not set for other languages. Transaction cancellation reasons are ordered in the order of requested items, if an item has no error it will have <code>NONE</code> code and <code>Null</code> message.</p> </note> <p>Cancellation reason codes and possible error messages:</p> <ul> <li> <p>No Errors:</p> <ul> <li> <p>Code: <code>NONE</code> </p> </li> <li> <p>Message: <code>null</code> </p> </li> </ul> </li> <li> <p>Conditional Check Failed:</p> <ul> <li> <p>Code: <code>ConditionalCheckFailed</code> </p> </li> <li> <p>Message: The conditional request failed. </p> </li> </ul> </li> <li> <p>Item Collection Size Limit Exceeded:</p> <ul> <li> <p>Code: <code>ItemCollectionSizeLimitExceeded</code> </p> </li> <li> <p>Message: Collection size exceeded.</p> </li> </ul> </li> <li> <p>Transaction Conflict:</p> <ul> <li> <p>Code: <code>TransactionConflict</code> </p> </li> <li> <p>Message: Transaction is ongoing for the item.</p> </li> </ul> </li> <li> <p>Provisioned Throughput Exceeded:</p> <ul> <li> <p>Code: <code>ProvisionedThroughputExceeded</code> </p> </li> <li> <p>Messages: </p> <ul> <li> <p>The level of configured provisioned throughput for the table was exceeded. Consider increasing your provisioning level with the UpdateTable API.</p> <note> <p>This Message is received when provisioned throughput is exceeded is on a provisioned DynamoDB table.</p> </note> </li> <li> <p>The level of configured provisioned throughput for one or more global secondary indexes of the table was exceeded. Consider increasing your provisioning level for the under-provisioned global secondary indexes with the UpdateTable API.</p> <note> <p>This message is returned when provisioned throughput is exceeded is on a provisioned GSI.</p> </note> </li> </ul> </li> </ul> </li> <li> <p>Throttling Error:</p> <ul> <li> <p>Code: <code>ThrottlingError</code> </p> </li> <li> <p>Messages: </p> <ul> <li> <p>Throughput exceeds the current capacity of your table or index. DynamoDB is automatically scaling your table or index so please try again shortly. If exceptions persist, check if you have a hot key: https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/bp-partition-key-design.html.</p> <note> <p>This message is returned when writes get throttled on an On-Demand table as DynamoDB is automatically scaling the table.</p> </note> </li> <li> <p>Throughput exceeds the current capacity for one or more global secondary indexes. DynamoDB is automatically scaling your index so please try again shortly.</p> <note> <p>This message is returned when when writes get throttled on an On-Demand GSI as DynamoDB is automatically scaling the GSI.</p> </note> </li> </ul> </li> </ul> </li> <li> <p>Validation Error:</p> <ul> <li> <p>Code: <code>ValidationError</code> </p> </li> <li> <p>Messages: </p> <ul> <li> <p>One or more parameter values were invalid.</p> </li> <li> <p>The update expression attempted to update the secondary index key beyond allowed size limits.</p> </li> <li> <p>The update expression attempted to update the secondary index key to unsupported type.</p> </li> <li> <p>An operand in the update expression has an incorrect data type.</p> </li> <li> <p>Item size to update has exceeded the maximum allowed size.</p> </li> <li> <p>Number overflow. Attempting to store a number with magnitude larger than supported range.</p> </li> <li> <p>Type mismatch for attribute to update.</p> </li> <li> <p>Nesting Levels have exceeded supported limits.</p> </li> <li> <p>The document path provided in the update expression is invalid for update.</p> </li> <li> <p>The provided expression refers to an attribute that does not exist in the item.</p> </li> </ul> </li> </ul> </li> </ul></p>
4565 TransactionCanceled(String),
4566}
4567
4568impl TransactGetItemsError {
4569 pub fn from_response(res: BufferedHttpResponse) -> RusotoError<TransactGetItemsError> {
4570 if let Some(err) = proto::json::Error::parse(&res) {
4571 match err.typ.as_str() {
4572 "InternalServerError" => {
4573 return RusotoError::Service(TransactGetItemsError::InternalServerError(
4574 err.msg,
4575 ))
4576 }
4577 "ProvisionedThroughputExceededException" => {
4578 return RusotoError::Service(
4579 TransactGetItemsError::ProvisionedThroughputExceeded(err.msg),
4580 )
4581 }
4582 "RequestLimitExceeded" => {
4583 return RusotoError::Service(TransactGetItemsError::RequestLimitExceeded(
4584 err.msg,
4585 ))
4586 }
4587 "ResourceNotFoundException" => {
4588 return RusotoError::Service(TransactGetItemsError::ResourceNotFound(err.msg))
4589 }
4590 "TransactionCanceledException" => {
4591 return RusotoError::Service(TransactGetItemsError::TransactionCanceled(
4592 err.msg,
4593 ))
4594 }
4595 "ValidationException" => return RusotoError::Validation(err.msg),
4596 _ => {}
4597 }
4598 }
4599 RusotoError::Unknown(res)
4600 }
4601}
4602impl fmt::Display for TransactGetItemsError {
4603 #[allow(unused_variables)]
4604 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
4605 match *self {
4606 TransactGetItemsError::InternalServerError(ref cause) => write!(f, "{}", cause),
4607 TransactGetItemsError::ProvisionedThroughputExceeded(ref cause) => {
4608 write!(f, "{}", cause)
4609 }
4610 TransactGetItemsError::RequestLimitExceeded(ref cause) => write!(f, "{}", cause),
4611 TransactGetItemsError::ResourceNotFound(ref cause) => write!(f, "{}", cause),
4612 TransactGetItemsError::TransactionCanceled(ref cause) => write!(f, "{}", cause),
4613 }
4614 }
4615}
4616impl Error for TransactGetItemsError {}
4617/// Errors returned by TransactWriteItems
4618#[derive(Debug, PartialEq)]
4619pub enum TransactWriteItemsError {
4620 /// <p>DynamoDB rejected the request because you retried a request with a different payload but with an idempotent token that was already used.</p>
4621 IdempotentParameterMismatch(String),
4622 /// <p>An error occurred on the server side.</p>
4623 InternalServerError(String),
4624 /// <p>Your request rate is too high. The AWS SDKs for DynamoDB automatically retry requests that receive this exception. Your request is eventually successful, unless your retry queue is too large to finish. Reduce the frequency of requests and use exponential backoff. For more information, go to <a href="https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Programming.Errors.html#Programming.Errors.RetryAndBackoff">Error Retries and Exponential Backoff</a> in the <i>Amazon DynamoDB Developer Guide</i>.</p>
4625 ProvisionedThroughputExceeded(String),
4626 /// <p>Throughput exceeds the current throughput limit for your account. Please contact AWS Support at <a href="https://aws.amazon.com/support">AWS Support</a> to request a limit increase.</p>
4627 RequestLimitExceeded(String),
4628 /// <p>The operation tried to access a nonexistent table or index. The resource might not be specified correctly, or its status might not be <code>ACTIVE</code>.</p>
4629 ResourceNotFound(String),
4630 /// <p><p>The entire transaction request was canceled.</p> <p>DynamoDB cancels a <code>TransactWriteItems</code> request under the following circumstances:</p> <ul> <li> <p>A condition in one of the condition expressions is not met.</p> </li> <li> <p>A table in the <code>TransactWriteItems</code> request is in a different account or region.</p> </li> <li> <p>More than one action in the <code>TransactWriteItems</code> operation targets the same item.</p> </li> <li> <p>There is insufficient provisioned capacity for the transaction to be completed.</p> </li> <li> <p>An item size becomes too large (larger than 400 KB), or a local secondary index (LSI) becomes too large, or a similar validation error occurs because of changes made by the transaction.</p> </li> <li> <p>There is a user error, such as an invalid data format.</p> </li> </ul> <p>DynamoDB cancels a <code>TransactGetItems</code> request under the following circumstances:</p> <ul> <li> <p>There is an ongoing <code>TransactGetItems</code> operation that conflicts with a concurrent <code>PutItem</code>, <code>UpdateItem</code>, <code>DeleteItem</code> or <code>TransactWriteItems</code> request. In this case the <code>TransactGetItems</code> operation fails with a <code>TransactionCanceledException</code>.</p> </li> <li> <p>A table in the <code>TransactGetItems</code> request is in a different account or region.</p> </li> <li> <p>There is insufficient provisioned capacity for the transaction to be completed.</p> </li> <li> <p>There is a user error, such as an invalid data format.</p> </li> </ul> <note> <p>If using Java, DynamoDB lists the cancellation reasons on the <code>CancellationReasons</code> property. This property is not set for other languages. Transaction cancellation reasons are ordered in the order of requested items, if an item has no error it will have <code>NONE</code> code and <code>Null</code> message.</p> </note> <p>Cancellation reason codes and possible error messages:</p> <ul> <li> <p>No Errors:</p> <ul> <li> <p>Code: <code>NONE</code> </p> </li> <li> <p>Message: <code>null</code> </p> </li> </ul> </li> <li> <p>Conditional Check Failed:</p> <ul> <li> <p>Code: <code>ConditionalCheckFailed</code> </p> </li> <li> <p>Message: The conditional request failed. </p> </li> </ul> </li> <li> <p>Item Collection Size Limit Exceeded:</p> <ul> <li> <p>Code: <code>ItemCollectionSizeLimitExceeded</code> </p> </li> <li> <p>Message: Collection size exceeded.</p> </li> </ul> </li> <li> <p>Transaction Conflict:</p> <ul> <li> <p>Code: <code>TransactionConflict</code> </p> </li> <li> <p>Message: Transaction is ongoing for the item.</p> </li> </ul> </li> <li> <p>Provisioned Throughput Exceeded:</p> <ul> <li> <p>Code: <code>ProvisionedThroughputExceeded</code> </p> </li> <li> <p>Messages: </p> <ul> <li> <p>The level of configured provisioned throughput for the table was exceeded. Consider increasing your provisioning level with the UpdateTable API.</p> <note> <p>This Message is received when provisioned throughput is exceeded is on a provisioned DynamoDB table.</p> </note> </li> <li> <p>The level of configured provisioned throughput for one or more global secondary indexes of the table was exceeded. Consider increasing your provisioning level for the under-provisioned global secondary indexes with the UpdateTable API.</p> <note> <p>This message is returned when provisioned throughput is exceeded is on a provisioned GSI.</p> </note> </li> </ul> </li> </ul> </li> <li> <p>Throttling Error:</p> <ul> <li> <p>Code: <code>ThrottlingError</code> </p> </li> <li> <p>Messages: </p> <ul> <li> <p>Throughput exceeds the current capacity of your table or index. DynamoDB is automatically scaling your table or index so please try again shortly. If exceptions persist, check if you have a hot key: https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/bp-partition-key-design.html.</p> <note> <p>This message is returned when writes get throttled on an On-Demand table as DynamoDB is automatically scaling the table.</p> </note> </li> <li> <p>Throughput exceeds the current capacity for one or more global secondary indexes. DynamoDB is automatically scaling your index so please try again shortly.</p> <note> <p>This message is returned when when writes get throttled on an On-Demand GSI as DynamoDB is automatically scaling the GSI.</p> </note> </li> </ul> </li> </ul> </li> <li> <p>Validation Error:</p> <ul> <li> <p>Code: <code>ValidationError</code> </p> </li> <li> <p>Messages: </p> <ul> <li> <p>One or more parameter values were invalid.</p> </li> <li> <p>The update expression attempted to update the secondary index key beyond allowed size limits.</p> </li> <li> <p>The update expression attempted to update the secondary index key to unsupported type.</p> </li> <li> <p>An operand in the update expression has an incorrect data type.</p> </li> <li> <p>Item size to update has exceeded the maximum allowed size.</p> </li> <li> <p>Number overflow. Attempting to store a number with magnitude larger than supported range.</p> </li> <li> <p>Type mismatch for attribute to update.</p> </li> <li> <p>Nesting Levels have exceeded supported limits.</p> </li> <li> <p>The document path provided in the update expression is invalid for update.</p> </li> <li> <p>The provided expression refers to an attribute that does not exist in the item.</p> </li> </ul> </li> </ul> </li> </ul></p>
4631 TransactionCanceled(String),
4632 /// <p>The transaction with the given request token is already in progress.</p>
4633 TransactionInProgress(String),
4634}
4635
4636impl TransactWriteItemsError {
4637 pub fn from_response(res: BufferedHttpResponse) -> RusotoError<TransactWriteItemsError> {
4638 if let Some(err) = proto::json::Error::parse(&res) {
4639 match err.typ.as_str() {
4640 "IdempotentParameterMismatchException" => {
4641 return RusotoError::Service(
4642 TransactWriteItemsError::IdempotentParameterMismatch(err.msg),
4643 )
4644 }
4645 "InternalServerError" => {
4646 return RusotoError::Service(TransactWriteItemsError::InternalServerError(
4647 err.msg,
4648 ))
4649 }
4650 "ProvisionedThroughputExceededException" => {
4651 return RusotoError::Service(
4652 TransactWriteItemsError::ProvisionedThroughputExceeded(err.msg),
4653 )
4654 }
4655 "RequestLimitExceeded" => {
4656 return RusotoError::Service(TransactWriteItemsError::RequestLimitExceeded(
4657 err.msg,
4658 ))
4659 }
4660 "ResourceNotFoundException" => {
4661 return RusotoError::Service(TransactWriteItemsError::ResourceNotFound(err.msg))
4662 }
4663 "TransactionCanceledException" => {
4664 return RusotoError::Service(TransactWriteItemsError::TransactionCanceled(
4665 err.msg,
4666 ))
4667 }
4668 "TransactionInProgressException" => {
4669 return RusotoError::Service(TransactWriteItemsError::TransactionInProgress(
4670 err.msg,
4671 ))
4672 }
4673 "ValidationException" => return RusotoError::Validation(err.msg),
4674 _ => {}
4675 }
4676 }
4677 RusotoError::Unknown(res)
4678 }
4679}
4680impl fmt::Display for TransactWriteItemsError {
4681 #[allow(unused_variables)]
4682 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
4683 match *self {
4684 TransactWriteItemsError::IdempotentParameterMismatch(ref cause) => {
4685 write!(f, "{}", cause)
4686 }
4687 TransactWriteItemsError::InternalServerError(ref cause) => write!(f, "{}", cause),
4688 TransactWriteItemsError::ProvisionedThroughputExceeded(ref cause) => {
4689 write!(f, "{}", cause)
4690 }
4691 TransactWriteItemsError::RequestLimitExceeded(ref cause) => write!(f, "{}", cause),
4692 TransactWriteItemsError::ResourceNotFound(ref cause) => write!(f, "{}", cause),
4693 TransactWriteItemsError::TransactionCanceled(ref cause) => write!(f, "{}", cause),
4694 TransactWriteItemsError::TransactionInProgress(ref cause) => write!(f, "{}", cause),
4695 }
4696 }
4697}
4698impl Error for TransactWriteItemsError {}
4699/// Errors returned by UntagResource
4700#[derive(Debug, PartialEq)]
4701pub enum UntagResourceError {
4702 /// <p>An error occurred on the server side.</p>
4703 InternalServerError(String),
4704 /// <p>There is no limit to the number of daily on-demand backups that can be taken. </p> <p>Up to 50 simultaneous table operations are allowed per account. These operations include <code>CreateTable</code>, <code>UpdateTable</code>, <code>DeleteTable</code>,<code>UpdateTimeToLive</code>, <code>RestoreTableFromBackup</code>, and <code>RestoreTableToPointInTime</code>. </p> <p>The only exception is when you are creating a table with one or more secondary indexes. You can have up to 25 such requests running at a time; however, if the table or index specifications are complex, DynamoDB might temporarily reduce the number of concurrent operations.</p> <p>There is a soft account limit of 256 tables.</p>
4705 LimitExceeded(String),
4706 /// <p>The operation conflicts with the resource's availability. For example, you attempted to recreate an existing table, or tried to delete a table currently in the <code>CREATING</code> state.</p>
4707 ResourceInUse(String),
4708 /// <p>The operation tried to access a nonexistent table or index. The resource might not be specified correctly, or its status might not be <code>ACTIVE</code>.</p>
4709 ResourceNotFound(String),
4710}
4711
4712impl UntagResourceError {
4713 pub fn from_response(res: BufferedHttpResponse) -> RusotoError<UntagResourceError> {
4714 if let Some(err) = proto::json::Error::parse(&res) {
4715 match err.typ.as_str() {
4716 "InternalServerError" => {
4717 return RusotoError::Service(UntagResourceError::InternalServerError(err.msg))
4718 }
4719 "LimitExceededException" => {
4720 return RusotoError::Service(UntagResourceError::LimitExceeded(err.msg))
4721 }
4722 "ResourceInUseException" => {
4723 return RusotoError::Service(UntagResourceError::ResourceInUse(err.msg))
4724 }
4725 "ResourceNotFoundException" => {
4726 return RusotoError::Service(UntagResourceError::ResourceNotFound(err.msg))
4727 }
4728 "ValidationException" => return RusotoError::Validation(err.msg),
4729 _ => {}
4730 }
4731 }
4732 RusotoError::Unknown(res)
4733 }
4734}
4735impl fmt::Display for UntagResourceError {
4736 #[allow(unused_variables)]
4737 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
4738 match *self {
4739 UntagResourceError::InternalServerError(ref cause) => write!(f, "{}", cause),
4740 UntagResourceError::LimitExceeded(ref cause) => write!(f, "{}", cause),
4741 UntagResourceError::ResourceInUse(ref cause) => write!(f, "{}", cause),
4742 UntagResourceError::ResourceNotFound(ref cause) => write!(f, "{}", cause),
4743 }
4744 }
4745}
4746impl Error for UntagResourceError {}
4747/// Errors returned by UpdateContinuousBackups
4748#[derive(Debug, PartialEq)]
4749pub enum UpdateContinuousBackupsError {
4750 /// <p>Backups have not yet been enabled for this table.</p>
4751 ContinuousBackupsUnavailable(String),
4752 /// <p>An error occurred on the server side.</p>
4753 InternalServerError(String),
4754 /// <p>A source table with the name <code>TableName</code> does not currently exist within the subscriber's account.</p>
4755 TableNotFound(String),
4756}
4757
4758impl UpdateContinuousBackupsError {
4759 pub fn from_response(res: BufferedHttpResponse) -> RusotoError<UpdateContinuousBackupsError> {
4760 if let Some(err) = proto::json::Error::parse(&res) {
4761 match err.typ.as_str() {
4762 "ContinuousBackupsUnavailableException" => {
4763 return RusotoError::Service(
4764 UpdateContinuousBackupsError::ContinuousBackupsUnavailable(err.msg),
4765 )
4766 }
4767 "InternalServerError" => {
4768 return RusotoError::Service(UpdateContinuousBackupsError::InternalServerError(
4769 err.msg,
4770 ))
4771 }
4772 "TableNotFoundException" => {
4773 return RusotoError::Service(UpdateContinuousBackupsError::TableNotFound(
4774 err.msg,
4775 ))
4776 }
4777 "ValidationException" => return RusotoError::Validation(err.msg),
4778 _ => {}
4779 }
4780 }
4781 RusotoError::Unknown(res)
4782 }
4783}
4784impl fmt::Display for UpdateContinuousBackupsError {
4785 #[allow(unused_variables)]
4786 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
4787 match *self {
4788 UpdateContinuousBackupsError::ContinuousBackupsUnavailable(ref cause) => {
4789 write!(f, "{}", cause)
4790 }
4791 UpdateContinuousBackupsError::InternalServerError(ref cause) => write!(f, "{}", cause),
4792 UpdateContinuousBackupsError::TableNotFound(ref cause) => write!(f, "{}", cause),
4793 }
4794 }
4795}
4796impl Error for UpdateContinuousBackupsError {}
4797/// Errors returned by UpdateContributorInsights
4798#[derive(Debug, PartialEq)]
4799pub enum UpdateContributorInsightsError {
4800 /// <p>An error occurred on the server side.</p>
4801 InternalServerError(String),
4802 /// <p>The operation tried to access a nonexistent table or index. The resource might not be specified correctly, or its status might not be <code>ACTIVE</code>.</p>
4803 ResourceNotFound(String),
4804}
4805
4806impl UpdateContributorInsightsError {
4807 pub fn from_response(res: BufferedHttpResponse) -> RusotoError<UpdateContributorInsightsError> {
4808 if let Some(err) = proto::json::Error::parse(&res) {
4809 match err.typ.as_str() {
4810 "InternalServerError" => {
4811 return RusotoError::Service(
4812 UpdateContributorInsightsError::InternalServerError(err.msg),
4813 )
4814 }
4815 "ResourceNotFoundException" => {
4816 return RusotoError::Service(UpdateContributorInsightsError::ResourceNotFound(
4817 err.msg,
4818 ))
4819 }
4820 "ValidationException" => return RusotoError::Validation(err.msg),
4821 _ => {}
4822 }
4823 }
4824 RusotoError::Unknown(res)
4825 }
4826}
4827impl fmt::Display for UpdateContributorInsightsError {
4828 #[allow(unused_variables)]
4829 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
4830 match *self {
4831 UpdateContributorInsightsError::InternalServerError(ref cause) => {
4832 write!(f, "{}", cause)
4833 }
4834 UpdateContributorInsightsError::ResourceNotFound(ref cause) => write!(f, "{}", cause),
4835 }
4836 }
4837}
4838impl Error for UpdateContributorInsightsError {}
4839/// Errors returned by UpdateGlobalTable
4840#[derive(Debug, PartialEq)]
4841pub enum UpdateGlobalTableError {
4842 /// <p>The specified global table does not exist.</p>
4843 GlobalTableNotFound(String),
4844 /// <p>An error occurred on the server side.</p>
4845 InternalServerError(String),
4846 /// <p>The specified replica is already part of the global table.</p>
4847 ReplicaAlreadyExists(String),
4848 /// <p>The specified replica is no longer part of the global table.</p>
4849 ReplicaNotFound(String),
4850 /// <p>A source table with the name <code>TableName</code> does not currently exist within the subscriber's account.</p>
4851 TableNotFound(String),
4852}
4853
4854impl UpdateGlobalTableError {
4855 pub fn from_response(res: BufferedHttpResponse) -> RusotoError<UpdateGlobalTableError> {
4856 if let Some(err) = proto::json::Error::parse(&res) {
4857 match err.typ.as_str() {
4858 "GlobalTableNotFoundException" => {
4859 return RusotoError::Service(UpdateGlobalTableError::GlobalTableNotFound(
4860 err.msg,
4861 ))
4862 }
4863 "InternalServerError" => {
4864 return RusotoError::Service(UpdateGlobalTableError::InternalServerError(
4865 err.msg,
4866 ))
4867 }
4868 "ReplicaAlreadyExistsException" => {
4869 return RusotoError::Service(UpdateGlobalTableError::ReplicaAlreadyExists(
4870 err.msg,
4871 ))
4872 }
4873 "ReplicaNotFoundException" => {
4874 return RusotoError::Service(UpdateGlobalTableError::ReplicaNotFound(err.msg))
4875 }
4876 "TableNotFoundException" => {
4877 return RusotoError::Service(UpdateGlobalTableError::TableNotFound(err.msg))
4878 }
4879 "ValidationException" => return RusotoError::Validation(err.msg),
4880 _ => {}
4881 }
4882 }
4883 RusotoError::Unknown(res)
4884 }
4885}
4886impl fmt::Display for UpdateGlobalTableError {
4887 #[allow(unused_variables)]
4888 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
4889 match *self {
4890 UpdateGlobalTableError::GlobalTableNotFound(ref cause) => write!(f, "{}", cause),
4891 UpdateGlobalTableError::InternalServerError(ref cause) => write!(f, "{}", cause),
4892 UpdateGlobalTableError::ReplicaAlreadyExists(ref cause) => write!(f, "{}", cause),
4893 UpdateGlobalTableError::ReplicaNotFound(ref cause) => write!(f, "{}", cause),
4894 UpdateGlobalTableError::TableNotFound(ref cause) => write!(f, "{}", cause),
4895 }
4896 }
4897}
4898impl Error for UpdateGlobalTableError {}
4899/// Errors returned by UpdateGlobalTableSettings
4900#[derive(Debug, PartialEq)]
4901pub enum UpdateGlobalTableSettingsError {
4902 /// <p>The specified global table does not exist.</p>
4903 GlobalTableNotFound(String),
4904 /// <p>The operation tried to access a nonexistent index.</p>
4905 IndexNotFound(String),
4906 /// <p>An error occurred on the server side.</p>
4907 InternalServerError(String),
4908 /// <p>There is no limit to the number of daily on-demand backups that can be taken. </p> <p>Up to 50 simultaneous table operations are allowed per account. These operations include <code>CreateTable</code>, <code>UpdateTable</code>, <code>DeleteTable</code>,<code>UpdateTimeToLive</code>, <code>RestoreTableFromBackup</code>, and <code>RestoreTableToPointInTime</code>. </p> <p>The only exception is when you are creating a table with one or more secondary indexes. You can have up to 25 such requests running at a time; however, if the table or index specifications are complex, DynamoDB might temporarily reduce the number of concurrent operations.</p> <p>There is a soft account limit of 256 tables.</p>
4909 LimitExceeded(String),
4910 /// <p>The specified replica is no longer part of the global table.</p>
4911 ReplicaNotFound(String),
4912 /// <p>The operation conflicts with the resource's availability. For example, you attempted to recreate an existing table, or tried to delete a table currently in the <code>CREATING</code> state.</p>
4913 ResourceInUse(String),
4914}
4915
4916impl UpdateGlobalTableSettingsError {
4917 pub fn from_response(res: BufferedHttpResponse) -> RusotoError<UpdateGlobalTableSettingsError> {
4918 if let Some(err) = proto::json::Error::parse(&res) {
4919 match err.typ.as_str() {
4920 "GlobalTableNotFoundException" => {
4921 return RusotoError::Service(
4922 UpdateGlobalTableSettingsError::GlobalTableNotFound(err.msg),
4923 )
4924 }
4925 "IndexNotFoundException" => {
4926 return RusotoError::Service(UpdateGlobalTableSettingsError::IndexNotFound(
4927 err.msg,
4928 ))
4929 }
4930 "InternalServerError" => {
4931 return RusotoError::Service(
4932 UpdateGlobalTableSettingsError::InternalServerError(err.msg),
4933 )
4934 }
4935 "LimitExceededException" => {
4936 return RusotoError::Service(UpdateGlobalTableSettingsError::LimitExceeded(
4937 err.msg,
4938 ))
4939 }
4940 "ReplicaNotFoundException" => {
4941 return RusotoError::Service(UpdateGlobalTableSettingsError::ReplicaNotFound(
4942 err.msg,
4943 ))
4944 }
4945 "ResourceInUseException" => {
4946 return RusotoError::Service(UpdateGlobalTableSettingsError::ResourceInUse(
4947 err.msg,
4948 ))
4949 }
4950 "ValidationException" => return RusotoError::Validation(err.msg),
4951 _ => {}
4952 }
4953 }
4954 RusotoError::Unknown(res)
4955 }
4956}
4957impl fmt::Display for UpdateGlobalTableSettingsError {
4958 #[allow(unused_variables)]
4959 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
4960 match *self {
4961 UpdateGlobalTableSettingsError::GlobalTableNotFound(ref cause) => {
4962 write!(f, "{}", cause)
4963 }
4964 UpdateGlobalTableSettingsError::IndexNotFound(ref cause) => write!(f, "{}", cause),
4965 UpdateGlobalTableSettingsError::InternalServerError(ref cause) => {
4966 write!(f, "{}", cause)
4967 }
4968 UpdateGlobalTableSettingsError::LimitExceeded(ref cause) => write!(f, "{}", cause),
4969 UpdateGlobalTableSettingsError::ReplicaNotFound(ref cause) => write!(f, "{}", cause),
4970 UpdateGlobalTableSettingsError::ResourceInUse(ref cause) => write!(f, "{}", cause),
4971 }
4972 }
4973}
4974impl Error for UpdateGlobalTableSettingsError {}
4975/// Errors returned by UpdateItem
4976#[derive(Debug, PartialEq)]
4977pub enum UpdateItemError {
4978 /// <p>A condition specified in the operation could not be evaluated.</p>
4979 ConditionalCheckFailed(String),
4980 /// <p>An error occurred on the server side.</p>
4981 InternalServerError(String),
4982 /// <p>An item collection is too large. This exception is only returned for tables that have one or more local secondary indexes.</p>
4983 ItemCollectionSizeLimitExceeded(String),
4984 /// <p>Your request rate is too high. The AWS SDKs for DynamoDB automatically retry requests that receive this exception. Your request is eventually successful, unless your retry queue is too large to finish. Reduce the frequency of requests and use exponential backoff. For more information, go to <a href="https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Programming.Errors.html#Programming.Errors.RetryAndBackoff">Error Retries and Exponential Backoff</a> in the <i>Amazon DynamoDB Developer Guide</i>.</p>
4985 ProvisionedThroughputExceeded(String),
4986 /// <p>Throughput exceeds the current throughput limit for your account. Please contact AWS Support at <a href="https://aws.amazon.com/support">AWS Support</a> to request a limit increase.</p>
4987 RequestLimitExceeded(String),
4988 /// <p>The operation tried to access a nonexistent table or index. The resource might not be specified correctly, or its status might not be <code>ACTIVE</code>.</p>
4989 ResourceNotFound(String),
4990 /// <p>Operation was rejected because there is an ongoing transaction for the item.</p>
4991 TransactionConflict(String),
4992}
4993
4994impl UpdateItemError {
4995 pub fn from_response(res: BufferedHttpResponse) -> RusotoError<UpdateItemError> {
4996 if let Some(err) = proto::json::Error::parse(&res) {
4997 match err.typ.as_str() {
4998 "ConditionalCheckFailedException" => {
4999 return RusotoError::Service(UpdateItemError::ConditionalCheckFailed(err.msg))
5000 }
5001 "InternalServerError" => {
5002 return RusotoError::Service(UpdateItemError::InternalServerError(err.msg))
5003 }
5004 "ItemCollectionSizeLimitExceededException" => {
5005 return RusotoError::Service(UpdateItemError::ItemCollectionSizeLimitExceeded(
5006 err.msg,
5007 ))
5008 }
5009 "ProvisionedThroughputExceededException" => {
5010 return RusotoError::Service(UpdateItemError::ProvisionedThroughputExceeded(
5011 err.msg,
5012 ))
5013 }
5014 "RequestLimitExceeded" => {
5015 return RusotoError::Service(UpdateItemError::RequestLimitExceeded(err.msg))
5016 }
5017 "ResourceNotFoundException" => {
5018 return RusotoError::Service(UpdateItemError::ResourceNotFound(err.msg))
5019 }
5020 "TransactionConflictException" => {
5021 return RusotoError::Service(UpdateItemError::TransactionConflict(err.msg))
5022 }
5023 "ValidationException" => return RusotoError::Validation(err.msg),
5024 _ => {}
5025 }
5026 }
5027 RusotoError::Unknown(res)
5028 }
5029}
5030impl fmt::Display for UpdateItemError {
5031 #[allow(unused_variables)]
5032 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
5033 match *self {
5034 UpdateItemError::ConditionalCheckFailed(ref cause) => write!(f, "{}", cause),
5035 UpdateItemError::InternalServerError(ref cause) => write!(f, "{}", cause),
5036 UpdateItemError::ItemCollectionSizeLimitExceeded(ref cause) => write!(f, "{}", cause),
5037 UpdateItemError::ProvisionedThroughputExceeded(ref cause) => write!(f, "{}", cause),
5038 UpdateItemError::RequestLimitExceeded(ref cause) => write!(f, "{}", cause),
5039 UpdateItemError::ResourceNotFound(ref cause) => write!(f, "{}", cause),
5040 UpdateItemError::TransactionConflict(ref cause) => write!(f, "{}", cause),
5041 }
5042 }
5043}
5044impl Error for UpdateItemError {}
5045/// Errors returned by UpdateTable
5046#[derive(Debug, PartialEq)]
5047pub enum UpdateTableError {
5048 /// <p>An error occurred on the server side.</p>
5049 InternalServerError(String),
5050 /// <p>There is no limit to the number of daily on-demand backups that can be taken. </p> <p>Up to 50 simultaneous table operations are allowed per account. These operations include <code>CreateTable</code>, <code>UpdateTable</code>, <code>DeleteTable</code>,<code>UpdateTimeToLive</code>, <code>RestoreTableFromBackup</code>, and <code>RestoreTableToPointInTime</code>. </p> <p>The only exception is when you are creating a table with one or more secondary indexes. You can have up to 25 such requests running at a time; however, if the table or index specifications are complex, DynamoDB might temporarily reduce the number of concurrent operations.</p> <p>There is a soft account limit of 256 tables.</p>
5051 LimitExceeded(String),
5052 /// <p>The operation conflicts with the resource's availability. For example, you attempted to recreate an existing table, or tried to delete a table currently in the <code>CREATING</code> state.</p>
5053 ResourceInUse(String),
5054 /// <p>The operation tried to access a nonexistent table or index. The resource might not be specified correctly, or its status might not be <code>ACTIVE</code>.</p>
5055 ResourceNotFound(String),
5056}
5057
5058impl UpdateTableError {
5059 pub fn from_response(res: BufferedHttpResponse) -> RusotoError<UpdateTableError> {
5060 if let Some(err) = proto::json::Error::parse(&res) {
5061 match err.typ.as_str() {
5062 "InternalServerError" => {
5063 return RusotoError::Service(UpdateTableError::InternalServerError(err.msg))
5064 }
5065 "LimitExceededException" => {
5066 return RusotoError::Service(UpdateTableError::LimitExceeded(err.msg))
5067 }
5068 "ResourceInUseException" => {
5069 return RusotoError::Service(UpdateTableError::ResourceInUse(err.msg))
5070 }
5071 "ResourceNotFoundException" => {
5072 return RusotoError::Service(UpdateTableError::ResourceNotFound(err.msg))
5073 }
5074 "ValidationException" => return RusotoError::Validation(err.msg),
5075 _ => {}
5076 }
5077 }
5078 RusotoError::Unknown(res)
5079 }
5080}
5081impl fmt::Display for UpdateTableError {
5082 #[allow(unused_variables)]
5083 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
5084 match *self {
5085 UpdateTableError::InternalServerError(ref cause) => write!(f, "{}", cause),
5086 UpdateTableError::LimitExceeded(ref cause) => write!(f, "{}", cause),
5087 UpdateTableError::ResourceInUse(ref cause) => write!(f, "{}", cause),
5088 UpdateTableError::ResourceNotFound(ref cause) => write!(f, "{}", cause),
5089 }
5090 }
5091}
5092impl Error for UpdateTableError {}
5093/// Errors returned by UpdateTableReplicaAutoScaling
5094#[derive(Debug, PartialEq)]
5095pub enum UpdateTableReplicaAutoScalingError {
5096 /// <p>An error occurred on the server side.</p>
5097 InternalServerError(String),
5098 /// <p>There is no limit to the number of daily on-demand backups that can be taken. </p> <p>Up to 50 simultaneous table operations are allowed per account. These operations include <code>CreateTable</code>, <code>UpdateTable</code>, <code>DeleteTable</code>,<code>UpdateTimeToLive</code>, <code>RestoreTableFromBackup</code>, and <code>RestoreTableToPointInTime</code>. </p> <p>The only exception is when you are creating a table with one or more secondary indexes. You can have up to 25 such requests running at a time; however, if the table or index specifications are complex, DynamoDB might temporarily reduce the number of concurrent operations.</p> <p>There is a soft account limit of 256 tables.</p>
5099 LimitExceeded(String),
5100 /// <p>The operation conflicts with the resource's availability. For example, you attempted to recreate an existing table, or tried to delete a table currently in the <code>CREATING</code> state.</p>
5101 ResourceInUse(String),
5102 /// <p>The operation tried to access a nonexistent table or index. The resource might not be specified correctly, or its status might not be <code>ACTIVE</code>.</p>
5103 ResourceNotFound(String),
5104}
5105
5106impl UpdateTableReplicaAutoScalingError {
5107 pub fn from_response(
5108 res: BufferedHttpResponse,
5109 ) -> RusotoError<UpdateTableReplicaAutoScalingError> {
5110 if let Some(err) = proto::json::Error::parse(&res) {
5111 match err.typ.as_str() {
5112 "InternalServerError" => {
5113 return RusotoError::Service(
5114 UpdateTableReplicaAutoScalingError::InternalServerError(err.msg),
5115 )
5116 }
5117 "LimitExceededException" => {
5118 return RusotoError::Service(UpdateTableReplicaAutoScalingError::LimitExceeded(
5119 err.msg,
5120 ))
5121 }
5122 "ResourceInUseException" => {
5123 return RusotoError::Service(UpdateTableReplicaAutoScalingError::ResourceInUse(
5124 err.msg,
5125 ))
5126 }
5127 "ResourceNotFoundException" => {
5128 return RusotoError::Service(
5129 UpdateTableReplicaAutoScalingError::ResourceNotFound(err.msg),
5130 )
5131 }
5132 "ValidationException" => return RusotoError::Validation(err.msg),
5133 _ => {}
5134 }
5135 }
5136 RusotoError::Unknown(res)
5137 }
5138}
5139impl fmt::Display for UpdateTableReplicaAutoScalingError {
5140 #[allow(unused_variables)]
5141 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
5142 match *self {
5143 UpdateTableReplicaAutoScalingError::InternalServerError(ref cause) => {
5144 write!(f, "{}", cause)
5145 }
5146 UpdateTableReplicaAutoScalingError::LimitExceeded(ref cause) => write!(f, "{}", cause),
5147 UpdateTableReplicaAutoScalingError::ResourceInUse(ref cause) => write!(f, "{}", cause),
5148 UpdateTableReplicaAutoScalingError::ResourceNotFound(ref cause) => {
5149 write!(f, "{}", cause)
5150 }
5151 }
5152 }
5153}
5154impl Error for UpdateTableReplicaAutoScalingError {}
5155/// Errors returned by UpdateTimeToLive
5156#[derive(Debug, PartialEq)]
5157pub enum UpdateTimeToLiveError {
5158 /// <p>An error occurred on the server side.</p>
5159 InternalServerError(String),
5160 /// <p>There is no limit to the number of daily on-demand backups that can be taken. </p> <p>Up to 50 simultaneous table operations are allowed per account. These operations include <code>CreateTable</code>, <code>UpdateTable</code>, <code>DeleteTable</code>,<code>UpdateTimeToLive</code>, <code>RestoreTableFromBackup</code>, and <code>RestoreTableToPointInTime</code>. </p> <p>The only exception is when you are creating a table with one or more secondary indexes. You can have up to 25 such requests running at a time; however, if the table or index specifications are complex, DynamoDB might temporarily reduce the number of concurrent operations.</p> <p>There is a soft account limit of 256 tables.</p>
5161 LimitExceeded(String),
5162 /// <p>The operation conflicts with the resource's availability. For example, you attempted to recreate an existing table, or tried to delete a table currently in the <code>CREATING</code> state.</p>
5163 ResourceInUse(String),
5164 /// <p>The operation tried to access a nonexistent table or index. The resource might not be specified correctly, or its status might not be <code>ACTIVE</code>.</p>
5165 ResourceNotFound(String),
5166}
5167
5168impl UpdateTimeToLiveError {
5169 pub fn from_response(res: BufferedHttpResponse) -> RusotoError<UpdateTimeToLiveError> {
5170 if let Some(err) = proto::json::Error::parse(&res) {
5171 match err.typ.as_str() {
5172 "InternalServerError" => {
5173 return RusotoError::Service(UpdateTimeToLiveError::InternalServerError(
5174 err.msg,
5175 ))
5176 }
5177 "LimitExceededException" => {
5178 return RusotoError::Service(UpdateTimeToLiveError::LimitExceeded(err.msg))
5179 }
5180 "ResourceInUseException" => {
5181 return RusotoError::Service(UpdateTimeToLiveError::ResourceInUse(err.msg))
5182 }
5183 "ResourceNotFoundException" => {
5184 return RusotoError::Service(UpdateTimeToLiveError::ResourceNotFound(err.msg))
5185 }
5186 "ValidationException" => return RusotoError::Validation(err.msg),
5187 _ => {}
5188 }
5189 }
5190 RusotoError::Unknown(res)
5191 }
5192}
5193impl fmt::Display for UpdateTimeToLiveError {
5194 #[allow(unused_variables)]
5195 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
5196 match *self {
5197 UpdateTimeToLiveError::InternalServerError(ref cause) => write!(f, "{}", cause),
5198 UpdateTimeToLiveError::LimitExceeded(ref cause) => write!(f, "{}", cause),
5199 UpdateTimeToLiveError::ResourceInUse(ref cause) => write!(f, "{}", cause),
5200 UpdateTimeToLiveError::ResourceNotFound(ref cause) => write!(f, "{}", cause),
5201 }
5202 }
5203}
5204impl Error for UpdateTimeToLiveError {}
5205/// Trait representing the capabilities of the DynamoDB API. DynamoDB clients implement this trait.
5206#[async_trait]
5207pub trait DynamoDb {
5208 /// <p>The <code>BatchGetItem</code> operation returns the attributes of one or more items from one or more tables. You identify requested items by primary key.</p> <p>A single operation can retrieve up to 16 MB of data, which can contain as many as 100 items. <code>BatchGetItem</code> returns a partial result if the response size limit is exceeded, the table's provisioned throughput is exceeded, or an internal processing failure occurs. If a partial result is returned, the operation returns a value for <code>UnprocessedKeys</code>. You can use this value to retry the operation starting with the next item to get.</p> <important> <p>If you request more than 100 items, <code>BatchGetItem</code> returns a <code>ValidationException</code> with the message "Too many items requested for the BatchGetItem call."</p> </important> <p>For example, if you ask to retrieve 100 items, but each individual item is 300 KB in size, the system returns 52 items (so as not to exceed the 16 MB limit). It also returns an appropriate <code>UnprocessedKeys</code> value so you can get the next page of results. If desired, your application can include its own logic to assemble the pages of results into one dataset.</p> <p>If <i>none</i> of the items can be processed due to insufficient provisioned throughput on all of the tables in the request, then <code>BatchGetItem</code> returns a <code>ProvisionedThroughputExceededException</code>. If <i>at least one</i> of the items is successfully processed, then <code>BatchGetItem</code> completes successfully, while returning the keys of the unread items in <code>UnprocessedKeys</code>.</p> <important> <p>If DynamoDB returns any unprocessed items, you should retry the batch operation on those items. However, <i>we strongly recommend that you use an exponential backoff algorithm</i>. If you retry the batch operation immediately, the underlying read or write requests can still fail due to throttling on the individual tables. If you delay the batch operation using exponential backoff, the individual requests in the batch are much more likely to succeed.</p> <p>For more information, see <a href="https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/ErrorHandling.html#BatchOperations">Batch Operations and Error Handling</a> in the <i>Amazon DynamoDB Developer Guide</i>.</p> </important> <p>By default, <code>BatchGetItem</code> performs eventually consistent reads on every table in the request. If you want strongly consistent reads instead, you can set <code>ConsistentRead</code> to <code>true</code> for any or all tables.</p> <p>In order to minimize response latency, <code>BatchGetItem</code> retrieves items in parallel.</p> <p>When designing your application, keep in mind that DynamoDB does not return items in any particular order. To help parse the response by item, include the primary key values for the items in your request in the <code>ProjectionExpression</code> parameter.</p> <p>If a requested item does not exist, it is not returned in the result. Requests for nonexistent items consume the minimum read capacity units according to the type of read. For more information, see <a href="https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/WorkingWithTables.html#CapacityUnitCalculations">Working with Tables</a> in the <i>Amazon DynamoDB Developer Guide</i>.</p>
5209 async fn batch_get_item(
5210 &self,
5211 input: BatchGetItemInput,
5212 ) -> Result<BatchGetItemOutput, RusotoError<BatchGetItemError>>;
5213
5214 /// <p><p>The <code>BatchWriteItem</code> operation puts or deletes multiple items in one or more tables. A single call to <code>BatchWriteItem</code> can write up to 16 MB of data, which can comprise as many as 25 put or delete requests. Individual items to be written can be as large as 400 KB.</p> <note> <p> <code>BatchWriteItem</code> cannot update items. To update items, use the <code>UpdateItem</code> action.</p> </note> <p>The individual <code>PutItem</code> and <code>DeleteItem</code> operations specified in <code>BatchWriteItem</code> are atomic; however <code>BatchWriteItem</code> as a whole is not. If any requested operations fail because the table's provisioned throughput is exceeded or an internal processing failure occurs, the failed operations are returned in the <code>UnprocessedItems</code> response parameter. You can investigate and optionally resend the requests. Typically, you would call <code>BatchWriteItem</code> in a loop. Each iteration would check for unprocessed items and submit a new <code>BatchWriteItem</code> request with those unprocessed items until all items have been processed.</p> <p>If <i>none</i> of the items can be processed due to insufficient provisioned throughput on all of the tables in the request, then <code>BatchWriteItem</code> returns a <code>ProvisionedThroughputExceededException</code>.</p> <important> <p>If DynamoDB returns any unprocessed items, you should retry the batch operation on those items. However, <i>we strongly recommend that you use an exponential backoff algorithm</i>. If you retry the batch operation immediately, the underlying read or write requests can still fail due to throttling on the individual tables. If you delay the batch operation using exponential backoff, the individual requests in the batch are much more likely to succeed.</p> <p>For more information, see <a href="https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/ErrorHandling.html#Programming.Errors.BatchOperations">Batch Operations and Error Handling</a> in the <i>Amazon DynamoDB Developer Guide</i>.</p> </important> <p>With <code>BatchWriteItem</code>, you can efficiently write or delete large amounts of data, such as from Amazon EMR, or copy data from another database into DynamoDB. In order to improve performance with these large-scale operations, <code>BatchWriteItem</code> does not behave in the same way as individual <code>PutItem</code> and <code>DeleteItem</code> calls would. For example, you cannot specify conditions on individual put and delete requests, and <code>BatchWriteItem</code> does not return deleted items in the response.</p> <p>If you use a programming language that supports concurrency, you can use threads to write items in parallel. Your application must include the necessary logic to manage the threads. With languages that don't support threading, you must update or delete the specified items one at a time. In both situations, <code>BatchWriteItem</code> performs the specified put and delete operations in parallel, giving you the power of the thread pool approach without having to introduce complexity into your application.</p> <p>Parallel processing reduces latency, but each specified put and delete request consumes the same number of write capacity units whether it is processed in parallel or not. Delete operations on nonexistent items consume one write capacity unit.</p> <p>If one or more of the following is true, DynamoDB rejects the entire batch write operation:</p> <ul> <li> <p>One or more tables specified in the <code>BatchWriteItem</code> request does not exist.</p> </li> <li> <p>Primary key attributes specified on an item in the request do not match those in the corresponding table's primary key schema.</p> </li> <li> <p>You try to perform multiple operations on the same item in the same <code>BatchWriteItem</code> request. For example, you cannot put and delete the same item in the same <code>BatchWriteItem</code> request. </p> </li> <li> <p> Your request contains at least two items with identical hash and range keys (which essentially is two put operations). </p> </li> <li> <p>There are more than 25 requests in the batch.</p> </li> <li> <p>Any individual item in a batch exceeds 400 KB.</p> </li> <li> <p>The total request size exceeds 16 MB.</p> </li> </ul></p>
5215 async fn batch_write_item(
5216 &self,
5217 input: BatchWriteItemInput,
5218 ) -> Result<BatchWriteItemOutput, RusotoError<BatchWriteItemError>>;
5219
5220 /// <p><p>Creates a backup for an existing table.</p> <p> Each time you create an on-demand backup, the entire table data is backed up. There is no limit to the number of on-demand backups that can be taken. </p> <p> When you create an on-demand backup, a time marker of the request is cataloged, and the backup is created asynchronously, by applying all changes until the time of the request to the last full table snapshot. Backup requests are processed instantaneously and become available for restore within minutes. </p> <p>You can call <code>CreateBackup</code> at a maximum rate of 50 times per second.</p> <p>All backups in DynamoDB work without consuming any provisioned throughput on the table.</p> <p> If you submit a backup request on 2018-12-14 at 14:25:00, the backup is guaranteed to contain all data committed to the table up to 14:24:00, and data committed after 14:26:00 will not be. The backup might contain data modifications made between 14:24:00 and 14:26:00. On-demand backup does not support causal consistency. </p> <p> Along with data, the following are also included on the backups: </p> <ul> <li> <p>Global secondary indexes (GSIs)</p> </li> <li> <p>Local secondary indexes (LSIs)</p> </li> <li> <p>Streams</p> </li> <li> <p>Provisioned read and write capacity</p> </li> </ul></p>
5221 async fn create_backup(
5222 &self,
5223 input: CreateBackupInput,
5224 ) -> Result<CreateBackupOutput, RusotoError<CreateBackupError>>;
5225
5226 /// <p><p>Creates a global table from an existing table. A global table creates a replication relationship between two or more DynamoDB tables with the same table name in the provided Regions. </p> <note> <p>This operation only applies to <a href="https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/globaltables.V1.html">Version 2017.11.29</a> of global tables.</p> </note> <p>If you want to add a new replica table to a global table, each of the following conditions must be true:</p> <ul> <li> <p>The table must have the same primary key as all of the other replicas.</p> </li> <li> <p>The table must have the same name as all of the other replicas.</p> </li> <li> <p>The table must have DynamoDB Streams enabled, with the stream containing both the new and the old images of the item.</p> </li> <li> <p>None of the replica tables in the global table can contain any data.</p> </li> </ul> <p> If global secondary indexes are specified, then the following conditions must also be met: </p> <ul> <li> <p> The global secondary indexes must have the same name. </p> </li> <li> <p> The global secondary indexes must have the same hash key and sort key (if present). </p> </li> </ul> <p> If local secondary indexes are specified, then the following conditions must also be met: </p> <ul> <li> <p> The local secondary indexes must have the same name. </p> </li> <li> <p> The local secondary indexes must have the same hash key and sort key (if present). </p> </li> </ul> <important> <p> Write capacity settings should be set consistently across your replica tables and secondary indexes. DynamoDB strongly recommends enabling auto scaling to manage the write capacity settings for all of your global tables replicas and indexes. </p> <p> If you prefer to manage write capacity settings manually, you should provision equal replicated write capacity units to your replica tables. You should also provision equal replicated write capacity units to matching secondary indexes across your global table. </p> </important></p>
5227 async fn create_global_table(
5228 &self,
5229 input: CreateGlobalTableInput,
5230 ) -> Result<CreateGlobalTableOutput, RusotoError<CreateGlobalTableError>>;
5231
5232 /// <p>The <code>CreateTable</code> operation adds a new table to your account. In an AWS account, table names must be unique within each Region. That is, you can have two tables with same name if you create the tables in different Regions.</p> <p> <code>CreateTable</code> is an asynchronous operation. Upon receiving a <code>CreateTable</code> request, DynamoDB immediately returns a response with a <code>TableStatus</code> of <code>CREATING</code>. After the table is created, DynamoDB sets the <code>TableStatus</code> to <code>ACTIVE</code>. You can perform read and write operations only on an <code>ACTIVE</code> table. </p> <p>You can optionally define secondary indexes on the new table, as part of the <code>CreateTable</code> operation. If you want to create multiple tables with secondary indexes on them, you must create the tables sequentially. Only one table with secondary indexes can be in the <code>CREATING</code> state at any given time.</p> <p>You can use the <code>DescribeTable</code> action to check the table status.</p>
5233 async fn create_table(
5234 &self,
5235 input: CreateTableInput,
5236 ) -> Result<CreateTableOutput, RusotoError<CreateTableError>>;
5237
5238 /// <p>Deletes an existing backup of a table.</p> <p>You can call <code>DeleteBackup</code> at a maximum rate of 10 times per second.</p>
5239 async fn delete_backup(
5240 &self,
5241 input: DeleteBackupInput,
5242 ) -> Result<DeleteBackupOutput, RusotoError<DeleteBackupError>>;
5243
5244 /// <p>Deletes a single item in a table by primary key. You can perform a conditional delete operation that deletes the item if it exists, or if it has an expected attribute value.</p> <p>In addition to deleting an item, you can also return the item's attribute values in the same operation, using the <code>ReturnValues</code> parameter.</p> <p>Unless you specify conditions, the <code>DeleteItem</code> is an idempotent operation; running it multiple times on the same item or attribute does <i>not</i> result in an error response.</p> <p>Conditional deletes are useful for deleting items only if specific conditions are met. If those conditions are met, DynamoDB performs the delete. Otherwise, the item is not deleted.</p>
5245 async fn delete_item(
5246 &self,
5247 input: DeleteItemInput,
5248 ) -> Result<DeleteItemOutput, RusotoError<DeleteItemError>>;
5249
5250 /// <p>The <code>DeleteTable</code> operation deletes a table and all of its items. After a <code>DeleteTable</code> request, the specified table is in the <code>DELETING</code> state until DynamoDB completes the deletion. If the table is in the <code>ACTIVE</code> state, you can delete it. If a table is in <code>CREATING</code> or <code>UPDATING</code> states, then DynamoDB returns a <code>ResourceInUseException</code>. If the specified table does not exist, DynamoDB returns a <code>ResourceNotFoundException</code>. If table is already in the <code>DELETING</code> state, no error is returned. </p> <note> <p>DynamoDB might continue to accept data read and write operations, such as <code>GetItem</code> and <code>PutItem</code>, on a table in the <code>DELETING</code> state until the table deletion is complete.</p> </note> <p>When you delete a table, any indexes on that table are also deleted.</p> <p>If you have DynamoDB Streams enabled on the table, then the corresponding stream on that table goes into the <code>DISABLED</code> state, and the stream is automatically deleted after 24 hours.</p> <p>Use the <code>DescribeTable</code> action to check the status of the table. </p>
5251 async fn delete_table(
5252 &self,
5253 input: DeleteTableInput,
5254 ) -> Result<DeleteTableOutput, RusotoError<DeleteTableError>>;
5255
5256 /// <p>Describes an existing backup of a table.</p> <p>You can call <code>DescribeBackup</code> at a maximum rate of 10 times per second.</p>
5257 async fn describe_backup(
5258 &self,
5259 input: DescribeBackupInput,
5260 ) -> Result<DescribeBackupOutput, RusotoError<DescribeBackupError>>;
5261
5262 /// <p>Checks the status of continuous backups and point in time recovery on the specified table. Continuous backups are <code>ENABLED</code> on all tables at table creation. If point in time recovery is enabled, <code>PointInTimeRecoveryStatus</code> will be set to ENABLED.</p> <p> After continuous backups and point in time recovery are enabled, you can restore to any point in time within <code>EarliestRestorableDateTime</code> and <code>LatestRestorableDateTime</code>. </p> <p> <code>LatestRestorableDateTime</code> is typically 5 minutes before the current time. You can restore your table to any point in time during the last 35 days. </p> <p>You can call <code>DescribeContinuousBackups</code> at a maximum rate of 10 times per second.</p>
5263 async fn describe_continuous_backups(
5264 &self,
5265 input: DescribeContinuousBackupsInput,
5266 ) -> Result<DescribeContinuousBackupsOutput, RusotoError<DescribeContinuousBackupsError>>;
5267
5268 /// <p>Returns information about contributor insights, for a given table or global secondary index.</p>
5269 async fn describe_contributor_insights(
5270 &self,
5271 input: DescribeContributorInsightsInput,
5272 ) -> Result<DescribeContributorInsightsOutput, RusotoError<DescribeContributorInsightsError>>;
5273
5274 /// <p>Returns the regional endpoint information.</p>
5275 async fn describe_endpoints(
5276 &self,
5277 ) -> Result<DescribeEndpointsResponse, RusotoError<DescribeEndpointsError>>;
5278
5279 /// <p><p>Returns information about the specified global table.</p> <note> <p>This operation only applies to <a href="https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/globaltables.V1.html">Version 2017.11.29</a> of global tables. If you are using global tables <a href="https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/globaltables.V2.html">Version 2019.11.21</a> you can use <a href="https://docs.aws.amazon.com/amazondynamodb/latest/APIReference/API_DescribeTable.html">DescribeTable</a> instead.</p> </note></p>
5280 async fn describe_global_table(
5281 &self,
5282 input: DescribeGlobalTableInput,
5283 ) -> Result<DescribeGlobalTableOutput, RusotoError<DescribeGlobalTableError>>;
5284
5285 /// <p><p>Describes Region-specific settings for a global table.</p> <note> <p>This operation only applies to <a href="https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/globaltables.V1.html">Version 2017.11.29</a> of global tables.</p> </note></p>
5286 async fn describe_global_table_settings(
5287 &self,
5288 input: DescribeGlobalTableSettingsInput,
5289 ) -> Result<DescribeGlobalTableSettingsOutput, RusotoError<DescribeGlobalTableSettingsError>>;
5290
5291 /// <p>Returns the current provisioned-capacity limits for your AWS account in a Region, both for the Region as a whole and for any one DynamoDB table that you create there.</p> <p>When you establish an AWS account, the account has initial limits on the maximum read capacity units and write capacity units that you can provision across all of your DynamoDB tables in a given Region. Also, there are per-table limits that apply when you create a table there. For more information, see <a href="https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Limits.html">Limits</a> page in the <i>Amazon DynamoDB Developer Guide</i>.</p> <p>Although you can increase these limits by filing a case at <a href="https://console.aws.amazon.com/support/home#/">AWS Support Center</a>, obtaining the increase is not instantaneous. The <code>DescribeLimits</code> action lets you write code to compare the capacity you are currently using to those limits imposed by your account so that you have enough time to apply for an increase before you hit a limit.</p> <p>For example, you could use one of the AWS SDKs to do the following:</p> <ol> <li> <p>Call <code>DescribeLimits</code> for a particular Region to obtain your current account limits on provisioned capacity there.</p> </li> <li> <p>Create a variable to hold the aggregate read capacity units provisioned for all your tables in that Region, and one to hold the aggregate write capacity units. Zero them both.</p> </li> <li> <p>Call <code>ListTables</code> to obtain a list of all your DynamoDB tables.</p> </li> <li> <p>For each table name listed by <code>ListTables</code>, do the following:</p> <ul> <li> <p>Call <code>DescribeTable</code> with the table name.</p> </li> <li> <p>Use the data returned by <code>DescribeTable</code> to add the read capacity units and write capacity units provisioned for the table itself to your variables.</p> </li> <li> <p>If the table has one or more global secondary indexes (GSIs), loop over these GSIs and add their provisioned capacity values to your variables as well.</p> </li> </ul> </li> <li> <p>Report the account limits for that Region returned by <code>DescribeLimits</code>, along with the total current provisioned capacity levels you have calculated.</p> </li> </ol> <p>This will let you see whether you are getting close to your account-level limits.</p> <p>The per-table limits apply only when you are creating a new table. They restrict the sum of the provisioned capacity of the new table itself and all its global secondary indexes.</p> <p>For existing tables and their GSIs, DynamoDB doesn't let you increase provisioned capacity extremely rapidly. But the only upper limit that applies is that the aggregate provisioned capacity over all your tables and GSIs cannot exceed either of the per-account limits.</p> <note> <p> <code>DescribeLimits</code> should only be called periodically. You can expect throttling errors if you call it more than once in a minute.</p> </note> <p>The <code>DescribeLimits</code> Request element has no content.</p>
5292 async fn describe_limits(
5293 &self,
5294 ) -> Result<DescribeLimitsOutput, RusotoError<DescribeLimitsError>>;
5295
5296 /// <p><p>Returns information about the table, including the current status of the table, when it was created, the primary key schema, and any indexes on the table.</p> <note> <p>If you issue a <code>DescribeTable</code> request immediately after a <code>CreateTable</code> request, DynamoDB might return a <code>ResourceNotFoundException</code>. This is because <code>DescribeTable</code> uses an eventually consistent query, and the metadata for your table might not be available at that moment. Wait for a few seconds, and then try the <code>DescribeTable</code> request again.</p> </note></p>
5297 async fn describe_table(
5298 &self,
5299 input: DescribeTableInput,
5300 ) -> Result<DescribeTableOutput, RusotoError<DescribeTableError>>;
5301
5302 /// <p><p>Describes auto scaling settings across replicas of the global table at once.</p> <note> <p>This operation only applies to <a href="https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/globaltables.V2.html">Version 2019.11.21</a> of global tables.</p> </note></p>
5303 async fn describe_table_replica_auto_scaling(
5304 &self,
5305 input: DescribeTableReplicaAutoScalingInput,
5306 ) -> Result<
5307 DescribeTableReplicaAutoScalingOutput,
5308 RusotoError<DescribeTableReplicaAutoScalingError>,
5309 >;
5310
5311 /// <p>Gives a description of the Time to Live (TTL) status on the specified table. </p>
5312 async fn describe_time_to_live(
5313 &self,
5314 input: DescribeTimeToLiveInput,
5315 ) -> Result<DescribeTimeToLiveOutput, RusotoError<DescribeTimeToLiveError>>;
5316
5317 /// <p>The <code>GetItem</code> operation returns a set of attributes for the item with the given primary key. If there is no matching item, <code>GetItem</code> does not return any data and there will be no <code>Item</code> element in the response.</p> <p> <code>GetItem</code> provides an eventually consistent read by default. If your application requires a strongly consistent read, set <code>ConsistentRead</code> to <code>true</code>. Although a strongly consistent read might take more time than an eventually consistent read, it always returns the last updated value.</p>
5318 async fn get_item(
5319 &self,
5320 input: GetItemInput,
5321 ) -> Result<GetItemOutput, RusotoError<GetItemError>>;
5322
5323 /// <p>List backups associated with an AWS account. To list backups for a given table, specify <code>TableName</code>. <code>ListBackups</code> returns a paginated list of results with at most 1 MB worth of items in a page. You can also specify a limit for the maximum number of entries to be returned in a page. </p> <p>In the request, start time is inclusive, but end time is exclusive. Note that these limits are for the time at which the original backup was requested.</p> <p>You can call <code>ListBackups</code> a maximum of five times per second.</p>
5324 async fn list_backups(
5325 &self,
5326 input: ListBackupsInput,
5327 ) -> Result<ListBackupsOutput, RusotoError<ListBackupsError>>;
5328
5329 /// <p>Returns a list of ContributorInsightsSummary for a table and all its global secondary indexes.</p>
5330 async fn list_contributor_insights(
5331 &self,
5332 input: ListContributorInsightsInput,
5333 ) -> Result<ListContributorInsightsOutput, RusotoError<ListContributorInsightsError>>;
5334
5335 /// <p><p>Lists all global tables that have a replica in the specified Region.</p> <note> <p>This operation only applies to <a href="https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/globaltables.V1.html">Version 2017.11.29</a> of global tables.</p> </note></p>
5336 async fn list_global_tables(
5337 &self,
5338 input: ListGlobalTablesInput,
5339 ) -> Result<ListGlobalTablesOutput, RusotoError<ListGlobalTablesError>>;
5340
5341 /// <p>Returns an array of table names associated with the current account and endpoint. The output from <code>ListTables</code> is paginated, with each page returning a maximum of 100 table names.</p>
5342 async fn list_tables(
5343 &self,
5344 input: ListTablesInput,
5345 ) -> Result<ListTablesOutput, RusotoError<ListTablesError>>;
5346
5347 /// <p>List all tags on an Amazon DynamoDB resource. You can call ListTagsOfResource up to 10 times per second, per account.</p> <p>For an overview on tagging DynamoDB resources, see <a href="https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Tagging.html">Tagging for DynamoDB</a> in the <i>Amazon DynamoDB Developer Guide</i>.</p>
5348 async fn list_tags_of_resource(
5349 &self,
5350 input: ListTagsOfResourceInput,
5351 ) -> Result<ListTagsOfResourceOutput, RusotoError<ListTagsOfResourceError>>;
5352
5353 /// <p>Creates a new item, or replaces an old item with a new item. If an item that has the same primary key as the new item already exists in the specified table, the new item completely replaces the existing item. You can perform a conditional put operation (add a new item if one with the specified primary key doesn't exist), or replace an existing item if it has certain attribute values. You can return the item's attribute values in the same operation, using the <code>ReturnValues</code> parameter.</p> <important> <p>This topic provides general information about the <code>PutItem</code> API.</p> <p>For information on how to call the <code>PutItem</code> API using the AWS SDK in specific languages, see the following:</p> <ul> <li> <p> <a href="http://docs.aws.amazon.com/goto/aws-cli/dynamodb-2012-08-10/PutItem"> PutItem in the AWS Command Line Interface</a> </p> </li> <li> <p> <a href="http://docs.aws.amazon.com/goto/DotNetSDKV3/dynamodb-2012-08-10/PutItem"> PutItem in the AWS SDK for .NET</a> </p> </li> <li> <p> <a href="http://docs.aws.amazon.com/goto/SdkForCpp/dynamodb-2012-08-10/PutItem"> PutItem in the AWS SDK for C++</a> </p> </li> <li> <p> <a href="http://docs.aws.amazon.com/goto/SdkForGoV1/dynamodb-2012-08-10/PutItem"> PutItem in the AWS SDK for Go</a> </p> </li> <li> <p> <a href="http://docs.aws.amazon.com/goto/SdkForJava/dynamodb-2012-08-10/PutItem"> PutItem in the AWS SDK for Java</a> </p> </li> <li> <p> <a href="http://docs.aws.amazon.com/goto/AWSJavaScriptSDK/dynamodb-2012-08-10/PutItem"> PutItem in the AWS SDK for JavaScript</a> </p> </li> <li> <p> <a href="http://docs.aws.amazon.com/goto/SdkForPHPV3/dynamodb-2012-08-10/PutItem"> PutItem in the AWS SDK for PHP V3</a> </p> </li> <li> <p> <a href="http://docs.aws.amazon.com/goto/boto3/dynamodb-2012-08-10/PutItem"> PutItem in the AWS SDK for Python</a> </p> </li> <li> <p> <a href="http://docs.aws.amazon.com/goto/SdkForRubyV2/dynamodb-2012-08-10/PutItem"> PutItem in the AWS SDK for Ruby V2</a> </p> </li> </ul> </important> <p>When you add an item, the primary key attributes are the only required attributes. Attribute values cannot be null.</p> <p>Empty String and Binary attribute values are allowed. Attribute values of type String and Binary must have a length greater than zero if the attribute is used as a key attribute for a table or index. Set type attributes cannot be empty. </p> <p>Invalid Requests with empty values will be rejected with a <code>ValidationException</code> exception.</p> <note> <p>To prevent a new item from replacing an existing item, use a conditional expression that contains the <code>attribute_not_exists</code> function with the name of the attribute being used as the partition key for the table. Since every record must contain that attribute, the <code>attribute_not_exists</code> function will only succeed if no matching item exists.</p> </note> <p>For more information about <code>PutItem</code>, see <a href="https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/WorkingWithItems.html">Working with Items</a> in the <i>Amazon DynamoDB Developer Guide</i>.</p>
5354 async fn put_item(
5355 &self,
5356 input: PutItemInput,
5357 ) -> Result<PutItemOutput, RusotoError<PutItemError>>;
5358
5359 /// <p>The <code>Query</code> operation finds items based on primary key values. You can query any table or secondary index that has a composite primary key (a partition key and a sort key). </p> <p>Use the <code>KeyConditionExpression</code> parameter to provide a specific value for the partition key. The <code>Query</code> operation will return all of the items from the table or index with that partition key value. You can optionally narrow the scope of the <code>Query</code> operation by specifying a sort key value and a comparison operator in <code>KeyConditionExpression</code>. To further refine the <code>Query</code> results, you can optionally provide a <code>FilterExpression</code>. A <code>FilterExpression</code> determines which items within the results should be returned to you. All of the other results are discarded. </p> <p> A <code>Query</code> operation always returns a result set. If no matching items are found, the result set will be empty. Queries that do not return results consume the minimum number of read capacity units for that type of read operation. </p> <note> <p> DynamoDB calculates the number of read capacity units consumed based on item size, not on the amount of data that is returned to an application. The number of capacity units consumed will be the same whether you request all of the attributes (the default behavior) or just some of them (using a projection expression). The number will also be the same whether or not you use a <code>FilterExpression</code>. </p> </note> <p> <code>Query</code> results are always sorted by the sort key value. If the data type of the sort key is Number, the results are returned in numeric order; otherwise, the results are returned in order of UTF-8 bytes. By default, the sort order is ascending. To reverse the order, set the <code>ScanIndexForward</code> parameter to false. </p> <p> A single <code>Query</code> operation will read up to the maximum number of items set (if using the <code>Limit</code> parameter) or a maximum of 1 MB of data and then apply any filtering to the results using <code>FilterExpression</code>. If <code>LastEvaluatedKey</code> is present in the response, you will need to paginate the result set. For more information, see <a href="https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Query.html#Query.Pagination">Paginating the Results</a> in the <i>Amazon DynamoDB Developer Guide</i>. </p> <p> <code>FilterExpression</code> is applied after a <code>Query</code> finishes, but before the results are returned. A <code>FilterExpression</code> cannot contain partition key or sort key attributes. You need to specify those attributes in the <code>KeyConditionExpression</code>. </p> <note> <p> A <code>Query</code> operation can return an empty result set and a <code>LastEvaluatedKey</code> if all the items read for the page of results are filtered out. </p> </note> <p>You can query a table, a local secondary index, or a global secondary index. For a query on a table or on a local secondary index, you can set the <code>ConsistentRead</code> parameter to <code>true</code> and obtain a strongly consistent result. Global secondary indexes support eventually consistent reads only, so do not specify <code>ConsistentRead</code> when querying a global secondary index.</p>
5360 async fn query(&self, input: QueryInput) -> Result<QueryOutput, RusotoError<QueryError>>;
5361
5362 /// <p><p>Creates a new table from an existing backup. Any number of users can execute up to 4 concurrent restores (any type of restore) in a given account. </p> <p>You can call <code>RestoreTableFromBackup</code> at a maximum rate of 10 times per second.</p> <p>You must manually set up the following on the restored table:</p> <ul> <li> <p>Auto scaling policies</p> </li> <li> <p>IAM policies</p> </li> <li> <p>Amazon CloudWatch metrics and alarms</p> </li> <li> <p>Tags</p> </li> <li> <p>Stream settings</p> </li> <li> <p>Time to Live (TTL) settings</p> </li> </ul></p>
5363 async fn restore_table_from_backup(
5364 &self,
5365 input: RestoreTableFromBackupInput,
5366 ) -> Result<RestoreTableFromBackupOutput, RusotoError<RestoreTableFromBackupError>>;
5367
5368 /// <p><p>Restores the specified table to the specified point in time within <code>EarliestRestorableDateTime</code> and <code>LatestRestorableDateTime</code>. You can restore your table to any point in time during the last 35 days. Any number of users can execute up to 4 concurrent restores (any type of restore) in a given account. </p> <p> When you restore using point in time recovery, DynamoDB restores your table data to the state based on the selected date and time (day:hour:minute:second) to a new table. </p> <p> Along with data, the following are also included on the new restored table using point in time recovery: </p> <ul> <li> <p>Global secondary indexes (GSIs)</p> </li> <li> <p>Local secondary indexes (LSIs)</p> </li> <li> <p>Provisioned read and write capacity</p> </li> <li> <p>Encryption settings</p> <important> <p> All these settings come from the current settings of the source table at the time of restore. </p> </important> </li> </ul> <p>You must manually set up the following on the restored table:</p> <ul> <li> <p>Auto scaling policies</p> </li> <li> <p>IAM policies</p> </li> <li> <p>Amazon CloudWatch metrics and alarms</p> </li> <li> <p>Tags</p> </li> <li> <p>Stream settings</p> </li> <li> <p>Time to Live (TTL) settings</p> </li> <li> <p>Point in time recovery settings</p> </li> </ul></p>
5369 async fn restore_table_to_point_in_time(
5370 &self,
5371 input: RestoreTableToPointInTimeInput,
5372 ) -> Result<RestoreTableToPointInTimeOutput, RusotoError<RestoreTableToPointInTimeError>>;
5373
5374 /// <p>The <code>Scan</code> operation returns one or more items and item attributes by accessing every item in a table or a secondary index. To have DynamoDB return fewer items, you can provide a <code>FilterExpression</code> operation.</p> <p>If the total number of scanned items exceeds the maximum dataset size limit of 1 MB, the scan stops and results are returned to the user as a <code>LastEvaluatedKey</code> value to continue the scan in a subsequent operation. The results also include the number of items exceeding the limit. A scan can result in no table data meeting the filter criteria. </p> <p>A single <code>Scan</code> operation reads up to the maximum number of items set (if using the <code>Limit</code> parameter) or a maximum of 1 MB of data and then apply any filtering to the results using <code>FilterExpression</code>. If <code>LastEvaluatedKey</code> is present in the response, you need to paginate the result set. For more information, see <a href="https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Scan.html#Scan.Pagination">Paginating the Results</a> in the <i>Amazon DynamoDB Developer Guide</i>. </p> <p> <code>Scan</code> operations proceed sequentially; however, for faster performance on a large table or secondary index, applications can request a parallel <code>Scan</code> operation by providing the <code>Segment</code> and <code>TotalSegments</code> parameters. For more information, see <a href="https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Scan.html#Scan.ParallelScan">Parallel Scan</a> in the <i>Amazon DynamoDB Developer Guide</i>.</p> <p> <code>Scan</code> uses eventually consistent reads when accessing the data in a table; therefore, the result set might not include the changes to data in the table immediately before the operation began. If you need a consistent copy of the data, as of the time that the <code>Scan</code> begins, you can set the <code>ConsistentRead</code> parameter to <code>true</code>.</p>
5375 async fn scan(&self, input: ScanInput) -> Result<ScanOutput, RusotoError<ScanError>>;
5376
5377 /// <p>Associate a set of tags with an Amazon DynamoDB resource. You can then activate these user-defined tags so that they appear on the Billing and Cost Management console for cost allocation tracking. You can call TagResource up to five times per second, per account. </p> <p>For an overview on tagging DynamoDB resources, see <a href="https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Tagging.html">Tagging for DynamoDB</a> in the <i>Amazon DynamoDB Developer Guide</i>.</p>
5378 async fn tag_resource(
5379 &self,
5380 input: TagResourceInput,
5381 ) -> Result<(), RusotoError<TagResourceError>>;
5382
5383 /// <p><p> <code>TransactGetItems</code> is a synchronous operation that atomically retrieves multiple items from one or more tables (but not from indexes) in a single account and Region. A <code>TransactGetItems</code> call can contain up to 25 <code>TransactGetItem</code> objects, each of which contains a <code>Get</code> structure that specifies an item to retrieve from a table in the account and Region. A call to <code>TransactGetItems</code> cannot retrieve items from tables in more than one AWS account or Region. The aggregate size of the items in the transaction cannot exceed 4 MB.</p> <p>DynamoDB rejects the entire <code>TransactGetItems</code> request if any of the following is true:</p> <ul> <li> <p>A conflicting operation is in the process of updating an item to be read.</p> </li> <li> <p>There is insufficient provisioned capacity for the transaction to be completed.</p> </li> <li> <p>There is a user error, such as an invalid data format.</p> </li> <li> <p>The aggregate size of the items in the transaction cannot exceed 4 MB.</p> </li> </ul></p>
5384 async fn transact_get_items(
5385 &self,
5386 input: TransactGetItemsInput,
5387 ) -> Result<TransactGetItemsOutput, RusotoError<TransactGetItemsError>>;
5388
5389 /// <p><p> <code>TransactWriteItems</code> is a synchronous write operation that groups up to 25 action requests. These actions can target items in different tables, but not in different AWS accounts or Regions, and no two actions can target the same item. For example, you cannot both <code>ConditionCheck</code> and <code>Update</code> the same item. The aggregate size of the items in the transaction cannot exceed 4 MB.</p> <p>The actions are completed atomically so that either all of them succeed, or all of them fail. They are defined by the following objects:</p> <ul> <li> <p> <code>Put</code> — Initiates a <code>PutItem</code> operation to write a new item. This structure specifies the primary key of the item to be written, the name of the table to write it in, an optional condition expression that must be satisfied for the write to succeed, a list of the item's attributes, and a field indicating whether to retrieve the item's attributes if the condition is not met.</p> </li> <li> <p> <code>Update</code> — Initiates an <code>UpdateItem</code> operation to update an existing item. This structure specifies the primary key of the item to be updated, the name of the table where it resides, an optional condition expression that must be satisfied for the update to succeed, an expression that defines one or more attributes to be updated, and a field indicating whether to retrieve the item's attributes if the condition is not met.</p> </li> <li> <p> <code>Delete</code> — Initiates a <code>DeleteItem</code> operation to delete an existing item. This structure specifies the primary key of the item to be deleted, the name of the table where it resides, an optional condition expression that must be satisfied for the deletion to succeed, and a field indicating whether to retrieve the item's attributes if the condition is not met.</p> </li> <li> <p> <code>ConditionCheck</code> — Applies a condition to an item that is not being modified by the transaction. This structure specifies the primary key of the item to be checked, the name of the table where it resides, a condition expression that must be satisfied for the transaction to succeed, and a field indicating whether to retrieve the item's attributes if the condition is not met.</p> </li> </ul> <p>DynamoDB rejects the entire <code>TransactWriteItems</code> request if any of the following is true:</p> <ul> <li> <p>A condition in one of the condition expressions is not met.</p> </li> <li> <p>An ongoing operation is in the process of updating the same item.</p> </li> <li> <p>There is insufficient provisioned capacity for the transaction to be completed.</p> </li> <li> <p>An item size becomes too large (bigger than 400 KB), a local secondary index (LSI) becomes too large, or a similar validation error occurs because of changes made by the transaction.</p> </li> <li> <p>The aggregate size of the items in the transaction exceeds 4 MB.</p> </li> <li> <p>There is a user error, such as an invalid data format.</p> </li> </ul></p>
5390 async fn transact_write_items(
5391 &self,
5392 input: TransactWriteItemsInput,
5393 ) -> Result<TransactWriteItemsOutput, RusotoError<TransactWriteItemsError>>;
5394
5395 /// <p>Removes the association of tags from an Amazon DynamoDB resource. You can call <code>UntagResource</code> up to five times per second, per account. </p> <p>For an overview on tagging DynamoDB resources, see <a href="https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Tagging.html">Tagging for DynamoDB</a> in the <i>Amazon DynamoDB Developer Guide</i>.</p>
5396 async fn untag_resource(
5397 &self,
5398 input: UntagResourceInput,
5399 ) -> Result<(), RusotoError<UntagResourceError>>;
5400
5401 /// <p> <code>UpdateContinuousBackups</code> enables or disables point in time recovery for the specified table. A successful <code>UpdateContinuousBackups</code> call returns the current <code>ContinuousBackupsDescription</code>. Continuous backups are <code>ENABLED</code> on all tables at table creation. If point in time recovery is enabled, <code>PointInTimeRecoveryStatus</code> will be set to ENABLED.</p> <p> Once continuous backups and point in time recovery are enabled, you can restore to any point in time within <code>EarliestRestorableDateTime</code> and <code>LatestRestorableDateTime</code>. </p> <p> <code>LatestRestorableDateTime</code> is typically 5 minutes before the current time. You can restore your table to any point in time during the last 35 days. </p>
5402 async fn update_continuous_backups(
5403 &self,
5404 input: UpdateContinuousBackupsInput,
5405 ) -> Result<UpdateContinuousBackupsOutput, RusotoError<UpdateContinuousBackupsError>>;
5406
5407 /// <p>Updates the status for contributor insights for a specific table or index.</p>
5408 async fn update_contributor_insights(
5409 &self,
5410 input: UpdateContributorInsightsInput,
5411 ) -> Result<UpdateContributorInsightsOutput, RusotoError<UpdateContributorInsightsError>>;
5412
5413 /// <p><p>Adds or removes replicas in the specified global table. The global table must already exist to be able to use this operation. Any replica to be added must be empty, have the same name as the global table, have the same key schema, have DynamoDB Streams enabled, and have the same provisioned and maximum write capacity units.</p> <note> <p>Although you can use <code>UpdateGlobalTable</code> to add replicas and remove replicas in a single request, for simplicity we recommend that you issue separate requests for adding or removing replicas.</p> </note> <p> If global secondary indexes are specified, then the following conditions must also be met: </p> <ul> <li> <p> The global secondary indexes must have the same name. </p> </li> <li> <p> The global secondary indexes must have the same hash key and sort key (if present). </p> </li> <li> <p> The global secondary indexes must have the same provisioned and maximum write capacity units. </p> </li> </ul></p>
5414 async fn update_global_table(
5415 &self,
5416 input: UpdateGlobalTableInput,
5417 ) -> Result<UpdateGlobalTableOutput, RusotoError<UpdateGlobalTableError>>;
5418
5419 /// <p>Updates settings for a global table.</p>
5420 async fn update_global_table_settings(
5421 &self,
5422 input: UpdateGlobalTableSettingsInput,
5423 ) -> Result<UpdateGlobalTableSettingsOutput, RusotoError<UpdateGlobalTableSettingsError>>;
5424
5425 /// <p>Edits an existing item's attributes, or adds a new item to the table if it does not already exist. You can put, delete, or add attribute values. You can also perform a conditional update on an existing item (insert a new attribute name-value pair if it doesn't exist, or replace an existing name-value pair if it has certain expected attribute values).</p> <p>You can also return the item's attribute values in the same <code>UpdateItem</code> operation using the <code>ReturnValues</code> parameter.</p>
5426 async fn update_item(
5427 &self,
5428 input: UpdateItemInput,
5429 ) -> Result<UpdateItemOutput, RusotoError<UpdateItemError>>;
5430
5431 /// <p>Modifies the provisioned throughput settings, global secondary indexes, or DynamoDB Streams settings for a given table.</p> <p>You can only perform one of the following operations at once:</p> <ul> <li> <p>Modify the provisioned throughput settings of the table.</p> </li> <li> <p>Enable or disable DynamoDB Streams on the table.</p> </li> <li> <p>Remove a global secondary index from the table.</p> </li> <li> <p>Create a new global secondary index on the table. After the index begins backfilling, you can use <code>UpdateTable</code> to perform other operations.</p> </li> </ul> <p> <code>UpdateTable</code> is an asynchronous operation; while it is executing, the table status changes from <code>ACTIVE</code> to <code>UPDATING</code>. While it is <code>UPDATING</code>, you cannot issue another <code>UpdateTable</code> request. When the table returns to the <code>ACTIVE</code> state, the <code>UpdateTable</code> operation is complete.</p>
5432 async fn update_table(
5433 &self,
5434 input: UpdateTableInput,
5435 ) -> Result<UpdateTableOutput, RusotoError<UpdateTableError>>;
5436
5437 /// <p><p>Updates auto scaling settings on your global tables at once.</p> <note> <p>This operation only applies to <a href="https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/globaltables.V2.html">Version 2019.11.21</a> of global tables.</p> </note></p>
5438 async fn update_table_replica_auto_scaling(
5439 &self,
5440 input: UpdateTableReplicaAutoScalingInput,
5441 ) -> Result<UpdateTableReplicaAutoScalingOutput, RusotoError<UpdateTableReplicaAutoScalingError>>;
5442
5443 /// <p>The <code>UpdateTimeToLive</code> method enables or disables Time to Live (TTL) for the specified table. A successful <code>UpdateTimeToLive</code> call returns the current <code>TimeToLiveSpecification</code>. It can take up to one hour for the change to fully process. Any additional <code>UpdateTimeToLive</code> calls for the same table during this one hour duration result in a <code>ValidationException</code>. </p> <p>TTL compares the current time in epoch time format to the time stored in the TTL attribute of an item. If the epoch time value stored in the attribute is less than the current time, the item is marked as expired and subsequently deleted.</p> <note> <p> The epoch time format is the number of seconds elapsed since 12:00:00 AM January 1, 1970 UTC. </p> </note> <p>DynamoDB deletes expired items on a best-effort basis to ensure availability of throughput for other data operations. </p> <important> <p>DynamoDB typically deletes expired items within two days of expiration. The exact duration within which an item gets deleted after expiration is specific to the nature of the workload. Items that have expired and not been deleted will still show up in reads, queries, and scans.</p> </important> <p>As items are deleted, they are removed from any local secondary index and global secondary index immediately in the same eventually consistent way as a standard delete operation.</p> <p>For more information, see <a href="https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/TTL.html">Time To Live</a> in the Amazon DynamoDB Developer Guide. </p>
5444 async fn update_time_to_live(
5445 &self,
5446 input: UpdateTimeToLiveInput,
5447 ) -> Result<UpdateTimeToLiveOutput, RusotoError<UpdateTimeToLiveError>>;
5448}
5449/// A client for the DynamoDB API.
5450#[derive(Clone)]
5451pub struct DynamoDbClient {
5452 client: Client,
5453 region: region::Region,
5454}
5455
5456impl DynamoDbClient {
5457 /// Creates a client backed by the default tokio event loop.
5458 ///
5459 /// The client will use the default credentials provider and tls client.
5460 pub fn new(region: region::Region) -> DynamoDbClient {
5461 DynamoDbClient {
5462 client: Client::shared(),
5463 region,
5464 }
5465 }
5466
5467 pub fn new_with<P, D>(
5468 request_dispatcher: D,
5469 credentials_provider: P,
5470 region: region::Region,
5471 ) -> DynamoDbClient
5472 where
5473 P: ProvideAwsCredentials + Send + Sync + 'static,
5474 D: DispatchSignedRequest + Send + Sync + 'static,
5475 {
5476 DynamoDbClient {
5477 client: Client::new_with(credentials_provider, request_dispatcher),
5478 region,
5479 }
5480 }
5481
5482 pub fn new_with_client(client: Client, region: region::Region) -> DynamoDbClient {
5483 DynamoDbClient { client, region }
5484 }
5485}
5486
5487#[async_trait]
5488impl DynamoDb for DynamoDbClient {
5489 /// <p>The <code>BatchGetItem</code> operation returns the attributes of one or more items from one or more tables. You identify requested items by primary key.</p> <p>A single operation can retrieve up to 16 MB of data, which can contain as many as 100 items. <code>BatchGetItem</code> returns a partial result if the response size limit is exceeded, the table's provisioned throughput is exceeded, or an internal processing failure occurs. If a partial result is returned, the operation returns a value for <code>UnprocessedKeys</code>. You can use this value to retry the operation starting with the next item to get.</p> <important> <p>If you request more than 100 items, <code>BatchGetItem</code> returns a <code>ValidationException</code> with the message "Too many items requested for the BatchGetItem call."</p> </important> <p>For example, if you ask to retrieve 100 items, but each individual item is 300 KB in size, the system returns 52 items (so as not to exceed the 16 MB limit). It also returns an appropriate <code>UnprocessedKeys</code> value so you can get the next page of results. If desired, your application can include its own logic to assemble the pages of results into one dataset.</p> <p>If <i>none</i> of the items can be processed due to insufficient provisioned throughput on all of the tables in the request, then <code>BatchGetItem</code> returns a <code>ProvisionedThroughputExceededException</code>. If <i>at least one</i> of the items is successfully processed, then <code>BatchGetItem</code> completes successfully, while returning the keys of the unread items in <code>UnprocessedKeys</code>.</p> <important> <p>If DynamoDB returns any unprocessed items, you should retry the batch operation on those items. However, <i>we strongly recommend that you use an exponential backoff algorithm</i>. If you retry the batch operation immediately, the underlying read or write requests can still fail due to throttling on the individual tables. If you delay the batch operation using exponential backoff, the individual requests in the batch are much more likely to succeed.</p> <p>For more information, see <a href="https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/ErrorHandling.html#BatchOperations">Batch Operations and Error Handling</a> in the <i>Amazon DynamoDB Developer Guide</i>.</p> </important> <p>By default, <code>BatchGetItem</code> performs eventually consistent reads on every table in the request. If you want strongly consistent reads instead, you can set <code>ConsistentRead</code> to <code>true</code> for any or all tables.</p> <p>In order to minimize response latency, <code>BatchGetItem</code> retrieves items in parallel.</p> <p>When designing your application, keep in mind that DynamoDB does not return items in any particular order. To help parse the response by item, include the primary key values for the items in your request in the <code>ProjectionExpression</code> parameter.</p> <p>If a requested item does not exist, it is not returned in the result. Requests for nonexistent items consume the minimum read capacity units according to the type of read. For more information, see <a href="https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/WorkingWithTables.html#CapacityUnitCalculations">Working with Tables</a> in the <i>Amazon DynamoDB Developer Guide</i>.</p>
5490 async fn batch_get_item(
5491 &self,
5492 input: BatchGetItemInput,
5493 ) -> Result<BatchGetItemOutput, RusotoError<BatchGetItemError>> {
5494 let mut request = self.new_signed_request("POST", "/");
5495 request.add_header("x-amz-target", "DynamoDB_20120810.BatchGetItem");
5496 let encoded = serde_json::to_string(&input).unwrap();
5497 request.set_payload(Some(encoded));
5498
5499 let response = self
5500 .sign_and_dispatch(request, BatchGetItemError::from_response)
5501 .await?;
5502 let mut response = response;
5503 let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
5504 proto::json::ResponsePayload::new(&response).deserialize::<BatchGetItemOutput, _>()
5505 }
5506
5507 /// <p><p>The <code>BatchWriteItem</code> operation puts or deletes multiple items in one or more tables. A single call to <code>BatchWriteItem</code> can write up to 16 MB of data, which can comprise as many as 25 put or delete requests. Individual items to be written can be as large as 400 KB.</p> <note> <p> <code>BatchWriteItem</code> cannot update items. To update items, use the <code>UpdateItem</code> action.</p> </note> <p>The individual <code>PutItem</code> and <code>DeleteItem</code> operations specified in <code>BatchWriteItem</code> are atomic; however <code>BatchWriteItem</code> as a whole is not. If any requested operations fail because the table's provisioned throughput is exceeded or an internal processing failure occurs, the failed operations are returned in the <code>UnprocessedItems</code> response parameter. You can investigate and optionally resend the requests. Typically, you would call <code>BatchWriteItem</code> in a loop. Each iteration would check for unprocessed items and submit a new <code>BatchWriteItem</code> request with those unprocessed items until all items have been processed.</p> <p>If <i>none</i> of the items can be processed due to insufficient provisioned throughput on all of the tables in the request, then <code>BatchWriteItem</code> returns a <code>ProvisionedThroughputExceededException</code>.</p> <important> <p>If DynamoDB returns any unprocessed items, you should retry the batch operation on those items. However, <i>we strongly recommend that you use an exponential backoff algorithm</i>. If you retry the batch operation immediately, the underlying read or write requests can still fail due to throttling on the individual tables. If you delay the batch operation using exponential backoff, the individual requests in the batch are much more likely to succeed.</p> <p>For more information, see <a href="https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/ErrorHandling.html#Programming.Errors.BatchOperations">Batch Operations and Error Handling</a> in the <i>Amazon DynamoDB Developer Guide</i>.</p> </important> <p>With <code>BatchWriteItem</code>, you can efficiently write or delete large amounts of data, such as from Amazon EMR, or copy data from another database into DynamoDB. In order to improve performance with these large-scale operations, <code>BatchWriteItem</code> does not behave in the same way as individual <code>PutItem</code> and <code>DeleteItem</code> calls would. For example, you cannot specify conditions on individual put and delete requests, and <code>BatchWriteItem</code> does not return deleted items in the response.</p> <p>If you use a programming language that supports concurrency, you can use threads to write items in parallel. Your application must include the necessary logic to manage the threads. With languages that don't support threading, you must update or delete the specified items one at a time. In both situations, <code>BatchWriteItem</code> performs the specified put and delete operations in parallel, giving you the power of the thread pool approach without having to introduce complexity into your application.</p> <p>Parallel processing reduces latency, but each specified put and delete request consumes the same number of write capacity units whether it is processed in parallel or not. Delete operations on nonexistent items consume one write capacity unit.</p> <p>If one or more of the following is true, DynamoDB rejects the entire batch write operation:</p> <ul> <li> <p>One or more tables specified in the <code>BatchWriteItem</code> request does not exist.</p> </li> <li> <p>Primary key attributes specified on an item in the request do not match those in the corresponding table's primary key schema.</p> </li> <li> <p>You try to perform multiple operations on the same item in the same <code>BatchWriteItem</code> request. For example, you cannot put and delete the same item in the same <code>BatchWriteItem</code> request. </p> </li> <li> <p> Your request contains at least two items with identical hash and range keys (which essentially is two put operations). </p> </li> <li> <p>There are more than 25 requests in the batch.</p> </li> <li> <p>Any individual item in a batch exceeds 400 KB.</p> </li> <li> <p>The total request size exceeds 16 MB.</p> </li> </ul></p>
5508 async fn batch_write_item(
5509 &self,
5510 input: BatchWriteItemInput,
5511 ) -> Result<BatchWriteItemOutput, RusotoError<BatchWriteItemError>> {
5512 let mut request = self.new_signed_request("POST", "/");
5513 request.add_header("x-amz-target", "DynamoDB_20120810.BatchWriteItem");
5514 let encoded = serde_json::to_string(&input).unwrap();
5515 request.set_payload(Some(encoded));
5516
5517 let response = self
5518 .sign_and_dispatch(request, BatchWriteItemError::from_response)
5519 .await?;
5520 let mut response = response;
5521 let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
5522 proto::json::ResponsePayload::new(&response).deserialize::<BatchWriteItemOutput, _>()
5523 }
5524
5525 /// <p><p>Creates a backup for an existing table.</p> <p> Each time you create an on-demand backup, the entire table data is backed up. There is no limit to the number of on-demand backups that can be taken. </p> <p> When you create an on-demand backup, a time marker of the request is cataloged, and the backup is created asynchronously, by applying all changes until the time of the request to the last full table snapshot. Backup requests are processed instantaneously and become available for restore within minutes. </p> <p>You can call <code>CreateBackup</code> at a maximum rate of 50 times per second.</p> <p>All backups in DynamoDB work without consuming any provisioned throughput on the table.</p> <p> If you submit a backup request on 2018-12-14 at 14:25:00, the backup is guaranteed to contain all data committed to the table up to 14:24:00, and data committed after 14:26:00 will not be. The backup might contain data modifications made between 14:24:00 and 14:26:00. On-demand backup does not support causal consistency. </p> <p> Along with data, the following are also included on the backups: </p> <ul> <li> <p>Global secondary indexes (GSIs)</p> </li> <li> <p>Local secondary indexes (LSIs)</p> </li> <li> <p>Streams</p> </li> <li> <p>Provisioned read and write capacity</p> </li> </ul></p>
5526 async fn create_backup(
5527 &self,
5528 input: CreateBackupInput,
5529 ) -> Result<CreateBackupOutput, RusotoError<CreateBackupError>> {
5530 let mut request = self.new_signed_request("POST", "/");
5531 request.add_header("x-amz-target", "DynamoDB_20120810.CreateBackup");
5532 let encoded = serde_json::to_string(&input).unwrap();
5533 request.set_payload(Some(encoded));
5534
5535 let response = self
5536 .sign_and_dispatch(request, CreateBackupError::from_response)
5537 .await?;
5538 let mut response = response;
5539 let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
5540 proto::json::ResponsePayload::new(&response).deserialize::<CreateBackupOutput, _>()
5541 }
5542
5543 /// <p><p>Creates a global table from an existing table. A global table creates a replication relationship between two or more DynamoDB tables with the same table name in the provided Regions. </p> <note> <p>This operation only applies to <a href="https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/globaltables.V1.html">Version 2017.11.29</a> of global tables.</p> </note> <p>If you want to add a new replica table to a global table, each of the following conditions must be true:</p> <ul> <li> <p>The table must have the same primary key as all of the other replicas.</p> </li> <li> <p>The table must have the same name as all of the other replicas.</p> </li> <li> <p>The table must have DynamoDB Streams enabled, with the stream containing both the new and the old images of the item.</p> </li> <li> <p>None of the replica tables in the global table can contain any data.</p> </li> </ul> <p> If global secondary indexes are specified, then the following conditions must also be met: </p> <ul> <li> <p> The global secondary indexes must have the same name. </p> </li> <li> <p> The global secondary indexes must have the same hash key and sort key (if present). </p> </li> </ul> <p> If local secondary indexes are specified, then the following conditions must also be met: </p> <ul> <li> <p> The local secondary indexes must have the same name. </p> </li> <li> <p> The local secondary indexes must have the same hash key and sort key (if present). </p> </li> </ul> <important> <p> Write capacity settings should be set consistently across your replica tables and secondary indexes. DynamoDB strongly recommends enabling auto scaling to manage the write capacity settings for all of your global tables replicas and indexes. </p> <p> If you prefer to manage write capacity settings manually, you should provision equal replicated write capacity units to your replica tables. You should also provision equal replicated write capacity units to matching secondary indexes across your global table. </p> </important></p>
5544 async fn create_global_table(
5545 &self,
5546 input: CreateGlobalTableInput,
5547 ) -> Result<CreateGlobalTableOutput, RusotoError<CreateGlobalTableError>> {
5548 let mut request = self.new_signed_request("POST", "/");
5549 request.add_header("x-amz-target", "DynamoDB_20120810.CreateGlobalTable");
5550 let encoded = serde_json::to_string(&input).unwrap();
5551 request.set_payload(Some(encoded));
5552
5553 let response = self
5554 .sign_and_dispatch(request, CreateGlobalTableError::from_response)
5555 .await?;
5556 let mut response = response;
5557 let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
5558 proto::json::ResponsePayload::new(&response).deserialize::<CreateGlobalTableOutput, _>()
5559 }
5560
5561 /// <p>The <code>CreateTable</code> operation adds a new table to your account. In an AWS account, table names must be unique within each Region. That is, you can have two tables with same name if you create the tables in different Regions.</p> <p> <code>CreateTable</code> is an asynchronous operation. Upon receiving a <code>CreateTable</code> request, DynamoDB immediately returns a response with a <code>TableStatus</code> of <code>CREATING</code>. After the table is created, DynamoDB sets the <code>TableStatus</code> to <code>ACTIVE</code>. You can perform read and write operations only on an <code>ACTIVE</code> table. </p> <p>You can optionally define secondary indexes on the new table, as part of the <code>CreateTable</code> operation. If you want to create multiple tables with secondary indexes on them, you must create the tables sequentially. Only one table with secondary indexes can be in the <code>CREATING</code> state at any given time.</p> <p>You can use the <code>DescribeTable</code> action to check the table status.</p>
5562 async fn create_table(
5563 &self,
5564 input: CreateTableInput,
5565 ) -> Result<CreateTableOutput, RusotoError<CreateTableError>> {
5566 let mut request = self.new_signed_request("POST", "/");
5567 request.add_header("x-amz-target", "DynamoDB_20120810.CreateTable");
5568 let encoded = serde_json::to_string(&input).unwrap();
5569 request.set_payload(Some(encoded));
5570
5571 let response = self
5572 .sign_and_dispatch(request, CreateTableError::from_response)
5573 .await?;
5574 let mut response = response;
5575 let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
5576 proto::json::ResponsePayload::new(&response).deserialize::<CreateTableOutput, _>()
5577 }
5578
5579 /// <p>Deletes an existing backup of a table.</p> <p>You can call <code>DeleteBackup</code> at a maximum rate of 10 times per second.</p>
5580 async fn delete_backup(
5581 &self,
5582 input: DeleteBackupInput,
5583 ) -> Result<DeleteBackupOutput, RusotoError<DeleteBackupError>> {
5584 let mut request = self.new_signed_request("POST", "/");
5585 request.add_header("x-amz-target", "DynamoDB_20120810.DeleteBackup");
5586 let encoded = serde_json::to_string(&input).unwrap();
5587 request.set_payload(Some(encoded));
5588
5589 let response = self
5590 .sign_and_dispatch(request, DeleteBackupError::from_response)
5591 .await?;
5592 let mut response = response;
5593 let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
5594 proto::json::ResponsePayload::new(&response).deserialize::<DeleteBackupOutput, _>()
5595 }
5596
5597 /// <p>Deletes a single item in a table by primary key. You can perform a conditional delete operation that deletes the item if it exists, or if it has an expected attribute value.</p> <p>In addition to deleting an item, you can also return the item's attribute values in the same operation, using the <code>ReturnValues</code> parameter.</p> <p>Unless you specify conditions, the <code>DeleteItem</code> is an idempotent operation; running it multiple times on the same item or attribute does <i>not</i> result in an error response.</p> <p>Conditional deletes are useful for deleting items only if specific conditions are met. If those conditions are met, DynamoDB performs the delete. Otherwise, the item is not deleted.</p>
5598 async fn delete_item(
5599 &self,
5600 input: DeleteItemInput,
5601 ) -> Result<DeleteItemOutput, RusotoError<DeleteItemError>> {
5602 let mut request = self.new_signed_request("POST", "/");
5603 request.add_header("x-amz-target", "DynamoDB_20120810.DeleteItem");
5604 let encoded = serde_json::to_string(&input).unwrap();
5605 request.set_payload(Some(encoded));
5606
5607 let response = self
5608 .sign_and_dispatch(request, DeleteItemError::from_response)
5609 .await?;
5610 let mut response = response;
5611 let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
5612 proto::json::ResponsePayload::new(&response).deserialize::<DeleteItemOutput, _>()
5613 }
5614
5615 /// <p>The <code>DeleteTable</code> operation deletes a table and all of its items. After a <code>DeleteTable</code> request, the specified table is in the <code>DELETING</code> state until DynamoDB completes the deletion. If the table is in the <code>ACTIVE</code> state, you can delete it. If a table is in <code>CREATING</code> or <code>UPDATING</code> states, then DynamoDB returns a <code>ResourceInUseException</code>. If the specified table does not exist, DynamoDB returns a <code>ResourceNotFoundException</code>. If table is already in the <code>DELETING</code> state, no error is returned. </p> <note> <p>DynamoDB might continue to accept data read and write operations, such as <code>GetItem</code> and <code>PutItem</code>, on a table in the <code>DELETING</code> state until the table deletion is complete.</p> </note> <p>When you delete a table, any indexes on that table are also deleted.</p> <p>If you have DynamoDB Streams enabled on the table, then the corresponding stream on that table goes into the <code>DISABLED</code> state, and the stream is automatically deleted after 24 hours.</p> <p>Use the <code>DescribeTable</code> action to check the status of the table. </p>
5616 async fn delete_table(
5617 &self,
5618 input: DeleteTableInput,
5619 ) -> Result<DeleteTableOutput, RusotoError<DeleteTableError>> {
5620 let mut request = self.new_signed_request("POST", "/");
5621 request.add_header("x-amz-target", "DynamoDB_20120810.DeleteTable");
5622 let encoded = serde_json::to_string(&input).unwrap();
5623 request.set_payload(Some(encoded));
5624
5625 let response = self
5626 .sign_and_dispatch(request, DeleteTableError::from_response)
5627 .await?;
5628 let mut response = response;
5629 let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
5630 proto::json::ResponsePayload::new(&response).deserialize::<DeleteTableOutput, _>()
5631 }
5632
5633 /// <p>Describes an existing backup of a table.</p> <p>You can call <code>DescribeBackup</code> at a maximum rate of 10 times per second.</p>
5634 async fn describe_backup(
5635 &self,
5636 input: DescribeBackupInput,
5637 ) -> Result<DescribeBackupOutput, RusotoError<DescribeBackupError>> {
5638 let mut request = self.new_signed_request("POST", "/");
5639 request.add_header("x-amz-target", "DynamoDB_20120810.DescribeBackup");
5640 let encoded = serde_json::to_string(&input).unwrap();
5641 request.set_payload(Some(encoded));
5642
5643 let response = self
5644 .sign_and_dispatch(request, DescribeBackupError::from_response)
5645 .await?;
5646 let mut response = response;
5647 let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
5648 proto::json::ResponsePayload::new(&response).deserialize::<DescribeBackupOutput, _>()
5649 }
5650
5651 /// <p>Checks the status of continuous backups and point in time recovery on the specified table. Continuous backups are <code>ENABLED</code> on all tables at table creation. If point in time recovery is enabled, <code>PointInTimeRecoveryStatus</code> will be set to ENABLED.</p> <p> After continuous backups and point in time recovery are enabled, you can restore to any point in time within <code>EarliestRestorableDateTime</code> and <code>LatestRestorableDateTime</code>. </p> <p> <code>LatestRestorableDateTime</code> is typically 5 minutes before the current time. You can restore your table to any point in time during the last 35 days. </p> <p>You can call <code>DescribeContinuousBackups</code> at a maximum rate of 10 times per second.</p>
5652 async fn describe_continuous_backups(
5653 &self,
5654 input: DescribeContinuousBackupsInput,
5655 ) -> Result<DescribeContinuousBackupsOutput, RusotoError<DescribeContinuousBackupsError>> {
5656 let mut request = self.new_signed_request("POST", "/");
5657 request.add_header(
5658 "x-amz-target",
5659 "DynamoDB_20120810.DescribeContinuousBackups",
5660 );
5661 let encoded = serde_json::to_string(&input).unwrap();
5662 request.set_payload(Some(encoded));
5663
5664 let response = self
5665 .sign_and_dispatch(request, DescribeContinuousBackupsError::from_response)
5666 .await?;
5667 let mut response = response;
5668 let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
5669 proto::json::ResponsePayload::new(&response)
5670 .deserialize::<DescribeContinuousBackupsOutput, _>()
5671 }
5672
5673 /// <p>Returns information about contributor insights, for a given table or global secondary index.</p>
5674 async fn describe_contributor_insights(
5675 &self,
5676 input: DescribeContributorInsightsInput,
5677 ) -> Result<DescribeContributorInsightsOutput, RusotoError<DescribeContributorInsightsError>>
5678 {
5679 let mut request = self.new_signed_request("POST", "/");
5680 request.add_header(
5681 "x-amz-target",
5682 "DynamoDB_20120810.DescribeContributorInsights",
5683 );
5684 let encoded = serde_json::to_string(&input).unwrap();
5685 request.set_payload(Some(encoded));
5686
5687 let response = self
5688 .sign_and_dispatch(request, DescribeContributorInsightsError::from_response)
5689 .await?;
5690 let mut response = response;
5691 let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
5692 proto::json::ResponsePayload::new(&response)
5693 .deserialize::<DescribeContributorInsightsOutput, _>()
5694 }
5695
5696 /// <p>Returns the regional endpoint information.</p>
5697 async fn describe_endpoints(
5698 &self,
5699 ) -> Result<DescribeEndpointsResponse, RusotoError<DescribeEndpointsError>> {
5700 let mut request = self.new_signed_request("POST", "/");
5701 request.add_header("x-amz-target", "DynamoDB_20120810.DescribeEndpoints");
5702 request.set_payload(Some(bytes::Bytes::from_static(b"{}")));
5703
5704 let response = self
5705 .sign_and_dispatch(request, DescribeEndpointsError::from_response)
5706 .await?;
5707 let mut response = response;
5708 let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
5709 proto::json::ResponsePayload::new(&response).deserialize::<DescribeEndpointsResponse, _>()
5710 }
5711
5712 /// <p><p>Returns information about the specified global table.</p> <note> <p>This operation only applies to <a href="https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/globaltables.V1.html">Version 2017.11.29</a> of global tables. If you are using global tables <a href="https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/globaltables.V2.html">Version 2019.11.21</a> you can use <a href="https://docs.aws.amazon.com/amazondynamodb/latest/APIReference/API_DescribeTable.html">DescribeTable</a> instead.</p> </note></p>
5713 async fn describe_global_table(
5714 &self,
5715 input: DescribeGlobalTableInput,
5716 ) -> Result<DescribeGlobalTableOutput, RusotoError<DescribeGlobalTableError>> {
5717 let mut request = self.new_signed_request("POST", "/");
5718 request.add_header("x-amz-target", "DynamoDB_20120810.DescribeGlobalTable");
5719 let encoded = serde_json::to_string(&input).unwrap();
5720 request.set_payload(Some(encoded));
5721
5722 let response = self
5723 .sign_and_dispatch(request, DescribeGlobalTableError::from_response)
5724 .await?;
5725 let mut response = response;
5726 let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
5727 proto::json::ResponsePayload::new(&response).deserialize::<DescribeGlobalTableOutput, _>()
5728 }
5729
5730 /// <p><p>Describes Region-specific settings for a global table.</p> <note> <p>This operation only applies to <a href="https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/globaltables.V1.html">Version 2017.11.29</a> of global tables.</p> </note></p>
5731 async fn describe_global_table_settings(
5732 &self,
5733 input: DescribeGlobalTableSettingsInput,
5734 ) -> Result<DescribeGlobalTableSettingsOutput, RusotoError<DescribeGlobalTableSettingsError>>
5735 {
5736 let mut request = self.new_signed_request("POST", "/");
5737 request.add_header(
5738 "x-amz-target",
5739 "DynamoDB_20120810.DescribeGlobalTableSettings",
5740 );
5741 let encoded = serde_json::to_string(&input).unwrap();
5742 request.set_payload(Some(encoded));
5743
5744 let response = self
5745 .sign_and_dispatch(request, DescribeGlobalTableSettingsError::from_response)
5746 .await?;
5747 let mut response = response;
5748 let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
5749 proto::json::ResponsePayload::new(&response)
5750 .deserialize::<DescribeGlobalTableSettingsOutput, _>()
5751 }
5752
5753 /// <p>Returns the current provisioned-capacity limits for your AWS account in a Region, both for the Region as a whole and for any one DynamoDB table that you create there.</p> <p>When you establish an AWS account, the account has initial limits on the maximum read capacity units and write capacity units that you can provision across all of your DynamoDB tables in a given Region. Also, there are per-table limits that apply when you create a table there. For more information, see <a href="https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Limits.html">Limits</a> page in the <i>Amazon DynamoDB Developer Guide</i>.</p> <p>Although you can increase these limits by filing a case at <a href="https://console.aws.amazon.com/support/home#/">AWS Support Center</a>, obtaining the increase is not instantaneous. The <code>DescribeLimits</code> action lets you write code to compare the capacity you are currently using to those limits imposed by your account so that you have enough time to apply for an increase before you hit a limit.</p> <p>For example, you could use one of the AWS SDKs to do the following:</p> <ol> <li> <p>Call <code>DescribeLimits</code> for a particular Region to obtain your current account limits on provisioned capacity there.</p> </li> <li> <p>Create a variable to hold the aggregate read capacity units provisioned for all your tables in that Region, and one to hold the aggregate write capacity units. Zero them both.</p> </li> <li> <p>Call <code>ListTables</code> to obtain a list of all your DynamoDB tables.</p> </li> <li> <p>For each table name listed by <code>ListTables</code>, do the following:</p> <ul> <li> <p>Call <code>DescribeTable</code> with the table name.</p> </li> <li> <p>Use the data returned by <code>DescribeTable</code> to add the read capacity units and write capacity units provisioned for the table itself to your variables.</p> </li> <li> <p>If the table has one or more global secondary indexes (GSIs), loop over these GSIs and add their provisioned capacity values to your variables as well.</p> </li> </ul> </li> <li> <p>Report the account limits for that Region returned by <code>DescribeLimits</code>, along with the total current provisioned capacity levels you have calculated.</p> </li> </ol> <p>This will let you see whether you are getting close to your account-level limits.</p> <p>The per-table limits apply only when you are creating a new table. They restrict the sum of the provisioned capacity of the new table itself and all its global secondary indexes.</p> <p>For existing tables and their GSIs, DynamoDB doesn't let you increase provisioned capacity extremely rapidly. But the only upper limit that applies is that the aggregate provisioned capacity over all your tables and GSIs cannot exceed either of the per-account limits.</p> <note> <p> <code>DescribeLimits</code> should only be called periodically. You can expect throttling errors if you call it more than once in a minute.</p> </note> <p>The <code>DescribeLimits</code> Request element has no content.</p>
5754 async fn describe_limits(
5755 &self,
5756 ) -> Result<DescribeLimitsOutput, RusotoError<DescribeLimitsError>> {
5757 let mut request = self.new_signed_request("POST", "/");
5758 request.add_header("x-amz-target", "DynamoDB_20120810.DescribeLimits");
5759 request.set_payload(Some(bytes::Bytes::from_static(b"{}")));
5760
5761 let response = self
5762 .sign_and_dispatch(request, DescribeLimitsError::from_response)
5763 .await?;
5764 let mut response = response;
5765 let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
5766 proto::json::ResponsePayload::new(&response).deserialize::<DescribeLimitsOutput, _>()
5767 }
5768
5769 /// <p><p>Returns information about the table, including the current status of the table, when it was created, the primary key schema, and any indexes on the table.</p> <note> <p>If you issue a <code>DescribeTable</code> request immediately after a <code>CreateTable</code> request, DynamoDB might return a <code>ResourceNotFoundException</code>. This is because <code>DescribeTable</code> uses an eventually consistent query, and the metadata for your table might not be available at that moment. Wait for a few seconds, and then try the <code>DescribeTable</code> request again.</p> </note></p>
5770 async fn describe_table(
5771 &self,
5772 input: DescribeTableInput,
5773 ) -> Result<DescribeTableOutput, RusotoError<DescribeTableError>> {
5774 let mut request = self.new_signed_request("POST", "/");
5775 request.add_header("x-amz-target", "DynamoDB_20120810.DescribeTable");
5776 let encoded = serde_json::to_string(&input).unwrap();
5777 request.set_payload(Some(encoded));
5778
5779 let response = self
5780 .sign_and_dispatch(request, DescribeTableError::from_response)
5781 .await?;
5782 let mut response = response;
5783 let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
5784 proto::json::ResponsePayload::new(&response).deserialize::<DescribeTableOutput, _>()
5785 }
5786
5787 /// <p><p>Describes auto scaling settings across replicas of the global table at once.</p> <note> <p>This operation only applies to <a href="https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/globaltables.V2.html">Version 2019.11.21</a> of global tables.</p> </note></p>
5788 async fn describe_table_replica_auto_scaling(
5789 &self,
5790 input: DescribeTableReplicaAutoScalingInput,
5791 ) -> Result<
5792 DescribeTableReplicaAutoScalingOutput,
5793 RusotoError<DescribeTableReplicaAutoScalingError>,
5794 > {
5795 let mut request = self.new_signed_request("POST", "/");
5796 request.add_header(
5797 "x-amz-target",
5798 "DynamoDB_20120810.DescribeTableReplicaAutoScaling",
5799 );
5800 let encoded = serde_json::to_string(&input).unwrap();
5801 request.set_payload(Some(encoded));
5802
5803 let response = self
5804 .sign_and_dispatch(request, DescribeTableReplicaAutoScalingError::from_response)
5805 .await?;
5806 let mut response = response;
5807 let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
5808 proto::json::ResponsePayload::new(&response)
5809 .deserialize::<DescribeTableReplicaAutoScalingOutput, _>()
5810 }
5811
5812 /// <p>Gives a description of the Time to Live (TTL) status on the specified table. </p>
5813 async fn describe_time_to_live(
5814 &self,
5815 input: DescribeTimeToLiveInput,
5816 ) -> Result<DescribeTimeToLiveOutput, RusotoError<DescribeTimeToLiveError>> {
5817 let mut request = self.new_signed_request("POST", "/");
5818 request.add_header("x-amz-target", "DynamoDB_20120810.DescribeTimeToLive");
5819 let encoded = serde_json::to_string(&input).unwrap();
5820 request.set_payload(Some(encoded));
5821
5822 let response = self
5823 .sign_and_dispatch(request, DescribeTimeToLiveError::from_response)
5824 .await?;
5825 let mut response = response;
5826 let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
5827 proto::json::ResponsePayload::new(&response).deserialize::<DescribeTimeToLiveOutput, _>()
5828 }
5829
5830 /// <p>The <code>GetItem</code> operation returns a set of attributes for the item with the given primary key. If there is no matching item, <code>GetItem</code> does not return any data and there will be no <code>Item</code> element in the response.</p> <p> <code>GetItem</code> provides an eventually consistent read by default. If your application requires a strongly consistent read, set <code>ConsistentRead</code> to <code>true</code>. Although a strongly consistent read might take more time than an eventually consistent read, it always returns the last updated value.</p>
5831 async fn get_item(
5832 &self,
5833 input: GetItemInput,
5834 ) -> Result<GetItemOutput, RusotoError<GetItemError>> {
5835 let mut request = self.new_signed_request("POST", "/");
5836 request.add_header("x-amz-target", "DynamoDB_20120810.GetItem");
5837 let encoded = serde_json::to_string(&input).unwrap();
5838 request.set_payload(Some(encoded));
5839
5840 let response = self
5841 .sign_and_dispatch(request, GetItemError::from_response)
5842 .await?;
5843 let mut response = response;
5844 let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
5845 proto::json::ResponsePayload::new(&response).deserialize::<GetItemOutput, _>()
5846 }
5847
5848 /// <p>List backups associated with an AWS account. To list backups for a given table, specify <code>TableName</code>. <code>ListBackups</code> returns a paginated list of results with at most 1 MB worth of items in a page. You can also specify a limit for the maximum number of entries to be returned in a page. </p> <p>In the request, start time is inclusive, but end time is exclusive. Note that these limits are for the time at which the original backup was requested.</p> <p>You can call <code>ListBackups</code> a maximum of five times per second.</p>
5849 async fn list_backups(
5850 &self,
5851 input: ListBackupsInput,
5852 ) -> Result<ListBackupsOutput, RusotoError<ListBackupsError>> {
5853 let mut request = self.new_signed_request("POST", "/");
5854 request.add_header("x-amz-target", "DynamoDB_20120810.ListBackups");
5855 let encoded = serde_json::to_string(&input).unwrap();
5856 request.set_payload(Some(encoded));
5857
5858 let response = self
5859 .sign_and_dispatch(request, ListBackupsError::from_response)
5860 .await?;
5861 let mut response = response;
5862 let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
5863 proto::json::ResponsePayload::new(&response).deserialize::<ListBackupsOutput, _>()
5864 }
5865
5866 /// <p>Returns a list of ContributorInsightsSummary for a table and all its global secondary indexes.</p>
5867 async fn list_contributor_insights(
5868 &self,
5869 input: ListContributorInsightsInput,
5870 ) -> Result<ListContributorInsightsOutput, RusotoError<ListContributorInsightsError>> {
5871 let mut request = self.new_signed_request("POST", "/");
5872 request.add_header("x-amz-target", "DynamoDB_20120810.ListContributorInsights");
5873 let encoded = serde_json::to_string(&input).unwrap();
5874 request.set_payload(Some(encoded));
5875
5876 let response = self
5877 .sign_and_dispatch(request, ListContributorInsightsError::from_response)
5878 .await?;
5879 let mut response = response;
5880 let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
5881 proto::json::ResponsePayload::new(&response)
5882 .deserialize::<ListContributorInsightsOutput, _>()
5883 }
5884
5885 /// <p><p>Lists all global tables that have a replica in the specified Region.</p> <note> <p>This operation only applies to <a href="https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/globaltables.V1.html">Version 2017.11.29</a> of global tables.</p> </note></p>
5886 async fn list_global_tables(
5887 &self,
5888 input: ListGlobalTablesInput,
5889 ) -> Result<ListGlobalTablesOutput, RusotoError<ListGlobalTablesError>> {
5890 let mut request = self.new_signed_request("POST", "/");
5891 request.add_header("x-amz-target", "DynamoDB_20120810.ListGlobalTables");
5892 let encoded = serde_json::to_string(&input).unwrap();
5893 request.set_payload(Some(encoded));
5894
5895 let response = self
5896 .sign_and_dispatch(request, ListGlobalTablesError::from_response)
5897 .await?;
5898 let mut response = response;
5899 let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
5900 proto::json::ResponsePayload::new(&response).deserialize::<ListGlobalTablesOutput, _>()
5901 }
5902
5903 /// <p>Returns an array of table names associated with the current account and endpoint. The output from <code>ListTables</code> is paginated, with each page returning a maximum of 100 table names.</p>
5904 async fn list_tables(
5905 &self,
5906 input: ListTablesInput,
5907 ) -> Result<ListTablesOutput, RusotoError<ListTablesError>> {
5908 let mut request = self.new_signed_request("POST", "/");
5909 request.add_header("x-amz-target", "DynamoDB_20120810.ListTables");
5910 let encoded = serde_json::to_string(&input).unwrap();
5911 request.set_payload(Some(encoded));
5912
5913 let response = self
5914 .sign_and_dispatch(request, ListTablesError::from_response)
5915 .await?;
5916 let mut response = response;
5917 let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
5918 proto::json::ResponsePayload::new(&response).deserialize::<ListTablesOutput, _>()
5919 }
5920
5921 /// <p>List all tags on an Amazon DynamoDB resource. You can call ListTagsOfResource up to 10 times per second, per account.</p> <p>For an overview on tagging DynamoDB resources, see <a href="https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Tagging.html">Tagging for DynamoDB</a> in the <i>Amazon DynamoDB Developer Guide</i>.</p>
5922 async fn list_tags_of_resource(
5923 &self,
5924 input: ListTagsOfResourceInput,
5925 ) -> Result<ListTagsOfResourceOutput, RusotoError<ListTagsOfResourceError>> {
5926 let mut request = self.new_signed_request("POST", "/");
5927 request.add_header("x-amz-target", "DynamoDB_20120810.ListTagsOfResource");
5928 let encoded = serde_json::to_string(&input).unwrap();
5929 request.set_payload(Some(encoded));
5930
5931 let response = self
5932 .sign_and_dispatch(request, ListTagsOfResourceError::from_response)
5933 .await?;
5934 let mut response = response;
5935 let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
5936 proto::json::ResponsePayload::new(&response).deserialize::<ListTagsOfResourceOutput, _>()
5937 }
5938
5939 /// <p>Creates a new item, or replaces an old item with a new item. If an item that has the same primary key as the new item already exists in the specified table, the new item completely replaces the existing item. You can perform a conditional put operation (add a new item if one with the specified primary key doesn't exist), or replace an existing item if it has certain attribute values. You can return the item's attribute values in the same operation, using the <code>ReturnValues</code> parameter.</p> <important> <p>This topic provides general information about the <code>PutItem</code> API.</p> <p>For information on how to call the <code>PutItem</code> API using the AWS SDK in specific languages, see the following:</p> <ul> <li> <p> <a href="http://docs.aws.amazon.com/goto/aws-cli/dynamodb-2012-08-10/PutItem"> PutItem in the AWS Command Line Interface</a> </p> </li> <li> <p> <a href="http://docs.aws.amazon.com/goto/DotNetSDKV3/dynamodb-2012-08-10/PutItem"> PutItem in the AWS SDK for .NET</a> </p> </li> <li> <p> <a href="http://docs.aws.amazon.com/goto/SdkForCpp/dynamodb-2012-08-10/PutItem"> PutItem in the AWS SDK for C++</a> </p> </li> <li> <p> <a href="http://docs.aws.amazon.com/goto/SdkForGoV1/dynamodb-2012-08-10/PutItem"> PutItem in the AWS SDK for Go</a> </p> </li> <li> <p> <a href="http://docs.aws.amazon.com/goto/SdkForJava/dynamodb-2012-08-10/PutItem"> PutItem in the AWS SDK for Java</a> </p> </li> <li> <p> <a href="http://docs.aws.amazon.com/goto/AWSJavaScriptSDK/dynamodb-2012-08-10/PutItem"> PutItem in the AWS SDK for JavaScript</a> </p> </li> <li> <p> <a href="http://docs.aws.amazon.com/goto/SdkForPHPV3/dynamodb-2012-08-10/PutItem"> PutItem in the AWS SDK for PHP V3</a> </p> </li> <li> <p> <a href="http://docs.aws.amazon.com/goto/boto3/dynamodb-2012-08-10/PutItem"> PutItem in the AWS SDK for Python</a> </p> </li> <li> <p> <a href="http://docs.aws.amazon.com/goto/SdkForRubyV2/dynamodb-2012-08-10/PutItem"> PutItem in the AWS SDK for Ruby V2</a> </p> </li> </ul> </important> <p>When you add an item, the primary key attributes are the only required attributes. Attribute values cannot be null.</p> <p>Empty String and Binary attribute values are allowed. Attribute values of type String and Binary must have a length greater than zero if the attribute is used as a key attribute for a table or index. Set type attributes cannot be empty. </p> <p>Invalid Requests with empty values will be rejected with a <code>ValidationException</code> exception.</p> <note> <p>To prevent a new item from replacing an existing item, use a conditional expression that contains the <code>attribute_not_exists</code> function with the name of the attribute being used as the partition key for the table. Since every record must contain that attribute, the <code>attribute_not_exists</code> function will only succeed if no matching item exists.</p> </note> <p>For more information about <code>PutItem</code>, see <a href="https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/WorkingWithItems.html">Working with Items</a> in the <i>Amazon DynamoDB Developer Guide</i>.</p>
5940 async fn put_item(
5941 &self,
5942 input: PutItemInput,
5943 ) -> Result<PutItemOutput, RusotoError<PutItemError>> {
5944 let mut request = self.new_signed_request("POST", "/");
5945 request.add_header("x-amz-target", "DynamoDB_20120810.PutItem");
5946 let encoded = serde_json::to_string(&input).unwrap();
5947 request.set_payload(Some(encoded));
5948
5949 let response = self
5950 .sign_and_dispatch(request, PutItemError::from_response)
5951 .await?;
5952 let mut response = response;
5953 let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
5954 proto::json::ResponsePayload::new(&response).deserialize::<PutItemOutput, _>()
5955 }
5956
5957 /// <p>The <code>Query</code> operation finds items based on primary key values. You can query any table or secondary index that has a composite primary key (a partition key and a sort key). </p> <p>Use the <code>KeyConditionExpression</code> parameter to provide a specific value for the partition key. The <code>Query</code> operation will return all of the items from the table or index with that partition key value. You can optionally narrow the scope of the <code>Query</code> operation by specifying a sort key value and a comparison operator in <code>KeyConditionExpression</code>. To further refine the <code>Query</code> results, you can optionally provide a <code>FilterExpression</code>. A <code>FilterExpression</code> determines which items within the results should be returned to you. All of the other results are discarded. </p> <p> A <code>Query</code> operation always returns a result set. If no matching items are found, the result set will be empty. Queries that do not return results consume the minimum number of read capacity units for that type of read operation. </p> <note> <p> DynamoDB calculates the number of read capacity units consumed based on item size, not on the amount of data that is returned to an application. The number of capacity units consumed will be the same whether you request all of the attributes (the default behavior) or just some of them (using a projection expression). The number will also be the same whether or not you use a <code>FilterExpression</code>. </p> </note> <p> <code>Query</code> results are always sorted by the sort key value. If the data type of the sort key is Number, the results are returned in numeric order; otherwise, the results are returned in order of UTF-8 bytes. By default, the sort order is ascending. To reverse the order, set the <code>ScanIndexForward</code> parameter to false. </p> <p> A single <code>Query</code> operation will read up to the maximum number of items set (if using the <code>Limit</code> parameter) or a maximum of 1 MB of data and then apply any filtering to the results using <code>FilterExpression</code>. If <code>LastEvaluatedKey</code> is present in the response, you will need to paginate the result set. For more information, see <a href="https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Query.html#Query.Pagination">Paginating the Results</a> in the <i>Amazon DynamoDB Developer Guide</i>. </p> <p> <code>FilterExpression</code> is applied after a <code>Query</code> finishes, but before the results are returned. A <code>FilterExpression</code> cannot contain partition key or sort key attributes. You need to specify those attributes in the <code>KeyConditionExpression</code>. </p> <note> <p> A <code>Query</code> operation can return an empty result set and a <code>LastEvaluatedKey</code> if all the items read for the page of results are filtered out. </p> </note> <p>You can query a table, a local secondary index, or a global secondary index. For a query on a table or on a local secondary index, you can set the <code>ConsistentRead</code> parameter to <code>true</code> and obtain a strongly consistent result. Global secondary indexes support eventually consistent reads only, so do not specify <code>ConsistentRead</code> when querying a global secondary index.</p>
5958 async fn query(&self, input: QueryInput) -> Result<QueryOutput, RusotoError<QueryError>> {
5959 let mut request = self.new_signed_request("POST", "/");
5960 request.add_header("x-amz-target", "DynamoDB_20120810.Query");
5961 let encoded = serde_json::to_string(&input).unwrap();
5962 request.set_payload(Some(encoded));
5963
5964 let response = self
5965 .sign_and_dispatch(request, QueryError::from_response)
5966 .await?;
5967 let mut response = response;
5968 let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
5969 proto::json::ResponsePayload::new(&response).deserialize::<QueryOutput, _>()
5970 }
5971
5972 /// <p><p>Creates a new table from an existing backup. Any number of users can execute up to 4 concurrent restores (any type of restore) in a given account. </p> <p>You can call <code>RestoreTableFromBackup</code> at a maximum rate of 10 times per second.</p> <p>You must manually set up the following on the restored table:</p> <ul> <li> <p>Auto scaling policies</p> </li> <li> <p>IAM policies</p> </li> <li> <p>Amazon CloudWatch metrics and alarms</p> </li> <li> <p>Tags</p> </li> <li> <p>Stream settings</p> </li> <li> <p>Time to Live (TTL) settings</p> </li> </ul></p>
5973 async fn restore_table_from_backup(
5974 &self,
5975 input: RestoreTableFromBackupInput,
5976 ) -> Result<RestoreTableFromBackupOutput, RusotoError<RestoreTableFromBackupError>> {
5977 let mut request = self.new_signed_request("POST", "/");
5978 request.add_header("x-amz-target", "DynamoDB_20120810.RestoreTableFromBackup");
5979 let encoded = serde_json::to_string(&input).unwrap();
5980 request.set_payload(Some(encoded));
5981
5982 let response = self
5983 .sign_and_dispatch(request, RestoreTableFromBackupError::from_response)
5984 .await?;
5985 let mut response = response;
5986 let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
5987 proto::json::ResponsePayload::new(&response)
5988 .deserialize::<RestoreTableFromBackupOutput, _>()
5989 }
5990
5991 /// <p><p>Restores the specified table to the specified point in time within <code>EarliestRestorableDateTime</code> and <code>LatestRestorableDateTime</code>. You can restore your table to any point in time during the last 35 days. Any number of users can execute up to 4 concurrent restores (any type of restore) in a given account. </p> <p> When you restore using point in time recovery, DynamoDB restores your table data to the state based on the selected date and time (day:hour:minute:second) to a new table. </p> <p> Along with data, the following are also included on the new restored table using point in time recovery: </p> <ul> <li> <p>Global secondary indexes (GSIs)</p> </li> <li> <p>Local secondary indexes (LSIs)</p> </li> <li> <p>Provisioned read and write capacity</p> </li> <li> <p>Encryption settings</p> <important> <p> All these settings come from the current settings of the source table at the time of restore. </p> </important> </li> </ul> <p>You must manually set up the following on the restored table:</p> <ul> <li> <p>Auto scaling policies</p> </li> <li> <p>IAM policies</p> </li> <li> <p>Amazon CloudWatch metrics and alarms</p> </li> <li> <p>Tags</p> </li> <li> <p>Stream settings</p> </li> <li> <p>Time to Live (TTL) settings</p> </li> <li> <p>Point in time recovery settings</p> </li> </ul></p>
5992 async fn restore_table_to_point_in_time(
5993 &self,
5994 input: RestoreTableToPointInTimeInput,
5995 ) -> Result<RestoreTableToPointInTimeOutput, RusotoError<RestoreTableToPointInTimeError>> {
5996 let mut request = self.new_signed_request("POST", "/");
5997 request.add_header(
5998 "x-amz-target",
5999 "DynamoDB_20120810.RestoreTableToPointInTime",
6000 );
6001 let encoded = serde_json::to_string(&input).unwrap();
6002 request.set_payload(Some(encoded));
6003
6004 let response = self
6005 .sign_and_dispatch(request, RestoreTableToPointInTimeError::from_response)
6006 .await?;
6007 let mut response = response;
6008 let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
6009 proto::json::ResponsePayload::new(&response)
6010 .deserialize::<RestoreTableToPointInTimeOutput, _>()
6011 }
6012
6013 /// <p>The <code>Scan</code> operation returns one or more items and item attributes by accessing every item in a table or a secondary index. To have DynamoDB return fewer items, you can provide a <code>FilterExpression</code> operation.</p> <p>If the total number of scanned items exceeds the maximum dataset size limit of 1 MB, the scan stops and results are returned to the user as a <code>LastEvaluatedKey</code> value to continue the scan in a subsequent operation. The results also include the number of items exceeding the limit. A scan can result in no table data meeting the filter criteria. </p> <p>A single <code>Scan</code> operation reads up to the maximum number of items set (if using the <code>Limit</code> parameter) or a maximum of 1 MB of data and then apply any filtering to the results using <code>FilterExpression</code>. If <code>LastEvaluatedKey</code> is present in the response, you need to paginate the result set. For more information, see <a href="https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Scan.html#Scan.Pagination">Paginating the Results</a> in the <i>Amazon DynamoDB Developer Guide</i>. </p> <p> <code>Scan</code> operations proceed sequentially; however, for faster performance on a large table or secondary index, applications can request a parallel <code>Scan</code> operation by providing the <code>Segment</code> and <code>TotalSegments</code> parameters. For more information, see <a href="https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Scan.html#Scan.ParallelScan">Parallel Scan</a> in the <i>Amazon DynamoDB Developer Guide</i>.</p> <p> <code>Scan</code> uses eventually consistent reads when accessing the data in a table; therefore, the result set might not include the changes to data in the table immediately before the operation began. If you need a consistent copy of the data, as of the time that the <code>Scan</code> begins, you can set the <code>ConsistentRead</code> parameter to <code>true</code>.</p>
6014 async fn scan(&self, input: ScanInput) -> Result<ScanOutput, RusotoError<ScanError>> {
6015 let mut request = self.new_signed_request("POST", "/");
6016 request.add_header("x-amz-target", "DynamoDB_20120810.Scan");
6017 let encoded = serde_json::to_string(&input).unwrap();
6018 request.set_payload(Some(encoded));
6019
6020 let response = self
6021 .sign_and_dispatch(request, ScanError::from_response)
6022 .await?;
6023 let mut response = response;
6024 let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
6025 proto::json::ResponsePayload::new(&response).deserialize::<ScanOutput, _>()
6026 }
6027
6028 /// <p>Associate a set of tags with an Amazon DynamoDB resource. You can then activate these user-defined tags so that they appear on the Billing and Cost Management console for cost allocation tracking. You can call TagResource up to five times per second, per account. </p> <p>For an overview on tagging DynamoDB resources, see <a href="https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Tagging.html">Tagging for DynamoDB</a> in the <i>Amazon DynamoDB Developer Guide</i>.</p>
6029 async fn tag_resource(
6030 &self,
6031 input: TagResourceInput,
6032 ) -> Result<(), RusotoError<TagResourceError>> {
6033 let mut request = self.new_signed_request("POST", "/");
6034 request.add_header("x-amz-target", "DynamoDB_20120810.TagResource");
6035 let encoded = serde_json::to_string(&input).unwrap();
6036 request.set_payload(Some(encoded));
6037
6038 let response = self
6039 .sign_and_dispatch(request, TagResourceError::from_response)
6040 .await?;
6041 std::mem::drop(response);
6042 Ok(())
6043 }
6044
6045 /// <p><p> <code>TransactGetItems</code> is a synchronous operation that atomically retrieves multiple items from one or more tables (but not from indexes) in a single account and Region. A <code>TransactGetItems</code> call can contain up to 25 <code>TransactGetItem</code> objects, each of which contains a <code>Get</code> structure that specifies an item to retrieve from a table in the account and Region. A call to <code>TransactGetItems</code> cannot retrieve items from tables in more than one AWS account or Region. The aggregate size of the items in the transaction cannot exceed 4 MB.</p> <p>DynamoDB rejects the entire <code>TransactGetItems</code> request if any of the following is true:</p> <ul> <li> <p>A conflicting operation is in the process of updating an item to be read.</p> </li> <li> <p>There is insufficient provisioned capacity for the transaction to be completed.</p> </li> <li> <p>There is a user error, such as an invalid data format.</p> </li> <li> <p>The aggregate size of the items in the transaction cannot exceed 4 MB.</p> </li> </ul></p>
6046 async fn transact_get_items(
6047 &self,
6048 input: TransactGetItemsInput,
6049 ) -> Result<TransactGetItemsOutput, RusotoError<TransactGetItemsError>> {
6050 let mut request = self.new_signed_request("POST", "/");
6051 request.add_header("x-amz-target", "DynamoDB_20120810.TransactGetItems");
6052 let encoded = serde_json::to_string(&input).unwrap();
6053 request.set_payload(Some(encoded));
6054
6055 let response = self
6056 .sign_and_dispatch(request, TransactGetItemsError::from_response)
6057 .await?;
6058 let mut response = response;
6059 let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
6060 proto::json::ResponsePayload::new(&response).deserialize::<TransactGetItemsOutput, _>()
6061 }
6062
6063 /// <p><p> <code>TransactWriteItems</code> is a synchronous write operation that groups up to 25 action requests. These actions can target items in different tables, but not in different AWS accounts or Regions, and no two actions can target the same item. For example, you cannot both <code>ConditionCheck</code> and <code>Update</code> the same item. The aggregate size of the items in the transaction cannot exceed 4 MB.</p> <p>The actions are completed atomically so that either all of them succeed, or all of them fail. They are defined by the following objects:</p> <ul> <li> <p> <code>Put</code> — Initiates a <code>PutItem</code> operation to write a new item. This structure specifies the primary key of the item to be written, the name of the table to write it in, an optional condition expression that must be satisfied for the write to succeed, a list of the item's attributes, and a field indicating whether to retrieve the item's attributes if the condition is not met.</p> </li> <li> <p> <code>Update</code> — Initiates an <code>UpdateItem</code> operation to update an existing item. This structure specifies the primary key of the item to be updated, the name of the table where it resides, an optional condition expression that must be satisfied for the update to succeed, an expression that defines one or more attributes to be updated, and a field indicating whether to retrieve the item's attributes if the condition is not met.</p> </li> <li> <p> <code>Delete</code> — Initiates a <code>DeleteItem</code> operation to delete an existing item. This structure specifies the primary key of the item to be deleted, the name of the table where it resides, an optional condition expression that must be satisfied for the deletion to succeed, and a field indicating whether to retrieve the item's attributes if the condition is not met.</p> </li> <li> <p> <code>ConditionCheck</code> — Applies a condition to an item that is not being modified by the transaction. This structure specifies the primary key of the item to be checked, the name of the table where it resides, a condition expression that must be satisfied for the transaction to succeed, and a field indicating whether to retrieve the item's attributes if the condition is not met.</p> </li> </ul> <p>DynamoDB rejects the entire <code>TransactWriteItems</code> request if any of the following is true:</p> <ul> <li> <p>A condition in one of the condition expressions is not met.</p> </li> <li> <p>An ongoing operation is in the process of updating the same item.</p> </li> <li> <p>There is insufficient provisioned capacity for the transaction to be completed.</p> </li> <li> <p>An item size becomes too large (bigger than 400 KB), a local secondary index (LSI) becomes too large, or a similar validation error occurs because of changes made by the transaction.</p> </li> <li> <p>The aggregate size of the items in the transaction exceeds 4 MB.</p> </li> <li> <p>There is a user error, such as an invalid data format.</p> </li> </ul></p>
6064 async fn transact_write_items(
6065 &self,
6066 input: TransactWriteItemsInput,
6067 ) -> Result<TransactWriteItemsOutput, RusotoError<TransactWriteItemsError>> {
6068 let mut request = self.new_signed_request("POST", "/");
6069 request.add_header("x-amz-target", "DynamoDB_20120810.TransactWriteItems");
6070 let encoded = serde_json::to_string(&input).unwrap();
6071 request.set_payload(Some(encoded));
6072
6073 let response = self
6074 .sign_and_dispatch(request, TransactWriteItemsError::from_response)
6075 .await?;
6076 let mut response = response;
6077 let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
6078 proto::json::ResponsePayload::new(&response).deserialize::<TransactWriteItemsOutput, _>()
6079 }
6080
6081 /// <p>Removes the association of tags from an Amazon DynamoDB resource. You can call <code>UntagResource</code> up to five times per second, per account. </p> <p>For an overview on tagging DynamoDB resources, see <a href="https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Tagging.html">Tagging for DynamoDB</a> in the <i>Amazon DynamoDB Developer Guide</i>.</p>
6082 async fn untag_resource(
6083 &self,
6084 input: UntagResourceInput,
6085 ) -> Result<(), RusotoError<UntagResourceError>> {
6086 let mut request = self.new_signed_request("POST", "/");
6087 request.add_header("x-amz-target", "DynamoDB_20120810.UntagResource");
6088 let encoded = serde_json::to_string(&input).unwrap();
6089 request.set_payload(Some(encoded));
6090
6091 let response = self
6092 .sign_and_dispatch(request, UntagResourceError::from_response)
6093 .await?;
6094 std::mem::drop(response);
6095 Ok(())
6096 }
6097
6098 /// <p> <code>UpdateContinuousBackups</code> enables or disables point in time recovery for the specified table. A successful <code>UpdateContinuousBackups</code> call returns the current <code>ContinuousBackupsDescription</code>. Continuous backups are <code>ENABLED</code> on all tables at table creation. If point in time recovery is enabled, <code>PointInTimeRecoveryStatus</code> will be set to ENABLED.</p> <p> Once continuous backups and point in time recovery are enabled, you can restore to any point in time within <code>EarliestRestorableDateTime</code> and <code>LatestRestorableDateTime</code>. </p> <p> <code>LatestRestorableDateTime</code> is typically 5 minutes before the current time. You can restore your table to any point in time during the last 35 days. </p>
6099 async fn update_continuous_backups(
6100 &self,
6101 input: UpdateContinuousBackupsInput,
6102 ) -> Result<UpdateContinuousBackupsOutput, RusotoError<UpdateContinuousBackupsError>> {
6103 let mut request = self.new_signed_request("POST", "/");
6104 request.add_header("x-amz-target", "DynamoDB_20120810.UpdateContinuousBackups");
6105 let encoded = serde_json::to_string(&input).unwrap();
6106 request.set_payload(Some(encoded));
6107
6108 let response = self
6109 .sign_and_dispatch(request, UpdateContinuousBackupsError::from_response)
6110 .await?;
6111 let mut response = response;
6112 let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
6113 proto::json::ResponsePayload::new(&response)
6114 .deserialize::<UpdateContinuousBackupsOutput, _>()
6115 }
6116
6117 /// <p>Updates the status for contributor insights for a specific table or index.</p>
6118 async fn update_contributor_insights(
6119 &self,
6120 input: UpdateContributorInsightsInput,
6121 ) -> Result<UpdateContributorInsightsOutput, RusotoError<UpdateContributorInsightsError>> {
6122 let mut request = self.new_signed_request("POST", "/");
6123 request.add_header(
6124 "x-amz-target",
6125 "DynamoDB_20120810.UpdateContributorInsights",
6126 );
6127 let encoded = serde_json::to_string(&input).unwrap();
6128 request.set_payload(Some(encoded));
6129
6130 let response = self
6131 .sign_and_dispatch(request, UpdateContributorInsightsError::from_response)
6132 .await?;
6133 let mut response = response;
6134 let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
6135 proto::json::ResponsePayload::new(&response)
6136 .deserialize::<UpdateContributorInsightsOutput, _>()
6137 }
6138
6139 /// <p><p>Adds or removes replicas in the specified global table. The global table must already exist to be able to use this operation. Any replica to be added must be empty, have the same name as the global table, have the same key schema, have DynamoDB Streams enabled, and have the same provisioned and maximum write capacity units.</p> <note> <p>Although you can use <code>UpdateGlobalTable</code> to add replicas and remove replicas in a single request, for simplicity we recommend that you issue separate requests for adding or removing replicas.</p> </note> <p> If global secondary indexes are specified, then the following conditions must also be met: </p> <ul> <li> <p> The global secondary indexes must have the same name. </p> </li> <li> <p> The global secondary indexes must have the same hash key and sort key (if present). </p> </li> <li> <p> The global secondary indexes must have the same provisioned and maximum write capacity units. </p> </li> </ul></p>
6140 async fn update_global_table(
6141 &self,
6142 input: UpdateGlobalTableInput,
6143 ) -> Result<UpdateGlobalTableOutput, RusotoError<UpdateGlobalTableError>> {
6144 let mut request = self.new_signed_request("POST", "/");
6145 request.add_header("x-amz-target", "DynamoDB_20120810.UpdateGlobalTable");
6146 let encoded = serde_json::to_string(&input).unwrap();
6147 request.set_payload(Some(encoded));
6148
6149 let response = self
6150 .sign_and_dispatch(request, UpdateGlobalTableError::from_response)
6151 .await?;
6152 let mut response = response;
6153 let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
6154 proto::json::ResponsePayload::new(&response).deserialize::<UpdateGlobalTableOutput, _>()
6155 }
6156
6157 /// <p>Updates settings for a global table.</p>
6158 async fn update_global_table_settings(
6159 &self,
6160 input: UpdateGlobalTableSettingsInput,
6161 ) -> Result<UpdateGlobalTableSettingsOutput, RusotoError<UpdateGlobalTableSettingsError>> {
6162 let mut request = self.new_signed_request("POST", "/");
6163 request.add_header(
6164 "x-amz-target",
6165 "DynamoDB_20120810.UpdateGlobalTableSettings",
6166 );
6167 let encoded = serde_json::to_string(&input).unwrap();
6168 request.set_payload(Some(encoded));
6169
6170 let response = self
6171 .sign_and_dispatch(request, UpdateGlobalTableSettingsError::from_response)
6172 .await?;
6173 let mut response = response;
6174 let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
6175 proto::json::ResponsePayload::new(&response)
6176 .deserialize::<UpdateGlobalTableSettingsOutput, _>()
6177 }
6178
6179 /// <p>Edits an existing item's attributes, or adds a new item to the table if it does not already exist. You can put, delete, or add attribute values. You can also perform a conditional update on an existing item (insert a new attribute name-value pair if it doesn't exist, or replace an existing name-value pair if it has certain expected attribute values).</p> <p>You can also return the item's attribute values in the same <code>UpdateItem</code> operation using the <code>ReturnValues</code> parameter.</p>
6180 async fn update_item(
6181 &self,
6182 input: UpdateItemInput,
6183 ) -> Result<UpdateItemOutput, RusotoError<UpdateItemError>> {
6184 let mut request = self.new_signed_request("POST", "/");
6185 request.add_header("x-amz-target", "DynamoDB_20120810.UpdateItem");
6186 let encoded = serde_json::to_string(&input).unwrap();
6187 request.set_payload(Some(encoded));
6188
6189 let response = self
6190 .sign_and_dispatch(request, UpdateItemError::from_response)
6191 .await?;
6192 let mut response = response;
6193 let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
6194 proto::json::ResponsePayload::new(&response).deserialize::<UpdateItemOutput, _>()
6195 }
6196
6197 /// <p>Modifies the provisioned throughput settings, global secondary indexes, or DynamoDB Streams settings for a given table.</p> <p>You can only perform one of the following operations at once:</p> <ul> <li> <p>Modify the provisioned throughput settings of the table.</p> </li> <li> <p>Enable or disable DynamoDB Streams on the table.</p> </li> <li> <p>Remove a global secondary index from the table.</p> </li> <li> <p>Create a new global secondary index on the table. After the index begins backfilling, you can use <code>UpdateTable</code> to perform other operations.</p> </li> </ul> <p> <code>UpdateTable</code> is an asynchronous operation; while it is executing, the table status changes from <code>ACTIVE</code> to <code>UPDATING</code>. While it is <code>UPDATING</code>, you cannot issue another <code>UpdateTable</code> request. When the table returns to the <code>ACTIVE</code> state, the <code>UpdateTable</code> operation is complete.</p>
6198 async fn update_table(
6199 &self,
6200 input: UpdateTableInput,
6201 ) -> Result<UpdateTableOutput, RusotoError<UpdateTableError>> {
6202 let mut request = self.new_signed_request("POST", "/");
6203 request.add_header("x-amz-target", "DynamoDB_20120810.UpdateTable");
6204 let encoded = serde_json::to_string(&input).unwrap();
6205 request.set_payload(Some(encoded));
6206
6207 let response = self
6208 .sign_and_dispatch(request, UpdateTableError::from_response)
6209 .await?;
6210 let mut response = response;
6211 let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
6212 proto::json::ResponsePayload::new(&response).deserialize::<UpdateTableOutput, _>()
6213 }
6214
6215 /// <p><p>Updates auto scaling settings on your global tables at once.</p> <note> <p>This operation only applies to <a href="https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/globaltables.V2.html">Version 2019.11.21</a> of global tables.</p> </note></p>
6216 async fn update_table_replica_auto_scaling(
6217 &self,
6218 input: UpdateTableReplicaAutoScalingInput,
6219 ) -> Result<UpdateTableReplicaAutoScalingOutput, RusotoError<UpdateTableReplicaAutoScalingError>>
6220 {
6221 let mut request = self.new_signed_request("POST", "/");
6222 request.add_header(
6223 "x-amz-target",
6224 "DynamoDB_20120810.UpdateTableReplicaAutoScaling",
6225 );
6226 let encoded = serde_json::to_string(&input).unwrap();
6227 request.set_payload(Some(encoded));
6228
6229 let response = self
6230 .sign_and_dispatch(request, UpdateTableReplicaAutoScalingError::from_response)
6231 .await?;
6232 let mut response = response;
6233 let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
6234 proto::json::ResponsePayload::new(&response)
6235 .deserialize::<UpdateTableReplicaAutoScalingOutput, _>()
6236 }
6237
6238 /// <p>The <code>UpdateTimeToLive</code> method enables or disables Time to Live (TTL) for the specified table. A successful <code>UpdateTimeToLive</code> call returns the current <code>TimeToLiveSpecification</code>. It can take up to one hour for the change to fully process. Any additional <code>UpdateTimeToLive</code> calls for the same table during this one hour duration result in a <code>ValidationException</code>. </p> <p>TTL compares the current time in epoch time format to the time stored in the TTL attribute of an item. If the epoch time value stored in the attribute is less than the current time, the item is marked as expired and subsequently deleted.</p> <note> <p> The epoch time format is the number of seconds elapsed since 12:00:00 AM January 1, 1970 UTC. </p> </note> <p>DynamoDB deletes expired items on a best-effort basis to ensure availability of throughput for other data operations. </p> <important> <p>DynamoDB typically deletes expired items within two days of expiration. The exact duration within which an item gets deleted after expiration is specific to the nature of the workload. Items that have expired and not been deleted will still show up in reads, queries, and scans.</p> </important> <p>As items are deleted, they are removed from any local secondary index and global secondary index immediately in the same eventually consistent way as a standard delete operation.</p> <p>For more information, see <a href="https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/TTL.html">Time To Live</a> in the Amazon DynamoDB Developer Guide. </p>
6239 async fn update_time_to_live(
6240 &self,
6241 input: UpdateTimeToLiveInput,
6242 ) -> Result<UpdateTimeToLiveOutput, RusotoError<UpdateTimeToLiveError>> {
6243 let mut request = self.new_signed_request("POST", "/");
6244 request.add_header("x-amz-target", "DynamoDB_20120810.UpdateTimeToLive");
6245 let encoded = serde_json::to_string(&input).unwrap();
6246 request.set_payload(Some(encoded));
6247
6248 let response = self
6249 .sign_and_dispatch(request, UpdateTimeToLiveError::from_response)
6250 .await?;
6251 let mut response = response;
6252 let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
6253 proto::json::ResponsePayload::new(&response).deserialize::<UpdateTimeToLiveOutput, _>()
6254 }
6255}