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#[derive(Clone, Debug, Default, PartialEq, Serialize)]
368#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
369pub struct BatchExecuteStatementInput {
370 /// <p> The list of PartiQL statements representing the batch to run. </p>
371 #[serde(rename = "Statements")]
372 pub statements: Vec<BatchStatementRequest>,
373}
374
375#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
376#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
377pub struct BatchExecuteStatementOutput {
378 /// <p> The response to each PartiQL statement in the batch. </p>
379 #[serde(rename = "Responses")]
380 #[serde(skip_serializing_if = "Option::is_none")]
381 pub responses: Option<Vec<BatchStatementResponse>>,
382}
383
384/// <p>Represents the input of a <code>BatchGetItem</code> operation.</p>
385#[derive(Clone, Debug, Default, PartialEq, Serialize)]
386#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
387pub struct BatchGetItemInput {
388 /// <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>
389 #[serde(rename = "RequestItems")]
390 pub request_items: ::std::collections::HashMap<String, KeysAndAttributes>,
391 #[serde(rename = "ReturnConsumedCapacity")]
392 #[serde(skip_serializing_if = "Option::is_none")]
393 pub return_consumed_capacity: Option<String>,
394}
395
396/// <p>Represents the output of a <code>BatchGetItem</code> operation.</p>
397#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
398#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
399pub struct BatchGetItemOutput {
400 /// <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>
401 #[serde(rename = "ConsumedCapacity")]
402 #[serde(skip_serializing_if = "Option::is_none")]
403 pub consumed_capacity: Option<Vec<ConsumedCapacity>>,
404 /// <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>
405 #[serde(rename = "Responses")]
406 #[serde(skip_serializing_if = "Option::is_none")]
407 pub responses: Option<
408 ::std::collections::HashMap<
409 String,
410 Vec<::std::collections::HashMap<String, AttributeValue>>,
411 >,
412 >,
413 /// <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>
414 #[serde(rename = "UnprocessedKeys")]
415 #[serde(skip_serializing_if = "Option::is_none")]
416 pub unprocessed_keys: Option<::std::collections::HashMap<String, KeysAndAttributes>>,
417}
418
419/// <p> An error associated with a statement in a PartiQL batch that was run. </p>
420#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
421#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
422pub struct BatchStatementError {
423 /// <p> The error code associated with the failed PartiQL batch statement. </p>
424 #[serde(rename = "Code")]
425 #[serde(skip_serializing_if = "Option::is_none")]
426 pub code: Option<String>,
427 /// <p> The error message associated with the PartiQL batch resposne. </p>
428 #[serde(rename = "Message")]
429 #[serde(skip_serializing_if = "Option::is_none")]
430 pub message: Option<String>,
431}
432
433/// <p> A PartiQL batch statement request. </p>
434#[derive(Clone, Debug, Default, PartialEq, Serialize)]
435#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
436pub struct BatchStatementRequest {
437 /// <p> The read consistency of the PartiQL batch request. </p>
438 #[serde(rename = "ConsistentRead")]
439 #[serde(skip_serializing_if = "Option::is_none")]
440 pub consistent_read: Option<bool>,
441 /// <p> The parameters associated with a PartiQL statement in the batch request. </p>
442 #[serde(rename = "Parameters")]
443 #[serde(skip_serializing_if = "Option::is_none")]
444 pub parameters: Option<Vec<AttributeValue>>,
445 /// <p> A valid PartiQL statement. </p>
446 #[serde(rename = "Statement")]
447 pub statement: String,
448}
449
450/// <p> A PartiQL batch statement response.. </p>
451#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
452#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
453pub struct BatchStatementResponse {
454 /// <p> The error associated with a failed PartiQL batch statement. </p>
455 #[serde(rename = "Error")]
456 #[serde(skip_serializing_if = "Option::is_none")]
457 pub error: Option<BatchStatementError>,
458 /// <p> A DynamoDB item associated with a BatchStatementResponse </p>
459 #[serde(rename = "Item")]
460 #[serde(skip_serializing_if = "Option::is_none")]
461 pub item: Option<::std::collections::HashMap<String, AttributeValue>>,
462 /// <p> The table name associated with a failed PartiQL batch statement. </p>
463 #[serde(rename = "TableName")]
464 #[serde(skip_serializing_if = "Option::is_none")]
465 pub table_name: Option<String>,
466}
467
468/// <p>Represents the input of a <code>BatchWriteItem</code> operation.</p>
469#[derive(Clone, Debug, Default, PartialEq, Serialize)]
470#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
471pub struct BatchWriteItemInput {
472 /// <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>
473 #[serde(rename = "RequestItems")]
474 pub request_items: ::std::collections::HashMap<String, Vec<WriteRequest>>,
475 #[serde(rename = "ReturnConsumedCapacity")]
476 #[serde(skip_serializing_if = "Option::is_none")]
477 pub return_consumed_capacity: Option<String>,
478 /// <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>
479 #[serde(rename = "ReturnItemCollectionMetrics")]
480 #[serde(skip_serializing_if = "Option::is_none")]
481 pub return_item_collection_metrics: Option<String>,
482}
483
484/// <p>Represents the output of a <code>BatchWriteItem</code> operation.</p>
485#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
486#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
487pub struct BatchWriteItemOutput {
488 /// <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>
489 #[serde(rename = "ConsumedCapacity")]
490 #[serde(skip_serializing_if = "Option::is_none")]
491 pub consumed_capacity: Option<Vec<ConsumedCapacity>>,
492 /// <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>
493 #[serde(rename = "ItemCollectionMetrics")]
494 #[serde(skip_serializing_if = "Option::is_none")]
495 pub item_collection_metrics:
496 Option<::std::collections::HashMap<String, Vec<ItemCollectionMetrics>>>,
497 /// <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>
498 #[serde(rename = "UnprocessedItems")]
499 #[serde(skip_serializing_if = "Option::is_none")]
500 pub unprocessed_items: Option<::std::collections::HashMap<String, Vec<WriteRequest>>>,
501}
502
503/// <p>Contains the details for the read/write capacity mode.</p>
504#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
505#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
506pub struct BillingModeSummary {
507 /// <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>
508 #[serde(rename = "BillingMode")]
509 #[serde(skip_serializing_if = "Option::is_none")]
510 pub billing_mode: Option<String>,
511 /// <p>Represents the time when <code>PAY_PER_REQUEST</code> was last set as the read/write capacity mode.</p>
512 #[serde(rename = "LastUpdateToPayPerRequestDateTime")]
513 #[serde(skip_serializing_if = "Option::is_none")]
514 pub last_update_to_pay_per_request_date_time: Option<f64>,
515}
516
517/// <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>
518#[derive(Clone, Debug, Default, PartialEq)]
519pub struct CancellationReason {
520 /// <p>Status code for the result of the cancelled transaction.</p>
521 pub code: Option<String>,
522 /// <p>Item in the request which caused the transaction to get cancelled.</p>
523 pub item: Option<::std::collections::HashMap<String, AttributeValue>>,
524 /// <p>Cancellation reason message description.</p>
525 pub message: Option<String>,
526}
527
528/// <p>Represents the amount of provisioned throughput capacity consumed on a table or an index.</p>
529#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
530#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
531pub struct Capacity {
532 /// <p>The total number of capacity units consumed on a table or an index.</p>
533 #[serde(rename = "CapacityUnits")]
534 #[serde(skip_serializing_if = "Option::is_none")]
535 pub capacity_units: Option<f64>,
536 /// <p>The total number of read capacity units consumed on a table or an index.</p>
537 #[serde(rename = "ReadCapacityUnits")]
538 #[serde(skip_serializing_if = "Option::is_none")]
539 pub read_capacity_units: Option<f64>,
540 /// <p>The total number of write capacity units consumed on a table or an index.</p>
541 #[serde(rename = "WriteCapacityUnits")]
542 #[serde(skip_serializing_if = "Option::is_none")]
543 pub write_capacity_units: Option<f64>,
544}
545
546/// <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>
547#[derive(Clone, Debug, Default, PartialEq, Serialize)]
548#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
549pub struct Condition {
550 /// <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>
551 #[serde(rename = "AttributeValueList")]
552 #[serde(skip_serializing_if = "Option::is_none")]
553 pub attribute_value_list: Option<Vec<AttributeValue>>,
554 /// <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>
555 #[serde(rename = "ComparisonOperator")]
556 pub comparison_operator: String,
557}
558
559/// <p>Represents a request to perform a check that an item exists or to check the condition of specific attributes of the item.</p>
560#[derive(Clone, Debug, Default, PartialEq, Serialize)]
561#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
562pub struct ConditionCheck {
563 /// <p>A condition that must be satisfied in order for a conditional update to succeed.</p>
564 #[serde(rename = "ConditionExpression")]
565 pub condition_expression: String,
566 /// <p>One or more substitution tokens for attribute names in an expression.</p>
567 #[serde(rename = "ExpressionAttributeNames")]
568 #[serde(skip_serializing_if = "Option::is_none")]
569 pub expression_attribute_names: Option<::std::collections::HashMap<String, String>>,
570 /// <p>One or more values that can be substituted in an expression.</p>
571 #[serde(rename = "ExpressionAttributeValues")]
572 #[serde(skip_serializing_if = "Option::is_none")]
573 pub expression_attribute_values: Option<::std::collections::HashMap<String, AttributeValue>>,
574 /// <p>The primary key of the item to be checked. Each element consists of an attribute name and a value for that attribute.</p>
575 #[serde(rename = "Key")]
576 pub key: ::std::collections::HashMap<String, AttributeValue>,
577 /// <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>
578 #[serde(rename = "ReturnValuesOnConditionCheckFailure")]
579 #[serde(skip_serializing_if = "Option::is_none")]
580 pub return_values_on_condition_check_failure: Option<String>,
581 /// <p>Name of the table for the check item request.</p>
582 #[serde(rename = "TableName")]
583 pub table_name: String,
584}
585
586/// <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>
587#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
588#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
589pub struct ConsumedCapacity {
590 /// <p>The total number of capacity units consumed by the operation.</p>
591 #[serde(rename = "CapacityUnits")]
592 #[serde(skip_serializing_if = "Option::is_none")]
593 pub capacity_units: Option<f64>,
594 /// <p>The amount of throughput consumed on each global index affected by the operation.</p>
595 #[serde(rename = "GlobalSecondaryIndexes")]
596 #[serde(skip_serializing_if = "Option::is_none")]
597 pub global_secondary_indexes: Option<::std::collections::HashMap<String, Capacity>>,
598 /// <p>The amount of throughput consumed on each local index affected by the operation.</p>
599 #[serde(rename = "LocalSecondaryIndexes")]
600 #[serde(skip_serializing_if = "Option::is_none")]
601 pub local_secondary_indexes: Option<::std::collections::HashMap<String, Capacity>>,
602 /// <p>The total number of read capacity units consumed by the operation.</p>
603 #[serde(rename = "ReadCapacityUnits")]
604 #[serde(skip_serializing_if = "Option::is_none")]
605 pub read_capacity_units: Option<f64>,
606 /// <p>The amount of throughput consumed on the table affected by the operation.</p>
607 #[serde(rename = "Table")]
608 #[serde(skip_serializing_if = "Option::is_none")]
609 pub table: Option<Capacity>,
610 /// <p>The name of the table that was affected by the operation.</p>
611 #[serde(rename = "TableName")]
612 #[serde(skip_serializing_if = "Option::is_none")]
613 pub table_name: Option<String>,
614 /// <p>The total number of write capacity units consumed by the operation.</p>
615 #[serde(rename = "WriteCapacityUnits")]
616 #[serde(skip_serializing_if = "Option::is_none")]
617 pub write_capacity_units: Option<f64>,
618}
619
620/// <p>Represents the continuous backups and point in time recovery settings on the table.</p>
621#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
622#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
623pub struct ContinuousBackupsDescription {
624 /// <p> <code>ContinuousBackupsStatus</code> can be one of the following states: ENABLED, DISABLED</p>
625 #[serde(rename = "ContinuousBackupsStatus")]
626 pub continuous_backups_status: String,
627 /// <p>The description of the point in time recovery settings applied to the table.</p>
628 #[serde(rename = "PointInTimeRecoveryDescription")]
629 #[serde(skip_serializing_if = "Option::is_none")]
630 pub point_in_time_recovery_description: Option<PointInTimeRecoveryDescription>,
631}
632
633/// <p>Represents a Contributor Insights summary entry.</p>
634#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
635#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
636pub struct ContributorInsightsSummary {
637 /// <p>Describes the current status for contributor insights for the given table and index, if applicable.</p>
638 #[serde(rename = "ContributorInsightsStatus")]
639 #[serde(skip_serializing_if = "Option::is_none")]
640 pub contributor_insights_status: Option<String>,
641 /// <p>Name of the index associated with the summary, if any.</p>
642 #[serde(rename = "IndexName")]
643 #[serde(skip_serializing_if = "Option::is_none")]
644 pub index_name: Option<String>,
645 /// <p>Name of the table associated with the summary.</p>
646 #[serde(rename = "TableName")]
647 #[serde(skip_serializing_if = "Option::is_none")]
648 pub table_name: Option<String>,
649}
650
651#[derive(Clone, Debug, Default, PartialEq, Serialize)]
652#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
653pub struct CreateBackupInput {
654 /// <p>Specified name for the backup.</p>
655 #[serde(rename = "BackupName")]
656 pub backup_name: String,
657 /// <p>The name of the table.</p>
658 #[serde(rename = "TableName")]
659 pub table_name: String,
660}
661
662#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
663#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
664pub struct CreateBackupOutput {
665 /// <p>Contains the details of the backup created for the table.</p>
666 #[serde(rename = "BackupDetails")]
667 #[serde(skip_serializing_if = "Option::is_none")]
668 pub backup_details: Option<BackupDetails>,
669}
670
671/// <p>Represents a new global secondary index to be added to an existing table.</p>
672#[derive(Clone, Debug, Default, PartialEq, Serialize)]
673#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
674pub struct CreateGlobalSecondaryIndexAction {
675 /// <p>The name of the global secondary index to be created.</p>
676 #[serde(rename = "IndexName")]
677 pub index_name: String,
678 /// <p>The key schema for the global secondary index.</p>
679 #[serde(rename = "KeySchema")]
680 pub key_schema: Vec<KeySchemaElement>,
681 /// <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>
682 #[serde(rename = "Projection")]
683 pub projection: Projection,
684 /// <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">Service, Account, and Table Quotas</a> in the <i>Amazon DynamoDB Developer Guide</i>.</p>
685 #[serde(rename = "ProvisionedThroughput")]
686 #[serde(skip_serializing_if = "Option::is_none")]
687 pub provisioned_throughput: Option<ProvisionedThroughput>,
688}
689
690#[derive(Clone, Debug, Default, PartialEq, Serialize)]
691#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
692pub struct CreateGlobalTableInput {
693 /// <p>The global table name.</p>
694 #[serde(rename = "GlobalTableName")]
695 pub global_table_name: String,
696 /// <p>The Regions where the global table needs to be created.</p>
697 #[serde(rename = "ReplicationGroup")]
698 pub replication_group: Vec<Replica>,
699}
700
701#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
702#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
703pub struct CreateGlobalTableOutput {
704 /// <p>Contains the details of the global table.</p>
705 #[serde(rename = "GlobalTableDescription")]
706 #[serde(skip_serializing_if = "Option::is_none")]
707 pub global_table_description: Option<GlobalTableDescription>,
708}
709
710/// <p>Represents a replica to be added.</p>
711#[derive(Clone, Debug, Default, PartialEq, Serialize)]
712#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
713pub struct CreateReplicaAction {
714 /// <p>The Region of the replica to be added.</p>
715 #[serde(rename = "RegionName")]
716 pub region_name: String,
717}
718
719/// <p>Represents a replica to be created.</p>
720#[derive(Clone, Debug, Default, PartialEq, Serialize)]
721#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
722pub struct CreateReplicationGroupMemberAction {
723 /// <p>Replica-specific global secondary index settings.</p>
724 #[serde(rename = "GlobalSecondaryIndexes")]
725 #[serde(skip_serializing_if = "Option::is_none")]
726 pub global_secondary_indexes: Option<Vec<ReplicaGlobalSecondaryIndex>>,
727 /// <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>
728 #[serde(rename = "KMSMasterKeyId")]
729 #[serde(skip_serializing_if = "Option::is_none")]
730 pub kms_master_key_id: Option<String>,
731 /// <p>Replica-specific provisioned throughput. If not specified, uses the source table's provisioned throughput settings.</p>
732 #[serde(rename = "ProvisionedThroughputOverride")]
733 #[serde(skip_serializing_if = "Option::is_none")]
734 pub provisioned_throughput_override: Option<ProvisionedThroughputOverride>,
735 /// <p>The Region where the new replica will be created.</p>
736 #[serde(rename = "RegionName")]
737 pub region_name: String,
738}
739
740/// <p>Represents the input of a <code>CreateTable</code> operation.</p>
741#[derive(Clone, Debug, Default, PartialEq, Serialize)]
742#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
743pub struct CreateTableInput {
744 /// <p>An array of attributes that describe the key schema for the table and indexes.</p>
745 #[serde(rename = "AttributeDefinitions")]
746 pub attribute_definitions: Vec<AttributeDefinition>,
747 /// <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>
748 #[serde(rename = "BillingMode")]
749 #[serde(skip_serializing_if = "Option::is_none")]
750 pub billing_mode: Option<String>,
751 /// <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>
752 #[serde(rename = "GlobalSecondaryIndexes")]
753 #[serde(skip_serializing_if = "Option::is_none")]
754 pub global_secondary_indexes: Option<Vec<GlobalSecondaryIndex>>,
755 /// <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>
756 #[serde(rename = "KeySchema")]
757 pub key_schema: Vec<KeySchemaElement>,
758 /// <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>
759 #[serde(rename = "LocalSecondaryIndexes")]
760 #[serde(skip_serializing_if = "Option::is_none")]
761 pub local_secondary_indexes: Option<Vec<LocalSecondaryIndex>>,
762 /// <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">Service, Account, and Table Quotas</a> in the <i>Amazon DynamoDB Developer Guide</i>.</p>
763 #[serde(rename = "ProvisionedThroughput")]
764 #[serde(skip_serializing_if = "Option::is_none")]
765 pub provisioned_throughput: Option<ProvisionedThroughput>,
766 /// <p>Represents the settings used to enable server-side encryption.</p>
767 #[serde(rename = "SSESpecification")]
768 #[serde(skip_serializing_if = "Option::is_none")]
769 pub sse_specification: Option<SSESpecification>,
770 /// <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>
771 #[serde(rename = "StreamSpecification")]
772 #[serde(skip_serializing_if = "Option::is_none")]
773 pub stream_specification: Option<StreamSpecification>,
774 /// <p>The name of the table to create.</p>
775 #[serde(rename = "TableName")]
776 pub table_name: String,
777 /// <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>
778 #[serde(rename = "Tags")]
779 #[serde(skip_serializing_if = "Option::is_none")]
780 pub tags: Option<Vec<Tag>>,
781}
782
783/// <p>Represents the output of a <code>CreateTable</code> operation.</p>
784#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
785#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
786pub struct CreateTableOutput {
787 /// <p>Represents the properties of the table.</p>
788 #[serde(rename = "TableDescription")]
789 #[serde(skip_serializing_if = "Option::is_none")]
790 pub table_description: Option<TableDescription>,
791}
792
793/// <p>Represents a request to perform a <code>DeleteItem</code> operation.</p>
794#[derive(Clone, Debug, Default, PartialEq, Serialize)]
795#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
796pub struct Delete {
797 /// <p>A condition that must be satisfied in order for a conditional delete to succeed.</p>
798 #[serde(rename = "ConditionExpression")]
799 #[serde(skip_serializing_if = "Option::is_none")]
800 pub condition_expression: Option<String>,
801 /// <p>One or more substitution tokens for attribute names in an expression.</p>
802 #[serde(rename = "ExpressionAttributeNames")]
803 #[serde(skip_serializing_if = "Option::is_none")]
804 pub expression_attribute_names: Option<::std::collections::HashMap<String, String>>,
805 /// <p>One or more values that can be substituted in an expression.</p>
806 #[serde(rename = "ExpressionAttributeValues")]
807 #[serde(skip_serializing_if = "Option::is_none")]
808 pub expression_attribute_values: Option<::std::collections::HashMap<String, AttributeValue>>,
809 /// <p>The primary key of the item to be deleted. Each element consists of an attribute name and a value for that attribute.</p>
810 #[serde(rename = "Key")]
811 pub key: ::std::collections::HashMap<String, AttributeValue>,
812 /// <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>
813 #[serde(rename = "ReturnValuesOnConditionCheckFailure")]
814 #[serde(skip_serializing_if = "Option::is_none")]
815 pub return_values_on_condition_check_failure: Option<String>,
816 /// <p>Name of the table in which the item to be deleted resides.</p>
817 #[serde(rename = "TableName")]
818 pub table_name: String,
819}
820
821#[derive(Clone, Debug, Default, PartialEq, Serialize)]
822#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
823pub struct DeleteBackupInput {
824 /// <p>The ARN associated with the backup.</p>
825 #[serde(rename = "BackupArn")]
826 pub backup_arn: String,
827}
828
829#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
830#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
831pub struct DeleteBackupOutput {
832 /// <p>Contains the description of the backup created for the table.</p>
833 #[serde(rename = "BackupDescription")]
834 #[serde(skip_serializing_if = "Option::is_none")]
835 pub backup_description: Option<BackupDescription>,
836}
837
838/// <p>Represents a global secondary index to be deleted from an existing table.</p>
839#[derive(Clone, Debug, Default, PartialEq, Serialize)]
840#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
841pub struct DeleteGlobalSecondaryIndexAction {
842 /// <p>The name of the global secondary index to be deleted.</p>
843 #[serde(rename = "IndexName")]
844 pub index_name: String,
845}
846
847/// <p>Represents the input of a <code>DeleteItem</code> operation.</p>
848#[derive(Clone, Debug, Default, PartialEq, Serialize)]
849#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
850pub struct DeleteItemInput {
851 /// <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>
852 #[serde(rename = "ConditionExpression")]
853 #[serde(skip_serializing_if = "Option::is_none")]
854 pub condition_expression: Option<String>,
855 /// <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>
856 #[serde(rename = "ConditionalOperator")]
857 #[serde(skip_serializing_if = "Option::is_none")]
858 pub conditional_operator: Option<String>,
859 /// <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>
860 #[serde(rename = "Expected")]
861 #[serde(skip_serializing_if = "Option::is_none")]
862 pub expected: Option<::std::collections::HashMap<String, ExpectedAttributeValue>>,
863 /// <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>
864 #[serde(rename = "ExpressionAttributeNames")]
865 #[serde(skip_serializing_if = "Option::is_none")]
866 pub expression_attribute_names: Option<::std::collections::HashMap<String, String>>,
867 /// <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>
868 #[serde(rename = "ExpressionAttributeValues")]
869 #[serde(skip_serializing_if = "Option::is_none")]
870 pub expression_attribute_values: Option<::std::collections::HashMap<String, AttributeValue>>,
871 /// <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>
872 #[serde(rename = "Key")]
873 pub key: ::std::collections::HashMap<String, AttributeValue>,
874 #[serde(rename = "ReturnConsumedCapacity")]
875 #[serde(skip_serializing_if = "Option::is_none")]
876 pub return_consumed_capacity: Option<String>,
877 /// <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>
878 #[serde(rename = "ReturnItemCollectionMetrics")]
879 #[serde(skip_serializing_if = "Option::is_none")]
880 pub return_item_collection_metrics: Option<String>,
881 /// <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>
882 #[serde(rename = "ReturnValues")]
883 #[serde(skip_serializing_if = "Option::is_none")]
884 pub return_values: Option<String>,
885 /// <p>The name of the table from which to delete the item.</p>
886 #[serde(rename = "TableName")]
887 pub table_name: String,
888}
889
890/// <p>Represents the output of a <code>DeleteItem</code> operation.</p>
891#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
892#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
893pub struct DeleteItemOutput {
894 /// <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>
895 #[serde(rename = "Attributes")]
896 #[serde(skip_serializing_if = "Option::is_none")]
897 pub attributes: Option<::std::collections::HashMap<String, AttributeValue>>,
898 /// <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>
899 #[serde(rename = "ConsumedCapacity")]
900 #[serde(skip_serializing_if = "Option::is_none")]
901 pub consumed_capacity: Option<ConsumedCapacity>,
902 /// <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>
903 #[serde(rename = "ItemCollectionMetrics")]
904 #[serde(skip_serializing_if = "Option::is_none")]
905 pub item_collection_metrics: Option<ItemCollectionMetrics>,
906}
907
908/// <p>Represents a replica to be removed.</p>
909#[derive(Clone, Debug, Default, PartialEq, Serialize)]
910#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
911pub struct DeleteReplicaAction {
912 /// <p>The Region of the replica to be removed.</p>
913 #[serde(rename = "RegionName")]
914 pub region_name: String,
915}
916
917/// <p>Represents a replica to be deleted.</p>
918#[derive(Clone, Debug, Default, PartialEq, Serialize)]
919#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
920pub struct DeleteReplicationGroupMemberAction {
921 /// <p>The Region where the replica exists.</p>
922 #[serde(rename = "RegionName")]
923 pub region_name: String,
924}
925
926/// <p>Represents a request to perform a <code>DeleteItem</code> operation on an item.</p>
927#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
928pub struct DeleteRequest {
929 /// <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>
930 #[serde(rename = "Key")]
931 pub key: ::std::collections::HashMap<String, AttributeValue>,
932}
933
934/// <p>Represents the input of a <code>DeleteTable</code> operation.</p>
935#[derive(Clone, Debug, Default, PartialEq, Serialize)]
936#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
937pub struct DeleteTableInput {
938 /// <p>The name of the table to delete.</p>
939 #[serde(rename = "TableName")]
940 pub table_name: String,
941}
942
943/// <p>Represents the output of a <code>DeleteTable</code> operation.</p>
944#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
945#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
946pub struct DeleteTableOutput {
947 /// <p>Represents the properties of a table.</p>
948 #[serde(rename = "TableDescription")]
949 #[serde(skip_serializing_if = "Option::is_none")]
950 pub table_description: Option<TableDescription>,
951}
952
953#[derive(Clone, Debug, Default, PartialEq, Serialize)]
954#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
955pub struct DescribeBackupInput {
956 /// <p>The Amazon Resource Name (ARN) associated with the backup.</p>
957 #[serde(rename = "BackupArn")]
958 pub backup_arn: String,
959}
960
961#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
962#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
963pub struct DescribeBackupOutput {
964 /// <p>Contains the description of the backup created for the table.</p>
965 #[serde(rename = "BackupDescription")]
966 #[serde(skip_serializing_if = "Option::is_none")]
967 pub backup_description: Option<BackupDescription>,
968}
969
970#[derive(Clone, Debug, Default, PartialEq, Serialize)]
971#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
972pub struct DescribeContinuousBackupsInput {
973 /// <p>Name of the table for which the customer wants to check the continuous backups and point in time recovery settings.</p>
974 #[serde(rename = "TableName")]
975 pub table_name: String,
976}
977
978#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
979#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
980pub struct DescribeContinuousBackupsOutput {
981 /// <p>Represents the continuous backups and point in time recovery settings on the table.</p>
982 #[serde(rename = "ContinuousBackupsDescription")]
983 #[serde(skip_serializing_if = "Option::is_none")]
984 pub continuous_backups_description: Option<ContinuousBackupsDescription>,
985}
986
987#[derive(Clone, Debug, Default, PartialEq, Serialize)]
988#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
989pub struct DescribeContributorInsightsInput {
990 /// <p>The name of the global secondary index to describe, if applicable.</p>
991 #[serde(rename = "IndexName")]
992 #[serde(skip_serializing_if = "Option::is_none")]
993 pub index_name: Option<String>,
994 /// <p>The name of the table to describe.</p>
995 #[serde(rename = "TableName")]
996 pub table_name: String,
997}
998
999#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
1000#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
1001pub struct DescribeContributorInsightsOutput {
1002 /// <p>List of names of the associated Alpine rules.</p>
1003 #[serde(rename = "ContributorInsightsRuleList")]
1004 #[serde(skip_serializing_if = "Option::is_none")]
1005 pub contributor_insights_rule_list: Option<Vec<String>>,
1006 /// <p>Current Status contributor insights.</p>
1007 #[serde(rename = "ContributorInsightsStatus")]
1008 #[serde(skip_serializing_if = "Option::is_none")]
1009 pub contributor_insights_status: Option<String>,
1010 /// <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>
1011 #[serde(rename = "FailureException")]
1012 #[serde(skip_serializing_if = "Option::is_none")]
1013 pub failure_exception: Option<FailureException>,
1014 /// <p>The name of the global secondary index being described.</p>
1015 #[serde(rename = "IndexName")]
1016 #[serde(skip_serializing_if = "Option::is_none")]
1017 pub index_name: Option<String>,
1018 /// <p>Timestamp of the last time the status was changed.</p>
1019 #[serde(rename = "LastUpdateDateTime")]
1020 #[serde(skip_serializing_if = "Option::is_none")]
1021 pub last_update_date_time: Option<f64>,
1022 /// <p>The name of the table being described.</p>
1023 #[serde(rename = "TableName")]
1024 #[serde(skip_serializing_if = "Option::is_none")]
1025 pub table_name: Option<String>,
1026}
1027
1028#[derive(Clone, Debug, Default, PartialEq, Serialize)]
1029#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
1030pub struct DescribeEndpointsRequest {}
1031
1032#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
1033#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
1034pub struct DescribeEndpointsResponse {
1035 /// <p>List of endpoints.</p>
1036 #[serde(rename = "Endpoints")]
1037 pub endpoints: Vec<Endpoint>,
1038}
1039
1040#[derive(Clone, Debug, Default, PartialEq, Serialize)]
1041#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
1042pub struct DescribeExportInput {
1043 /// <p>The Amazon Resource Name (ARN) associated with the export.</p>
1044 #[serde(rename = "ExportArn")]
1045 pub export_arn: String,
1046}
1047
1048#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
1049#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
1050pub struct DescribeExportOutput {
1051 /// <p>Represents the properties of the export.</p>
1052 #[serde(rename = "ExportDescription")]
1053 #[serde(skip_serializing_if = "Option::is_none")]
1054 pub export_description: Option<ExportDescription>,
1055}
1056
1057#[derive(Clone, Debug, Default, PartialEq, Serialize)]
1058#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
1059pub struct DescribeGlobalTableInput {
1060 /// <p>The name of the global table.</p>
1061 #[serde(rename = "GlobalTableName")]
1062 pub global_table_name: String,
1063}
1064
1065#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
1066#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
1067pub struct DescribeGlobalTableOutput {
1068 /// <p>Contains the details of the global table.</p>
1069 #[serde(rename = "GlobalTableDescription")]
1070 #[serde(skip_serializing_if = "Option::is_none")]
1071 pub global_table_description: Option<GlobalTableDescription>,
1072}
1073
1074#[derive(Clone, Debug, Default, PartialEq, Serialize)]
1075#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
1076pub struct DescribeGlobalTableSettingsInput {
1077 /// <p>The name of the global table to describe.</p>
1078 #[serde(rename = "GlobalTableName")]
1079 pub global_table_name: String,
1080}
1081
1082#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
1083#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
1084pub struct DescribeGlobalTableSettingsOutput {
1085 /// <p>The name of the global table.</p>
1086 #[serde(rename = "GlobalTableName")]
1087 #[serde(skip_serializing_if = "Option::is_none")]
1088 pub global_table_name: Option<String>,
1089 /// <p>The Region-specific settings for the global table.</p>
1090 #[serde(rename = "ReplicaSettings")]
1091 #[serde(skip_serializing_if = "Option::is_none")]
1092 pub replica_settings: Option<Vec<ReplicaSettingsDescription>>,
1093}
1094
1095#[derive(Clone, Debug, Default, PartialEq, Serialize)]
1096#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
1097pub struct DescribeKinesisStreamingDestinationInput {
1098 /// <p>The name of the table being described.</p>
1099 #[serde(rename = "TableName")]
1100 pub table_name: String,
1101}
1102
1103#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
1104#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
1105pub struct DescribeKinesisStreamingDestinationOutput {
1106 /// <p>The list of replica structures for the table being described.</p>
1107 #[serde(rename = "KinesisDataStreamDestinations")]
1108 #[serde(skip_serializing_if = "Option::is_none")]
1109 pub kinesis_data_stream_destinations: Option<Vec<KinesisDataStreamDestination>>,
1110 /// <p>The name of the table being described.</p>
1111 #[serde(rename = "TableName")]
1112 #[serde(skip_serializing_if = "Option::is_none")]
1113 pub table_name: Option<String>,
1114}
1115
1116/// <p>Represents the input of a <code>DescribeLimits</code> operation. Has no content.</p>
1117#[derive(Clone, Debug, Default, PartialEq, Serialize)]
1118#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
1119pub struct DescribeLimitsInput {}
1120
1121/// <p>Represents the output of a <code>DescribeLimits</code> operation.</p>
1122#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
1123#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
1124pub struct DescribeLimitsOutput {
1125 /// <p>The maximum total read capacity units that your account allows you to provision across all of your tables in this Region.</p>
1126 #[serde(rename = "AccountMaxReadCapacityUnits")]
1127 #[serde(skip_serializing_if = "Option::is_none")]
1128 pub account_max_read_capacity_units: Option<i64>,
1129 /// <p>The maximum total write capacity units that your account allows you to provision across all of your tables in this Region.</p>
1130 #[serde(rename = "AccountMaxWriteCapacityUnits")]
1131 #[serde(skip_serializing_if = "Option::is_none")]
1132 pub account_max_write_capacity_units: Option<i64>,
1133 /// <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>
1134 #[serde(rename = "TableMaxReadCapacityUnits")]
1135 #[serde(skip_serializing_if = "Option::is_none")]
1136 pub table_max_read_capacity_units: Option<i64>,
1137 /// <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>
1138 #[serde(rename = "TableMaxWriteCapacityUnits")]
1139 #[serde(skip_serializing_if = "Option::is_none")]
1140 pub table_max_write_capacity_units: Option<i64>,
1141}
1142
1143/// <p>Represents the input of a <code>DescribeTable</code> operation.</p>
1144#[derive(Clone, Debug, Default, PartialEq, Serialize)]
1145#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
1146pub struct DescribeTableInput {
1147 /// <p>The name of the table to describe.</p>
1148 #[serde(rename = "TableName")]
1149 pub table_name: String,
1150}
1151
1152/// <p>Represents the output of a <code>DescribeTable</code> operation.</p>
1153#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
1154#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
1155pub struct DescribeTableOutput {
1156 /// <p>The properties of the table.</p>
1157 #[serde(rename = "Table")]
1158 #[serde(skip_serializing_if = "Option::is_none")]
1159 pub table: Option<TableDescription>,
1160}
1161
1162#[derive(Clone, Debug, Default, PartialEq, Serialize)]
1163#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
1164pub struct DescribeTableReplicaAutoScalingInput {
1165 /// <p>The name of the table.</p>
1166 #[serde(rename = "TableName")]
1167 pub table_name: String,
1168}
1169
1170#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
1171#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
1172pub struct DescribeTableReplicaAutoScalingOutput {
1173 /// <p>Represents the auto scaling properties of the table.</p>
1174 #[serde(rename = "TableAutoScalingDescription")]
1175 #[serde(skip_serializing_if = "Option::is_none")]
1176 pub table_auto_scaling_description: Option<TableAutoScalingDescription>,
1177}
1178
1179#[derive(Clone, Debug, Default, PartialEq, Serialize)]
1180#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
1181pub struct DescribeTimeToLiveInput {
1182 /// <p>The name of the table to be described.</p>
1183 #[serde(rename = "TableName")]
1184 pub table_name: String,
1185}
1186
1187#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
1188#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
1189pub struct DescribeTimeToLiveOutput {
1190 /// <p><p/></p>
1191 #[serde(rename = "TimeToLiveDescription")]
1192 #[serde(skip_serializing_if = "Option::is_none")]
1193 pub time_to_live_description: Option<TimeToLiveDescription>,
1194}
1195
1196/// <p>An endpoint information details.</p>
1197#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
1198#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
1199pub struct Endpoint {
1200 /// <p>IP address of the endpoint.</p>
1201 #[serde(rename = "Address")]
1202 pub address: String,
1203 /// <p>Endpoint cache time to live (TTL) value.</p>
1204 #[serde(rename = "CachePeriodInMinutes")]
1205 pub cache_period_in_minutes: i64,
1206}
1207
1208#[derive(Clone, Debug, Default, PartialEq, Serialize)]
1209#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
1210pub struct ExecuteStatementInput {
1211 /// <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>
1212 #[serde(rename = "ConsistentRead")]
1213 #[serde(skip_serializing_if = "Option::is_none")]
1214 pub consistent_read: Option<bool>,
1215 /// <p> Set this value to get remaining results, if <code>NextToken</code> was returned in the statement response. </p>
1216 #[serde(rename = "NextToken")]
1217 #[serde(skip_serializing_if = "Option::is_none")]
1218 pub next_token: Option<String>,
1219 /// <p> The parameters for the PartiQL statement, if any. </p>
1220 #[serde(rename = "Parameters")]
1221 #[serde(skip_serializing_if = "Option::is_none")]
1222 pub parameters: Option<Vec<AttributeValue>>,
1223 /// <p> The PartiQL statement representing the operation to run. </p>
1224 #[serde(rename = "Statement")]
1225 pub statement: String,
1226}
1227
1228#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
1229#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
1230pub struct ExecuteStatementOutput {
1231 /// <p> If a read operation was used, this property will contain the result of the reade operation; a map of attribute names and their values. For the write operations this value will be empty. </p>
1232 #[serde(rename = "Items")]
1233 #[serde(skip_serializing_if = "Option::is_none")]
1234 pub items: Option<Vec<::std::collections::HashMap<String, AttributeValue>>>,
1235 /// <p> If the response of a read request exceeds the response payload limit DynamoDB will set this value in the response. If set, you can use that this value in the subsequent request to get the remaining results. </p>
1236 #[serde(rename = "NextToken")]
1237 #[serde(skip_serializing_if = "Option::is_none")]
1238 pub next_token: Option<String>,
1239}
1240
1241#[derive(Clone, Debug, Default, PartialEq, Serialize)]
1242#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
1243pub struct ExecuteTransactionInput {
1244 /// <p> Set this value to get remaining results, if <code>NextToken</code> was returned in the statement response. </p>
1245 #[serde(rename = "ClientRequestToken")]
1246 #[serde(skip_serializing_if = "Option::is_none")]
1247 pub client_request_token: Option<String>,
1248 /// <p> The list of PartiQL statements representing the transaction to run. </p>
1249 #[serde(rename = "TransactStatements")]
1250 pub transact_statements: Vec<ParameterizedStatement>,
1251}
1252
1253#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
1254#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
1255pub struct ExecuteTransactionOutput {
1256 /// <p> The response to a PartiQL transaction. </p>
1257 #[serde(rename = "Responses")]
1258 #[serde(skip_serializing_if = "Option::is_none")]
1259 pub responses: Option<Vec<ItemResponse>>,
1260}
1261
1262/// <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>
1263#[derive(Clone, Debug, Default, PartialEq, Serialize)]
1264#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
1265pub struct ExpectedAttributeValue {
1266 /// <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>
1267 #[serde(rename = "AttributeValueList")]
1268 #[serde(skip_serializing_if = "Option::is_none")]
1269 pub attribute_value_list: Option<Vec<AttributeValue>>,
1270 /// <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>
1271 #[serde(rename = "ComparisonOperator")]
1272 #[serde(skip_serializing_if = "Option::is_none")]
1273 pub comparison_operator: Option<String>,
1274 /// <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>
1275 #[serde(rename = "Exists")]
1276 #[serde(skip_serializing_if = "Option::is_none")]
1277 pub exists: Option<bool>,
1278 /// <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>
1279 #[serde(rename = "Value")]
1280 #[serde(skip_serializing_if = "Option::is_none")]
1281 pub value: Option<AttributeValue>,
1282}
1283
1284/// <p>Represents the properties of the exported table.</p>
1285#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
1286#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
1287pub struct ExportDescription {
1288 /// <p>The billable size of the table export.</p>
1289 #[serde(rename = "BilledSizeBytes")]
1290 #[serde(skip_serializing_if = "Option::is_none")]
1291 pub billed_size_bytes: Option<i64>,
1292 /// <p>The client token that was provided for the export task. A client token makes calls to <code>ExportTableToPointInTimeInput</code> idempotent, meaning that multiple identical calls have the same effect as one single call.</p>
1293 #[serde(rename = "ClientToken")]
1294 #[serde(skip_serializing_if = "Option::is_none")]
1295 pub client_token: Option<String>,
1296 /// <p>The time at which the export task completed.</p>
1297 #[serde(rename = "EndTime")]
1298 #[serde(skip_serializing_if = "Option::is_none")]
1299 pub end_time: Option<f64>,
1300 /// <p>The Amazon Resource Name (ARN) of the table export.</p>
1301 #[serde(rename = "ExportArn")]
1302 #[serde(skip_serializing_if = "Option::is_none")]
1303 pub export_arn: Option<String>,
1304 /// <p>The format of the exported data. Valid values for <code>ExportFormat</code> are <code>DYNAMODB_JSON</code> or <code>ION</code>.</p>
1305 #[serde(rename = "ExportFormat")]
1306 #[serde(skip_serializing_if = "Option::is_none")]
1307 pub export_format: Option<String>,
1308 /// <p>The name of the manifest file for the export task.</p>
1309 #[serde(rename = "ExportManifest")]
1310 #[serde(skip_serializing_if = "Option::is_none")]
1311 pub export_manifest: Option<String>,
1312 /// <p>Export can be in one of the following states: IN_PROGRESS, COMPLETED, or FAILED.</p>
1313 #[serde(rename = "ExportStatus")]
1314 #[serde(skip_serializing_if = "Option::is_none")]
1315 pub export_status: Option<String>,
1316 /// <p>Point in time from which table data was exported.</p>
1317 #[serde(rename = "ExportTime")]
1318 #[serde(skip_serializing_if = "Option::is_none")]
1319 pub export_time: Option<f64>,
1320 /// <p>Status code for the result of the failed export.</p>
1321 #[serde(rename = "FailureCode")]
1322 #[serde(skip_serializing_if = "Option::is_none")]
1323 pub failure_code: Option<String>,
1324 /// <p>Export failure reason description.</p>
1325 #[serde(rename = "FailureMessage")]
1326 #[serde(skip_serializing_if = "Option::is_none")]
1327 pub failure_message: Option<String>,
1328 /// <p>The number of items exported.</p>
1329 #[serde(rename = "ItemCount")]
1330 #[serde(skip_serializing_if = "Option::is_none")]
1331 pub item_count: Option<i64>,
1332 /// <p>The name of the Amazon S3 bucket containing the export.</p>
1333 #[serde(rename = "S3Bucket")]
1334 #[serde(skip_serializing_if = "Option::is_none")]
1335 pub s3_bucket: Option<String>,
1336 /// <p>The ID of the AWS account that owns the bucket containing the export.</p>
1337 #[serde(rename = "S3BucketOwner")]
1338 #[serde(skip_serializing_if = "Option::is_none")]
1339 pub s3_bucket_owner: Option<String>,
1340 /// <p>The Amazon S3 bucket prefix used as the file name and path of the exported snapshot.</p>
1341 #[serde(rename = "S3Prefix")]
1342 #[serde(skip_serializing_if = "Option::is_none")]
1343 pub s3_prefix: Option<String>,
1344 /// <p><p>Type of encryption used on the bucket where export data is stored. Valid values for <code>S3SseAlgorithm</code> are:</p> <ul> <li> <p> <code>AES256</code> - server-side encryption with Amazon S3 managed keys</p> </li> <li> <p> <code>KMS</code> - server-side encryption with AWS KMS managed keys</p> </li> </ul></p>
1345 #[serde(rename = "S3SseAlgorithm")]
1346 #[serde(skip_serializing_if = "Option::is_none")]
1347 pub s3_sse_algorithm: Option<String>,
1348 /// <p>The ID of the AWS KMS managed key used to encrypt the S3 bucket where export data is stored (if applicable).</p>
1349 #[serde(rename = "S3SseKmsKeyId")]
1350 #[serde(skip_serializing_if = "Option::is_none")]
1351 pub s3_sse_kms_key_id: Option<String>,
1352 /// <p>The time at which the export task began.</p>
1353 #[serde(rename = "StartTime")]
1354 #[serde(skip_serializing_if = "Option::is_none")]
1355 pub start_time: Option<f64>,
1356 /// <p>The Amazon Resource Name (ARN) of the table that was exported.</p>
1357 #[serde(rename = "TableArn")]
1358 #[serde(skip_serializing_if = "Option::is_none")]
1359 pub table_arn: Option<String>,
1360 /// <p>Unique ID of the table that was exported.</p>
1361 #[serde(rename = "TableId")]
1362 #[serde(skip_serializing_if = "Option::is_none")]
1363 pub table_id: Option<String>,
1364}
1365
1366/// <p>Summary information about an export task.</p>
1367#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
1368#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
1369pub struct ExportSummary {
1370 /// <p>The Amazon Resource Name (ARN) of the export.</p>
1371 #[serde(rename = "ExportArn")]
1372 #[serde(skip_serializing_if = "Option::is_none")]
1373 pub export_arn: Option<String>,
1374 /// <p>Export can be in one of the following states: IN_PROGRESS, COMPLETED, or FAILED.</p>
1375 #[serde(rename = "ExportStatus")]
1376 #[serde(skip_serializing_if = "Option::is_none")]
1377 pub export_status: Option<String>,
1378}
1379
1380#[derive(Clone, Debug, Default, PartialEq, Serialize)]
1381#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
1382pub struct ExportTableToPointInTimeInput {
1383 /// <p>Providing a <code>ClientToken</code> makes the call to <code>ExportTableToPointInTimeInput</code> idempotent, meaning that multiple identical calls have the same effect as one single call.</p> <p>A client token is valid for 8 hours after the first request that uses it is completed. After 8 hours, 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 8 hours, 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 8-hour idempotency window, DynamoDB returns an <code>IdempotentParameterMismatch</code> exception.</p>
1384 #[serde(rename = "ClientToken")]
1385 #[serde(skip_serializing_if = "Option::is_none")]
1386 pub client_token: Option<String>,
1387 /// <p>The format for the exported data. Valid values for <code>ExportFormat</code> are <code>DYNAMODB_JSON</code> or <code>ION</code>.</p>
1388 #[serde(rename = "ExportFormat")]
1389 #[serde(skip_serializing_if = "Option::is_none")]
1390 pub export_format: Option<String>,
1391 /// <p>Time in the past from which to export table data. The table export will be a snapshot of the table's state at this point in time.</p>
1392 #[serde(rename = "ExportTime")]
1393 #[serde(skip_serializing_if = "Option::is_none")]
1394 pub export_time: Option<f64>,
1395 /// <p>The name of the Amazon S3 bucket to export the snapshot to.</p>
1396 #[serde(rename = "S3Bucket")]
1397 pub s3_bucket: String,
1398 /// <p>The ID of the AWS account that owns the bucket the export will be stored in.</p>
1399 #[serde(rename = "S3BucketOwner")]
1400 #[serde(skip_serializing_if = "Option::is_none")]
1401 pub s3_bucket_owner: Option<String>,
1402 /// <p>The Amazon S3 bucket prefix to use as the file name and path of the exported snapshot.</p>
1403 #[serde(rename = "S3Prefix")]
1404 #[serde(skip_serializing_if = "Option::is_none")]
1405 pub s3_prefix: Option<String>,
1406 /// <p><p>Type of encryption used on the bucket where export data will be stored. Valid values for <code>S3SseAlgorithm</code> are:</p> <ul> <li> <p> <code>AES256</code> - server-side encryption with Amazon S3 managed keys</p> </li> <li> <p> <code>KMS</code> - server-side encryption with AWS KMS managed keys</p> </li> </ul></p>
1407 #[serde(rename = "S3SseAlgorithm")]
1408 #[serde(skip_serializing_if = "Option::is_none")]
1409 pub s3_sse_algorithm: Option<String>,
1410 /// <p>The ID of the AWS KMS managed key used to encrypt the S3 bucket where export data will be stored (if applicable).</p>
1411 #[serde(rename = "S3SseKmsKeyId")]
1412 #[serde(skip_serializing_if = "Option::is_none")]
1413 pub s3_sse_kms_key_id: Option<String>,
1414 /// <p>The Amazon Resource Name (ARN) associated with the table to export.</p>
1415 #[serde(rename = "TableArn")]
1416 pub table_arn: String,
1417}
1418
1419#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
1420#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
1421pub struct ExportTableToPointInTimeOutput {
1422 /// <p>Contains a description of the table export.</p>
1423 #[serde(rename = "ExportDescription")]
1424 #[serde(skip_serializing_if = "Option::is_none")]
1425 pub export_description: Option<ExportDescription>,
1426}
1427
1428/// <p>Represents a failure a contributor insights operation.</p>
1429#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
1430#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
1431pub struct FailureException {
1432 /// <p>Description of the failure.</p>
1433 #[serde(rename = "ExceptionDescription")]
1434 #[serde(skip_serializing_if = "Option::is_none")]
1435 pub exception_description: Option<String>,
1436 /// <p>Exception name.</p>
1437 #[serde(rename = "ExceptionName")]
1438 #[serde(skip_serializing_if = "Option::is_none")]
1439 pub exception_name: Option<String>,
1440}
1441
1442/// <p>Specifies an item and related attribute values to retrieve in a <code>TransactGetItem</code> object.</p>
1443#[derive(Clone, Debug, Default, PartialEq, Serialize)]
1444#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
1445pub struct Get {
1446 /// <p>One or more substitution tokens for attribute names in the ProjectionExpression parameter.</p>
1447 #[serde(rename = "ExpressionAttributeNames")]
1448 #[serde(skip_serializing_if = "Option::is_none")]
1449 pub expression_attribute_names: Option<::std::collections::HashMap<String, String>>,
1450 /// <p>A map of attribute names to <code>AttributeValue</code> objects that specifies the primary key of the item to retrieve.</p>
1451 #[serde(rename = "Key")]
1452 pub key: ::std::collections::HashMap<String, AttributeValue>,
1453 /// <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>
1454 #[serde(rename = "ProjectionExpression")]
1455 #[serde(skip_serializing_if = "Option::is_none")]
1456 pub projection_expression: Option<String>,
1457 /// <p>The name of the table from which to retrieve the specified item.</p>
1458 #[serde(rename = "TableName")]
1459 pub table_name: String,
1460}
1461
1462/// <p>Represents the input of a <code>GetItem</code> operation.</p>
1463#[derive(Clone, Debug, Default, PartialEq, Serialize)]
1464#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
1465pub struct GetItemInput {
1466 /// <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>
1467 #[serde(rename = "AttributesToGet")]
1468 #[serde(skip_serializing_if = "Option::is_none")]
1469 pub attributes_to_get: Option<Vec<String>>,
1470 /// <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>
1471 #[serde(rename = "ConsistentRead")]
1472 #[serde(skip_serializing_if = "Option::is_none")]
1473 pub consistent_read: Option<bool>,
1474 /// <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>
1475 #[serde(rename = "ExpressionAttributeNames")]
1476 #[serde(skip_serializing_if = "Option::is_none")]
1477 pub expression_attribute_names: Option<::std::collections::HashMap<String, String>>,
1478 /// <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>
1479 #[serde(rename = "Key")]
1480 pub key: ::std::collections::HashMap<String, AttributeValue>,
1481 /// <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>
1482 #[serde(rename = "ProjectionExpression")]
1483 #[serde(skip_serializing_if = "Option::is_none")]
1484 pub projection_expression: Option<String>,
1485 #[serde(rename = "ReturnConsumedCapacity")]
1486 #[serde(skip_serializing_if = "Option::is_none")]
1487 pub return_consumed_capacity: Option<String>,
1488 /// <p>The name of the table containing the requested item.</p>
1489 #[serde(rename = "TableName")]
1490 pub table_name: String,
1491}
1492
1493/// <p>Represents the output of a <code>GetItem</code> operation.</p>
1494#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
1495#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
1496pub struct GetItemOutput {
1497 /// <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>
1498 #[serde(rename = "ConsumedCapacity")]
1499 #[serde(skip_serializing_if = "Option::is_none")]
1500 pub consumed_capacity: Option<ConsumedCapacity>,
1501 /// <p>A map of attribute names to <code>AttributeValue</code> objects, as specified by <code>ProjectionExpression</code>.</p>
1502 #[serde(rename = "Item")]
1503 #[serde(skip_serializing_if = "Option::is_none")]
1504 pub item: Option<::std::collections::HashMap<String, AttributeValue>>,
1505}
1506
1507/// <p>Represents the properties of a global secondary index.</p>
1508#[derive(Clone, Debug, Default, PartialEq, Serialize)]
1509#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
1510pub struct GlobalSecondaryIndex {
1511 /// <p>The name of the global secondary index. The name must be unique among all other indexes on this table.</p>
1512 #[serde(rename = "IndexName")]
1513 pub index_name: String,
1514 /// <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>
1515 #[serde(rename = "KeySchema")]
1516 pub key_schema: Vec<KeySchemaElement>,
1517 /// <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>
1518 #[serde(rename = "Projection")]
1519 pub projection: Projection,
1520 /// <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">Service, Account, and Table Quotas</a> in the <i>Amazon DynamoDB Developer Guide</i>.</p>
1521 #[serde(rename = "ProvisionedThroughput")]
1522 #[serde(skip_serializing_if = "Option::is_none")]
1523 pub provisioned_throughput: Option<ProvisionedThroughput>,
1524}
1525
1526/// <p>Represents the auto scaling settings of a global secondary index for a global table that will be modified.</p>
1527#[derive(Clone, Debug, Default, PartialEq, Serialize)]
1528#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
1529pub struct GlobalSecondaryIndexAutoScalingUpdate {
1530 /// <p>The name of the global secondary index.</p>
1531 #[serde(rename = "IndexName")]
1532 #[serde(skip_serializing_if = "Option::is_none")]
1533 pub index_name: Option<String>,
1534 #[serde(rename = "ProvisionedWriteCapacityAutoScalingUpdate")]
1535 #[serde(skip_serializing_if = "Option::is_none")]
1536 pub provisioned_write_capacity_auto_scaling_update: Option<AutoScalingSettingsUpdate>,
1537}
1538
1539/// <p>Represents the properties of a global secondary index.</p>
1540#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
1541#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
1542pub struct GlobalSecondaryIndexDescription {
1543 /// <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>
1544 #[serde(rename = "Backfilling")]
1545 #[serde(skip_serializing_if = "Option::is_none")]
1546 pub backfilling: Option<bool>,
1547 /// <p>The Amazon Resource Name (ARN) that uniquely identifies the index.</p>
1548 #[serde(rename = "IndexArn")]
1549 #[serde(skip_serializing_if = "Option::is_none")]
1550 pub index_arn: Option<String>,
1551 /// <p>The name of the global secondary index.</p>
1552 #[serde(rename = "IndexName")]
1553 #[serde(skip_serializing_if = "Option::is_none")]
1554 pub index_name: Option<String>,
1555 /// <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>
1556 #[serde(rename = "IndexSizeBytes")]
1557 #[serde(skip_serializing_if = "Option::is_none")]
1558 pub index_size_bytes: Option<i64>,
1559 /// <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>
1560 #[serde(rename = "IndexStatus")]
1561 #[serde(skip_serializing_if = "Option::is_none")]
1562 pub index_status: Option<String>,
1563 /// <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>
1564 #[serde(rename = "ItemCount")]
1565 #[serde(skip_serializing_if = "Option::is_none")]
1566 pub item_count: Option<i64>,
1567 /// <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>
1568 #[serde(rename = "KeySchema")]
1569 #[serde(skip_serializing_if = "Option::is_none")]
1570 pub key_schema: Option<Vec<KeySchemaElement>>,
1571 /// <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>
1572 #[serde(rename = "Projection")]
1573 #[serde(skip_serializing_if = "Option::is_none")]
1574 pub projection: Option<Projection>,
1575 /// <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">Service, Account, and Table Quotas</a> in the <i>Amazon DynamoDB Developer Guide</i>.</p>
1576 #[serde(rename = "ProvisionedThroughput")]
1577 #[serde(skip_serializing_if = "Option::is_none")]
1578 pub provisioned_throughput: Option<ProvisionedThroughputDescription>,
1579}
1580
1581/// <p>Represents the properties of a global secondary index for the table when the backup was created.</p>
1582#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
1583#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
1584pub struct GlobalSecondaryIndexInfo {
1585 /// <p>The name of the global secondary index.</p>
1586 #[serde(rename = "IndexName")]
1587 #[serde(skip_serializing_if = "Option::is_none")]
1588 pub index_name: Option<String>,
1589 /// <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>
1590 #[serde(rename = "KeySchema")]
1591 #[serde(skip_serializing_if = "Option::is_none")]
1592 pub key_schema: Option<Vec<KeySchemaElement>>,
1593 /// <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>
1594 #[serde(rename = "Projection")]
1595 #[serde(skip_serializing_if = "Option::is_none")]
1596 pub projection: Option<Projection>,
1597 /// <p>Represents the provisioned throughput settings for the specified global secondary index. </p>
1598 #[serde(rename = "ProvisionedThroughput")]
1599 #[serde(skip_serializing_if = "Option::is_none")]
1600 pub provisioned_throughput: Option<ProvisionedThroughput>,
1601}
1602
1603/// <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>
1604#[derive(Clone, Debug, Default, PartialEq, Serialize)]
1605#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
1606pub struct GlobalSecondaryIndexUpdate {
1607 /// <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>
1608 #[serde(rename = "Create")]
1609 #[serde(skip_serializing_if = "Option::is_none")]
1610 pub create: Option<CreateGlobalSecondaryIndexAction>,
1611 /// <p>The name of an existing global secondary index to be removed.</p>
1612 #[serde(rename = "Delete")]
1613 #[serde(skip_serializing_if = "Option::is_none")]
1614 pub delete: Option<DeleteGlobalSecondaryIndexAction>,
1615 /// <p>The name of an existing global secondary index, along with new provisioned throughput settings to be applied to that index.</p>
1616 #[serde(rename = "Update")]
1617 #[serde(skip_serializing_if = "Option::is_none")]
1618 pub update: Option<UpdateGlobalSecondaryIndexAction>,
1619}
1620
1621/// <p>Represents the properties of a global table.</p>
1622#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
1623#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
1624pub struct GlobalTable {
1625 /// <p>The global table name.</p>
1626 #[serde(rename = "GlobalTableName")]
1627 #[serde(skip_serializing_if = "Option::is_none")]
1628 pub global_table_name: Option<String>,
1629 /// <p>The Regions where the global table has replicas.</p>
1630 #[serde(rename = "ReplicationGroup")]
1631 #[serde(skip_serializing_if = "Option::is_none")]
1632 pub replication_group: Option<Vec<Replica>>,
1633}
1634
1635/// <p>Contains details about the global table.</p>
1636#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
1637#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
1638pub struct GlobalTableDescription {
1639 /// <p>The creation time of the global table.</p>
1640 #[serde(rename = "CreationDateTime")]
1641 #[serde(skip_serializing_if = "Option::is_none")]
1642 pub creation_date_time: Option<f64>,
1643 /// <p>The unique identifier of the global table.</p>
1644 #[serde(rename = "GlobalTableArn")]
1645 #[serde(skip_serializing_if = "Option::is_none")]
1646 pub global_table_arn: Option<String>,
1647 /// <p>The global table name.</p>
1648 #[serde(rename = "GlobalTableName")]
1649 #[serde(skip_serializing_if = "Option::is_none")]
1650 pub global_table_name: Option<String>,
1651 /// <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>
1652 #[serde(rename = "GlobalTableStatus")]
1653 #[serde(skip_serializing_if = "Option::is_none")]
1654 pub global_table_status: Option<String>,
1655 /// <p>The Regions where the global table has replicas.</p>
1656 #[serde(rename = "ReplicationGroup")]
1657 #[serde(skip_serializing_if = "Option::is_none")]
1658 pub replication_group: Option<Vec<ReplicaDescription>>,
1659}
1660
1661/// <p>Represents the settings of a global secondary index for a global table that will be modified.</p>
1662#[derive(Clone, Debug, Default, PartialEq, Serialize)]
1663#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
1664pub struct GlobalTableGlobalSecondaryIndexSettingsUpdate {
1665 /// <p>The name of the global secondary index. The name must be unique among all other indexes on this table.</p>
1666 #[serde(rename = "IndexName")]
1667 pub index_name: String,
1668 /// <p>Auto scaling settings for managing a global secondary index's write capacity units.</p>
1669 #[serde(rename = "ProvisionedWriteCapacityAutoScalingSettingsUpdate")]
1670 #[serde(skip_serializing_if = "Option::is_none")]
1671 pub provisioned_write_capacity_auto_scaling_settings_update: Option<AutoScalingSettingsUpdate>,
1672 /// <p>The maximum number of writes consumed per second before DynamoDB returns a <code>ThrottlingException.</code> </p>
1673 #[serde(rename = "ProvisionedWriteCapacityUnits")]
1674 #[serde(skip_serializing_if = "Option::is_none")]
1675 pub provisioned_write_capacity_units: Option<i64>,
1676}
1677
1678/// <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>
1679#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
1680#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
1681pub struct ItemCollectionMetrics {
1682 /// <p>The partition key value of the item collection. This value is the same as the partition key value of the item.</p>
1683 #[serde(rename = "ItemCollectionKey")]
1684 #[serde(skip_serializing_if = "Option::is_none")]
1685 pub item_collection_key: Option<::std::collections::HashMap<String, AttributeValue>>,
1686 /// <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>
1687 #[serde(rename = "SizeEstimateRangeGB")]
1688 #[serde(skip_serializing_if = "Option::is_none")]
1689 pub size_estimate_range_gb: Option<Vec<f64>>,
1690}
1691
1692/// <p>Details for the requested item.</p>
1693#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
1694#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
1695pub struct ItemResponse {
1696 /// <p>Map of attribute data consisting of the data type and attribute value.</p>
1697 #[serde(rename = "Item")]
1698 #[serde(skip_serializing_if = "Option::is_none")]
1699 pub item: Option<::std::collections::HashMap<String, AttributeValue>>,
1700}
1701
1702/// <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>
1703#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
1704pub struct KeySchemaElement {
1705 /// <p>The name of a key attribute.</p>
1706 #[serde(rename = "AttributeName")]
1707 pub attribute_name: String,
1708 /// <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>
1709 #[serde(rename = "KeyType")]
1710 pub key_type: String,
1711}
1712
1713/// <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>
1714#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
1715pub struct KeysAndAttributes {
1716 /// <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>
1717 #[serde(rename = "AttributesToGet")]
1718 #[serde(skip_serializing_if = "Option::is_none")]
1719 pub attributes_to_get: Option<Vec<String>>,
1720 /// <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>
1721 #[serde(rename = "ConsistentRead")]
1722 #[serde(skip_serializing_if = "Option::is_none")]
1723 pub consistent_read: Option<bool>,
1724 /// <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>
1725 #[serde(rename = "ExpressionAttributeNames")]
1726 #[serde(skip_serializing_if = "Option::is_none")]
1727 pub expression_attribute_names: Option<::std::collections::HashMap<String, String>>,
1728 /// <p>The primary key attribute values that define the items and the attributes associated with the items.</p>
1729 #[serde(rename = "Keys")]
1730 pub keys: Vec<::std::collections::HashMap<String, AttributeValue>>,
1731 /// <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>
1732 #[serde(rename = "ProjectionExpression")]
1733 #[serde(skip_serializing_if = "Option::is_none")]
1734 pub projection_expression: Option<String>,
1735}
1736
1737/// <p>Describes a Kinesis data stream destination.</p>
1738#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
1739#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
1740pub struct KinesisDataStreamDestination {
1741 /// <p>The current status of replication.</p>
1742 #[serde(rename = "DestinationStatus")]
1743 #[serde(skip_serializing_if = "Option::is_none")]
1744 pub destination_status: Option<String>,
1745 /// <p>The human-readable string that corresponds to the replica status.</p>
1746 #[serde(rename = "DestinationStatusDescription")]
1747 #[serde(skip_serializing_if = "Option::is_none")]
1748 pub destination_status_description: Option<String>,
1749 /// <p>The ARN for a specific Kinesis data stream.</p>
1750 #[serde(rename = "StreamArn")]
1751 #[serde(skip_serializing_if = "Option::is_none")]
1752 pub stream_arn: Option<String>,
1753}
1754
1755#[derive(Clone, Debug, Default, PartialEq, Serialize)]
1756#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
1757pub struct KinesisStreamingDestinationInput {
1758 /// <p>The ARN for a Kinesis data stream.</p>
1759 #[serde(rename = "StreamArn")]
1760 pub stream_arn: String,
1761 /// <p>The name of the DynamoDB table.</p>
1762 #[serde(rename = "TableName")]
1763 pub table_name: String,
1764}
1765
1766#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
1767#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
1768pub struct KinesisStreamingDestinationOutput {
1769 /// <p>The current status of the replication.</p>
1770 #[serde(rename = "DestinationStatus")]
1771 #[serde(skip_serializing_if = "Option::is_none")]
1772 pub destination_status: Option<String>,
1773 /// <p>The ARN for the specific Kinesis data stream.</p>
1774 #[serde(rename = "StreamArn")]
1775 #[serde(skip_serializing_if = "Option::is_none")]
1776 pub stream_arn: Option<String>,
1777 /// <p>The name of the table being modified.</p>
1778 #[serde(rename = "TableName")]
1779 #[serde(skip_serializing_if = "Option::is_none")]
1780 pub table_name: Option<String>,
1781}
1782
1783#[derive(Clone, Debug, Default, PartialEq, Serialize)]
1784#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
1785pub struct ListBackupsInput {
1786 /// <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>
1787 #[serde(rename = "BackupType")]
1788 #[serde(skip_serializing_if = "Option::is_none")]
1789 pub backup_type: Option<String>,
1790 /// <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>
1791 #[serde(rename = "ExclusiveStartBackupArn")]
1792 #[serde(skip_serializing_if = "Option::is_none")]
1793 pub exclusive_start_backup_arn: Option<String>,
1794 /// <p>Maximum number of backups to return at once.</p>
1795 #[serde(rename = "Limit")]
1796 #[serde(skip_serializing_if = "Option::is_none")]
1797 pub limit: Option<i64>,
1798 /// <p>The backups from the table specified by <code>TableName</code> are listed. </p>
1799 #[serde(rename = "TableName")]
1800 #[serde(skip_serializing_if = "Option::is_none")]
1801 pub table_name: Option<String>,
1802 /// <p>Only backups created after this time are listed. <code>TimeRangeLowerBound</code> is inclusive.</p>
1803 #[serde(rename = "TimeRangeLowerBound")]
1804 #[serde(skip_serializing_if = "Option::is_none")]
1805 pub time_range_lower_bound: Option<f64>,
1806 /// <p>Only backups created before this time are listed. <code>TimeRangeUpperBound</code> is exclusive. </p>
1807 #[serde(rename = "TimeRangeUpperBound")]
1808 #[serde(skip_serializing_if = "Option::is_none")]
1809 pub time_range_upper_bound: Option<f64>,
1810}
1811
1812#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
1813#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
1814pub struct ListBackupsOutput {
1815 /// <p>List of <code>BackupSummary</code> objects.</p>
1816 #[serde(rename = "BackupSummaries")]
1817 #[serde(skip_serializing_if = "Option::is_none")]
1818 pub backup_summaries: Option<Vec<BackupSummary>>,
1819 /// <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>
1820 #[serde(rename = "LastEvaluatedBackupArn")]
1821 #[serde(skip_serializing_if = "Option::is_none")]
1822 pub last_evaluated_backup_arn: Option<String>,
1823}
1824
1825#[derive(Clone, Debug, Default, PartialEq, Serialize)]
1826#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
1827pub struct ListContributorInsightsInput {
1828 /// <p>Maximum number of results to return per page.</p>
1829 #[serde(rename = "MaxResults")]
1830 #[serde(skip_serializing_if = "Option::is_none")]
1831 pub max_results: Option<i64>,
1832 /// <p>A token to for the desired page, if there is one.</p>
1833 #[serde(rename = "NextToken")]
1834 #[serde(skip_serializing_if = "Option::is_none")]
1835 pub next_token: Option<String>,
1836 /// <p>The name of the table.</p>
1837 #[serde(rename = "TableName")]
1838 #[serde(skip_serializing_if = "Option::is_none")]
1839 pub table_name: Option<String>,
1840}
1841
1842#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
1843#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
1844pub struct ListContributorInsightsOutput {
1845 /// <p>A list of ContributorInsightsSummary.</p>
1846 #[serde(rename = "ContributorInsightsSummaries")]
1847 #[serde(skip_serializing_if = "Option::is_none")]
1848 pub contributor_insights_summaries: Option<Vec<ContributorInsightsSummary>>,
1849 /// <p>A token to go to the next page if there is one.</p>
1850 #[serde(rename = "NextToken")]
1851 #[serde(skip_serializing_if = "Option::is_none")]
1852 pub next_token: Option<String>,
1853}
1854
1855#[derive(Clone, Debug, Default, PartialEq, Serialize)]
1856#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
1857pub struct ListExportsInput {
1858 /// <p>Maximum number of results to return per page.</p>
1859 #[serde(rename = "MaxResults")]
1860 #[serde(skip_serializing_if = "Option::is_none")]
1861 pub max_results: Option<i64>,
1862 /// <p>An optional string that, if supplied, must be copied from the output of a previous call to <code>ListExports</code>. When provided in this manner, the API fetches the next page of results.</p>
1863 #[serde(rename = "NextToken")]
1864 #[serde(skip_serializing_if = "Option::is_none")]
1865 pub next_token: Option<String>,
1866 /// <p>The Amazon Resource Name (ARN) associated with the exported table.</p>
1867 #[serde(rename = "TableArn")]
1868 #[serde(skip_serializing_if = "Option::is_none")]
1869 pub table_arn: Option<String>,
1870}
1871
1872#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
1873#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
1874pub struct ListExportsOutput {
1875 /// <p>A list of <code>ExportSummary</code> objects.</p>
1876 #[serde(rename = "ExportSummaries")]
1877 #[serde(skip_serializing_if = "Option::is_none")]
1878 pub export_summaries: Option<Vec<ExportSummary>>,
1879 /// <p>If this value is returned, there are additional results to be displayed. To retrieve them, call <code>ListExports</code> again, with <code>NextToken</code> set to this value.</p>
1880 #[serde(rename = "NextToken")]
1881 #[serde(skip_serializing_if = "Option::is_none")]
1882 pub next_token: Option<String>,
1883}
1884
1885#[derive(Clone, Debug, Default, PartialEq, Serialize)]
1886#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
1887pub struct ListGlobalTablesInput {
1888 /// <p>The first global table name that this operation will evaluate.</p>
1889 #[serde(rename = "ExclusiveStartGlobalTableName")]
1890 #[serde(skip_serializing_if = "Option::is_none")]
1891 pub exclusive_start_global_table_name: Option<String>,
1892 /// <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>
1893 #[serde(rename = "Limit")]
1894 #[serde(skip_serializing_if = "Option::is_none")]
1895 pub limit: Option<i64>,
1896 /// <p>Lists the global tables in a specific Region.</p>
1897 #[serde(rename = "RegionName")]
1898 #[serde(skip_serializing_if = "Option::is_none")]
1899 pub region_name: Option<String>,
1900}
1901
1902#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
1903#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
1904pub struct ListGlobalTablesOutput {
1905 /// <p>List of global table names.</p>
1906 #[serde(rename = "GlobalTables")]
1907 #[serde(skip_serializing_if = "Option::is_none")]
1908 pub global_tables: Option<Vec<GlobalTable>>,
1909 /// <p>Last evaluated global table name.</p>
1910 #[serde(rename = "LastEvaluatedGlobalTableName")]
1911 #[serde(skip_serializing_if = "Option::is_none")]
1912 pub last_evaluated_global_table_name: Option<String>,
1913}
1914
1915/// <p>Represents the input of a <code>ListTables</code> operation.</p>
1916#[derive(Clone, Debug, Default, PartialEq, Serialize)]
1917#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
1918pub struct ListTablesInput {
1919 /// <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>
1920 #[serde(rename = "ExclusiveStartTableName")]
1921 #[serde(skip_serializing_if = "Option::is_none")]
1922 pub exclusive_start_table_name: Option<String>,
1923 /// <p>A maximum number of table names to return. If this parameter is not specified, the limit is 100.</p>
1924 #[serde(rename = "Limit")]
1925 #[serde(skip_serializing_if = "Option::is_none")]
1926 pub limit: Option<i64>,
1927}
1928
1929/// <p>Represents the output of a <code>ListTables</code> operation.</p>
1930#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
1931#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
1932pub struct ListTablesOutput {
1933 /// <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>
1934 #[serde(rename = "LastEvaluatedTableName")]
1935 #[serde(skip_serializing_if = "Option::is_none")]
1936 pub last_evaluated_table_name: Option<String>,
1937 /// <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>
1938 #[serde(rename = "TableNames")]
1939 #[serde(skip_serializing_if = "Option::is_none")]
1940 pub table_names: Option<Vec<String>>,
1941}
1942
1943#[derive(Clone, Debug, Default, PartialEq, Serialize)]
1944#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
1945pub struct ListTagsOfResourceInput {
1946 /// <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>
1947 #[serde(rename = "NextToken")]
1948 #[serde(skip_serializing_if = "Option::is_none")]
1949 pub next_token: Option<String>,
1950 /// <p>The Amazon DynamoDB resource with tags to be listed. This value is an Amazon Resource Name (ARN).</p>
1951 #[serde(rename = "ResourceArn")]
1952 pub resource_arn: String,
1953}
1954
1955#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
1956#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
1957pub struct ListTagsOfResourceOutput {
1958 /// <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>
1959 #[serde(rename = "NextToken")]
1960 #[serde(skip_serializing_if = "Option::is_none")]
1961 pub next_token: Option<String>,
1962 /// <p>The tags currently associated with the Amazon DynamoDB resource.</p>
1963 #[serde(rename = "Tags")]
1964 #[serde(skip_serializing_if = "Option::is_none")]
1965 pub tags: Option<Vec<Tag>>,
1966}
1967
1968/// <p>Represents the properties of a local secondary index.</p>
1969#[derive(Clone, Debug, Default, PartialEq, Serialize)]
1970#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
1971pub struct LocalSecondaryIndex {
1972 /// <p>The name of the local secondary index. The name must be unique among all other indexes on this table.</p>
1973 #[serde(rename = "IndexName")]
1974 pub index_name: String,
1975 /// <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>
1976 #[serde(rename = "KeySchema")]
1977 pub key_schema: Vec<KeySchemaElement>,
1978 /// <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>
1979 #[serde(rename = "Projection")]
1980 pub projection: Projection,
1981}
1982
1983/// <p>Represents the properties of a local secondary index.</p>
1984#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
1985#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
1986pub struct LocalSecondaryIndexDescription {
1987 /// <p>The Amazon Resource Name (ARN) that uniquely identifies the index.</p>
1988 #[serde(rename = "IndexArn")]
1989 #[serde(skip_serializing_if = "Option::is_none")]
1990 pub index_arn: Option<String>,
1991 /// <p>Represents the name of the local secondary index.</p>
1992 #[serde(rename = "IndexName")]
1993 #[serde(skip_serializing_if = "Option::is_none")]
1994 pub index_name: Option<String>,
1995 /// <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>
1996 #[serde(rename = "IndexSizeBytes")]
1997 #[serde(skip_serializing_if = "Option::is_none")]
1998 pub index_size_bytes: Option<i64>,
1999 /// <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>
2000 #[serde(rename = "ItemCount")]
2001 #[serde(skip_serializing_if = "Option::is_none")]
2002 pub item_count: Option<i64>,
2003 /// <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>
2004 #[serde(rename = "KeySchema")]
2005 #[serde(skip_serializing_if = "Option::is_none")]
2006 pub key_schema: Option<Vec<KeySchemaElement>>,
2007 /// <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>
2008 #[serde(rename = "Projection")]
2009 #[serde(skip_serializing_if = "Option::is_none")]
2010 pub projection: Option<Projection>,
2011}
2012
2013/// <p>Represents the properties of a local secondary index for the table when the backup was created.</p>
2014#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
2015#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
2016pub struct LocalSecondaryIndexInfo {
2017 /// <p>Represents the name of the local secondary index.</p>
2018 #[serde(rename = "IndexName")]
2019 #[serde(skip_serializing_if = "Option::is_none")]
2020 pub index_name: Option<String>,
2021 /// <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>
2022 #[serde(rename = "KeySchema")]
2023 #[serde(skip_serializing_if = "Option::is_none")]
2024 pub key_schema: Option<Vec<KeySchemaElement>>,
2025 /// <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>
2026 #[serde(rename = "Projection")]
2027 #[serde(skip_serializing_if = "Option::is_none")]
2028 pub projection: Option<Projection>,
2029}
2030
2031/// <p> Represents a PartiQL statment that uses parameters. </p>
2032#[derive(Clone, Debug, Default, PartialEq, Serialize)]
2033#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
2034pub struct ParameterizedStatement {
2035 /// <p> The parameter values. </p>
2036 #[serde(rename = "Parameters")]
2037 #[serde(skip_serializing_if = "Option::is_none")]
2038 pub parameters: Option<Vec<AttributeValue>>,
2039 /// <p> A PartiQL statment that uses parameters. </p>
2040 #[serde(rename = "Statement")]
2041 pub statement: String,
2042}
2043
2044/// <p>The description of the point in time settings applied to the table.</p>
2045#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
2046#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
2047pub struct PointInTimeRecoveryDescription {
2048 /// <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>
2049 #[serde(rename = "EarliestRestorableDateTime")]
2050 #[serde(skip_serializing_if = "Option::is_none")]
2051 pub earliest_restorable_date_time: Option<f64>,
2052 /// <p> <code>LatestRestorableDateTime</code> is typically 5 minutes before the current time. </p>
2053 #[serde(rename = "LatestRestorableDateTime")]
2054 #[serde(skip_serializing_if = "Option::is_none")]
2055 pub latest_restorable_date_time: Option<f64>,
2056 /// <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>
2057 #[serde(rename = "PointInTimeRecoveryStatus")]
2058 #[serde(skip_serializing_if = "Option::is_none")]
2059 pub point_in_time_recovery_status: Option<String>,
2060}
2061
2062/// <p>Represents the settings used to enable point in time recovery.</p>
2063#[derive(Clone, Debug, Default, PartialEq, Serialize)]
2064#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
2065pub struct PointInTimeRecoverySpecification {
2066 /// <p>Indicates whether point in time recovery is enabled (true) or disabled (false) on the table.</p>
2067 #[serde(rename = "PointInTimeRecoveryEnabled")]
2068 pub point_in_time_recovery_enabled: bool,
2069}
2070
2071/// <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>
2072#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
2073pub struct Projection {
2074 /// <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>
2075 #[serde(rename = "NonKeyAttributes")]
2076 #[serde(skip_serializing_if = "Option::is_none")]
2077 pub non_key_attributes: Option<Vec<String>>,
2078 /// <p><p>The set of attributes that are projected into the index:</p> <ul> <li> <p> <code>KEYS<em>ONLY</code> - Only the index and primary keys are projected into the index.</p> </li> <li> <p> <code>INCLUDE</code> - In addition to the attributes described in <code>KEYS</em>ONLY</code>, the secondary index will include other non-key attributes that you specify.</p> </li> <li> <p> <code>ALL</code> - All of the table attributes are projected into the index.</p> </li> </ul></p>
2079 #[serde(rename = "ProjectionType")]
2080 #[serde(skip_serializing_if = "Option::is_none")]
2081 pub projection_type: Option<String>,
2082}
2083
2084/// <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">Service, Account, and Table Quotas</a> in the <i>Amazon DynamoDB Developer Guide</i>.</p>
2085#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
2086pub struct ProvisionedThroughput {
2087 /// <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>
2088 #[serde(rename = "ReadCapacityUnits")]
2089 pub read_capacity_units: i64,
2090 /// <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>
2091 #[serde(rename = "WriteCapacityUnits")]
2092 pub write_capacity_units: i64,
2093}
2094
2095/// <p>Represents the provisioned throughput settings for the table, consisting of read and write capacity units, along with data about increases and decreases.</p>
2096#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
2097#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
2098pub struct ProvisionedThroughputDescription {
2099 /// <p>The date and time of the last provisioned throughput decrease for this table.</p>
2100 #[serde(rename = "LastDecreaseDateTime")]
2101 #[serde(skip_serializing_if = "Option::is_none")]
2102 pub last_decrease_date_time: Option<f64>,
2103 /// <p>The date and time of the last provisioned throughput increase for this table.</p>
2104 #[serde(rename = "LastIncreaseDateTime")]
2105 #[serde(skip_serializing_if = "Option::is_none")]
2106 pub last_increase_date_time: Option<f64>,
2107 /// <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">Service, Account, and Table Quotas</a> in the <i>Amazon DynamoDB Developer Guide</i>.</p>
2108 #[serde(rename = "NumberOfDecreasesToday")]
2109 #[serde(skip_serializing_if = "Option::is_none")]
2110 pub number_of_decreases_today: Option<i64>,
2111 /// <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>
2112 #[serde(rename = "ReadCapacityUnits")]
2113 #[serde(skip_serializing_if = "Option::is_none")]
2114 pub read_capacity_units: Option<i64>,
2115 /// <p>The maximum number of writes consumed per second before DynamoDB returns a <code>ThrottlingException</code>.</p>
2116 #[serde(rename = "WriteCapacityUnits")]
2117 #[serde(skip_serializing_if = "Option::is_none")]
2118 pub write_capacity_units: Option<i64>,
2119}
2120
2121/// <p>Replica-specific provisioned throughput settings. If not specified, uses the source table's provisioned throughput settings.</p>
2122#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
2123pub struct ProvisionedThroughputOverride {
2124 /// <p>Replica-specific read capacity units. If not specified, uses the source table's read capacity settings.</p>
2125 #[serde(rename = "ReadCapacityUnits")]
2126 #[serde(skip_serializing_if = "Option::is_none")]
2127 pub read_capacity_units: Option<i64>,
2128}
2129
2130/// <p>Represents a request to perform a <code>PutItem</code> operation.</p>
2131#[derive(Clone, Debug, Default, PartialEq, Serialize)]
2132#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
2133pub struct Put {
2134 /// <p>A condition that must be satisfied in order for a conditional update to succeed.</p>
2135 #[serde(rename = "ConditionExpression")]
2136 #[serde(skip_serializing_if = "Option::is_none")]
2137 pub condition_expression: Option<String>,
2138 /// <p>One or more substitution tokens for attribute names in an expression.</p>
2139 #[serde(rename = "ExpressionAttributeNames")]
2140 #[serde(skip_serializing_if = "Option::is_none")]
2141 pub expression_attribute_names: Option<::std::collections::HashMap<String, String>>,
2142 /// <p>One or more values that can be substituted in an expression.</p>
2143 #[serde(rename = "ExpressionAttributeValues")]
2144 #[serde(skip_serializing_if = "Option::is_none")]
2145 pub expression_attribute_values: Option<::std::collections::HashMap<String, AttributeValue>>,
2146 /// <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>
2147 #[serde(rename = "Item")]
2148 pub item: ::std::collections::HashMap<String, AttributeValue>,
2149 /// <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>
2150 #[serde(rename = "ReturnValuesOnConditionCheckFailure")]
2151 #[serde(skip_serializing_if = "Option::is_none")]
2152 pub return_values_on_condition_check_failure: Option<String>,
2153 /// <p>Name of the table in which to write the item.</p>
2154 #[serde(rename = "TableName")]
2155 pub table_name: String,
2156}
2157
2158/// <p>Represents the input of a <code>PutItem</code> operation.</p>
2159#[derive(Clone, Debug, Default, PartialEq, Serialize)]
2160#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
2161pub struct PutItemInput {
2162 /// <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>
2163 #[serde(rename = "ConditionExpression")]
2164 #[serde(skip_serializing_if = "Option::is_none")]
2165 pub condition_expression: Option<String>,
2166 /// <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>
2167 #[serde(rename = "ConditionalOperator")]
2168 #[serde(skip_serializing_if = "Option::is_none")]
2169 pub conditional_operator: Option<String>,
2170 /// <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>
2171 #[serde(rename = "Expected")]
2172 #[serde(skip_serializing_if = "Option::is_none")]
2173 pub expected: Option<::std::collections::HashMap<String, ExpectedAttributeValue>>,
2174 /// <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>
2175 #[serde(rename = "ExpressionAttributeNames")]
2176 #[serde(skip_serializing_if = "Option::is_none")]
2177 pub expression_attribute_names: Option<::std::collections::HashMap<String, String>>,
2178 /// <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>
2179 #[serde(rename = "ExpressionAttributeValues")]
2180 #[serde(skip_serializing_if = "Option::is_none")]
2181 pub expression_attribute_values: Option<::std::collections::HashMap<String, AttributeValue>>,
2182 /// <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>
2183 #[serde(rename = "Item")]
2184 pub item: ::std::collections::HashMap<String, AttributeValue>,
2185 #[serde(rename = "ReturnConsumedCapacity")]
2186 #[serde(skip_serializing_if = "Option::is_none")]
2187 pub return_consumed_capacity: Option<String>,
2188 /// <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>
2189 #[serde(rename = "ReturnItemCollectionMetrics")]
2190 #[serde(skip_serializing_if = "Option::is_none")]
2191 pub return_item_collection_metrics: Option<String>,
2192 /// <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>
2193 #[serde(rename = "ReturnValues")]
2194 #[serde(skip_serializing_if = "Option::is_none")]
2195 pub return_values: Option<String>,
2196 /// <p>The name of the table to contain the item.</p>
2197 #[serde(rename = "TableName")]
2198 pub table_name: String,
2199}
2200
2201/// <p>Represents the output of a <code>PutItem</code> operation.</p>
2202#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
2203#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
2204pub struct PutItemOutput {
2205 /// <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>
2206 #[serde(rename = "Attributes")]
2207 #[serde(skip_serializing_if = "Option::is_none")]
2208 pub attributes: Option<::std::collections::HashMap<String, AttributeValue>>,
2209 /// <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>
2210 #[serde(rename = "ConsumedCapacity")]
2211 #[serde(skip_serializing_if = "Option::is_none")]
2212 pub consumed_capacity: Option<ConsumedCapacity>,
2213 /// <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>
2214 #[serde(rename = "ItemCollectionMetrics")]
2215 #[serde(skip_serializing_if = "Option::is_none")]
2216 pub item_collection_metrics: Option<ItemCollectionMetrics>,
2217}
2218
2219/// <p>Represents a request to perform a <code>PutItem</code> operation on an item.</p>
2220#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
2221pub struct PutRequest {
2222 /// <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>
2223 #[serde(rename = "Item")]
2224 pub item: ::std::collections::HashMap<String, AttributeValue>,
2225}
2226
2227/// <p>Represents the input of a <code>Query</code> operation.</p>
2228#[derive(Clone, Debug, Default, PartialEq, Serialize)]
2229#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
2230pub struct QueryInput {
2231 /// <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>
2232 #[serde(rename = "AttributesToGet")]
2233 #[serde(skip_serializing_if = "Option::is_none")]
2234 pub attributes_to_get: Option<Vec<String>>,
2235 /// <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>
2236 #[serde(rename = "ConditionalOperator")]
2237 #[serde(skip_serializing_if = "Option::is_none")]
2238 pub conditional_operator: Option<String>,
2239 /// <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>
2240 #[serde(rename = "ConsistentRead")]
2241 #[serde(skip_serializing_if = "Option::is_none")]
2242 pub consistent_read: Option<bool>,
2243 /// <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>
2244 #[serde(rename = "ExclusiveStartKey")]
2245 #[serde(skip_serializing_if = "Option::is_none")]
2246 pub exclusive_start_key: Option<::std::collections::HashMap<String, AttributeValue>>,
2247 /// <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>
2248 #[serde(rename = "ExpressionAttributeNames")]
2249 #[serde(skip_serializing_if = "Option::is_none")]
2250 pub expression_attribute_names: Option<::std::collections::HashMap<String, String>>,
2251 /// <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>
2252 #[serde(rename = "ExpressionAttributeValues")]
2253 #[serde(skip_serializing_if = "Option::is_none")]
2254 pub expression_attribute_values: Option<::std::collections::HashMap<String, AttributeValue>>,
2255 /// <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>
2256 #[serde(rename = "FilterExpression")]
2257 #[serde(skip_serializing_if = "Option::is_none")]
2258 pub filter_expression: Option<String>,
2259 /// <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>
2260 #[serde(rename = "IndexName")]
2261 #[serde(skip_serializing_if = "Option::is_none")]
2262 pub index_name: Option<String>,
2263 /// <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>
2264 #[serde(rename = "KeyConditionExpression")]
2265 #[serde(skip_serializing_if = "Option::is_none")]
2266 pub key_condition_expression: Option<String>,
2267 /// <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>
2268 #[serde(rename = "KeyConditions")]
2269 #[serde(skip_serializing_if = "Option::is_none")]
2270 pub key_conditions: Option<::std::collections::HashMap<String, Condition>>,
2271 /// <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>
2272 #[serde(rename = "Limit")]
2273 #[serde(skip_serializing_if = "Option::is_none")]
2274 pub limit: Option<i64>,
2275 /// <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>
2276 #[serde(rename = "ProjectionExpression")]
2277 #[serde(skip_serializing_if = "Option::is_none")]
2278 pub projection_expression: Option<String>,
2279 /// <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>
2280 #[serde(rename = "QueryFilter")]
2281 #[serde(skip_serializing_if = "Option::is_none")]
2282 pub query_filter: Option<::std::collections::HashMap<String, Condition>>,
2283 #[serde(rename = "ReturnConsumedCapacity")]
2284 #[serde(skip_serializing_if = "Option::is_none")]
2285 pub return_consumed_capacity: Option<String>,
2286 /// <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>
2287 #[serde(rename = "ScanIndexForward")]
2288 #[serde(skip_serializing_if = "Option::is_none")]
2289 pub scan_index_forward: Option<bool>,
2290 /// <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>
2291 #[serde(rename = "Select")]
2292 #[serde(skip_serializing_if = "Option::is_none")]
2293 pub select: Option<String>,
2294 /// <p>The name of the table containing the requested items.</p>
2295 #[serde(rename = "TableName")]
2296 pub table_name: String,
2297}
2298
2299/// <p>Represents the output of a <code>Query</code> operation.</p>
2300#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
2301#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
2302pub struct QueryOutput {
2303 /// <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>
2304 #[serde(rename = "ConsumedCapacity")]
2305 #[serde(skip_serializing_if = "Option::is_none")]
2306 pub consumed_capacity: Option<ConsumedCapacity>,
2307 /// <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>
2308 #[serde(rename = "Count")]
2309 #[serde(skip_serializing_if = "Option::is_none")]
2310 pub count: Option<i64>,
2311 /// <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>
2312 #[serde(rename = "Items")]
2313 #[serde(skip_serializing_if = "Option::is_none")]
2314 pub items: Option<Vec<::std::collections::HashMap<String, AttributeValue>>>,
2315 /// <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>
2316 #[serde(rename = "LastEvaluatedKey")]
2317 #[serde(skip_serializing_if = "Option::is_none")]
2318 pub last_evaluated_key: Option<::std::collections::HashMap<String, AttributeValue>>,
2319 /// <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>
2320 #[serde(rename = "ScannedCount")]
2321 #[serde(skip_serializing_if = "Option::is_none")]
2322 pub scanned_count: Option<i64>,
2323}
2324
2325/// <p>Represents the properties of a replica.</p>
2326#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
2327pub struct Replica {
2328 /// <p>The Region where the replica needs to be created.</p>
2329 #[serde(rename = "RegionName")]
2330 #[serde(skip_serializing_if = "Option::is_none")]
2331 pub region_name: Option<String>,
2332}
2333
2334/// <p>Represents the auto scaling settings of the replica.</p>
2335#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
2336#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
2337pub struct ReplicaAutoScalingDescription {
2338 /// <p>Replica-specific global secondary index auto scaling settings.</p>
2339 #[serde(rename = "GlobalSecondaryIndexes")]
2340 #[serde(skip_serializing_if = "Option::is_none")]
2341 pub global_secondary_indexes: Option<Vec<ReplicaGlobalSecondaryIndexAutoScalingDescription>>,
2342 /// <p>The Region where the replica exists.</p>
2343 #[serde(rename = "RegionName")]
2344 #[serde(skip_serializing_if = "Option::is_none")]
2345 pub region_name: Option<String>,
2346 #[serde(rename = "ReplicaProvisionedReadCapacityAutoScalingSettings")]
2347 #[serde(skip_serializing_if = "Option::is_none")]
2348 pub replica_provisioned_read_capacity_auto_scaling_settings:
2349 Option<AutoScalingSettingsDescription>,
2350 #[serde(rename = "ReplicaProvisionedWriteCapacityAutoScalingSettings")]
2351 #[serde(skip_serializing_if = "Option::is_none")]
2352 pub replica_provisioned_write_capacity_auto_scaling_settings:
2353 Option<AutoScalingSettingsDescription>,
2354 /// <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>
2355 #[serde(rename = "ReplicaStatus")]
2356 #[serde(skip_serializing_if = "Option::is_none")]
2357 pub replica_status: Option<String>,
2358}
2359
2360/// <p>Represents the auto scaling settings of a replica that will be modified.</p>
2361#[derive(Clone, Debug, Default, PartialEq, Serialize)]
2362#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
2363pub struct ReplicaAutoScalingUpdate {
2364 /// <p>The Region where the replica exists.</p>
2365 #[serde(rename = "RegionName")]
2366 pub region_name: String,
2367 /// <p>Represents the auto scaling settings of global secondary indexes that will be modified.</p>
2368 #[serde(rename = "ReplicaGlobalSecondaryIndexUpdates")]
2369 #[serde(skip_serializing_if = "Option::is_none")]
2370 pub replica_global_secondary_index_updates:
2371 Option<Vec<ReplicaGlobalSecondaryIndexAutoScalingUpdate>>,
2372 #[serde(rename = "ReplicaProvisionedReadCapacityAutoScalingUpdate")]
2373 #[serde(skip_serializing_if = "Option::is_none")]
2374 pub replica_provisioned_read_capacity_auto_scaling_update: Option<AutoScalingSettingsUpdate>,
2375}
2376
2377/// <p>Contains the details of the replica.</p>
2378#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
2379#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
2380pub struct ReplicaDescription {
2381 /// <p>Replica-specific global secondary index settings.</p>
2382 #[serde(rename = "GlobalSecondaryIndexes")]
2383 #[serde(skip_serializing_if = "Option::is_none")]
2384 pub global_secondary_indexes: Option<Vec<ReplicaGlobalSecondaryIndexDescription>>,
2385 /// <p>The AWS KMS customer master key (CMK) of the replica that will be used for AWS KMS encryption.</p>
2386 #[serde(rename = "KMSMasterKeyId")]
2387 #[serde(skip_serializing_if = "Option::is_none")]
2388 pub kms_master_key_id: Option<String>,
2389 /// <p>Replica-specific provisioned throughput. If not described, uses the source table's provisioned throughput settings.</p>
2390 #[serde(rename = "ProvisionedThroughputOverride")]
2391 #[serde(skip_serializing_if = "Option::is_none")]
2392 pub provisioned_throughput_override: Option<ProvisionedThroughputOverride>,
2393 /// <p>The name of the Region.</p>
2394 #[serde(rename = "RegionName")]
2395 #[serde(skip_serializing_if = "Option::is_none")]
2396 pub region_name: Option<String>,
2397 /// <p>The time at which the replica was first detected as inaccessible. To determine cause of inaccessibility check the <code>ReplicaStatus</code> property.</p>
2398 #[serde(rename = "ReplicaInaccessibleDateTime")]
2399 #[serde(skip_serializing_if = "Option::is_none")]
2400 pub replica_inaccessible_date_time: Option<f64>,
2401 /// <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> <li> <p> <code>REGION<em>DISABLED</code> - The replica is inaccessible because the AWS Region has been disabled.</p> <note> <p>If the AWS Region remains inaccessible for more than 20 hours, DynamoDB will remove this replica from the replication group. The replica will not be deleted and replication will stop from and to this region.</p> </note> </li> <li> <p> <code>INACCESSIBLE</em>ENCRYPTION_CREDENTIALS </code> - The AWS KMS key used to encrypt the table is inaccessible.</p> <note> <p>If the AWS KMS key remains inaccessible for more than 20 hours, DynamoDB will remove this replica from the replication group. The replica will not be deleted and replication will stop from and to this region.</p> </note> </li> </ul></p>
2402 #[serde(rename = "ReplicaStatus")]
2403 #[serde(skip_serializing_if = "Option::is_none")]
2404 pub replica_status: Option<String>,
2405 /// <p>Detailed information about the replica status.</p>
2406 #[serde(rename = "ReplicaStatusDescription")]
2407 #[serde(skip_serializing_if = "Option::is_none")]
2408 pub replica_status_description: Option<String>,
2409 /// <p>Specifies the progress of a Create, Update, or Delete action on the replica as a percentage.</p>
2410 #[serde(rename = "ReplicaStatusPercentProgress")]
2411 #[serde(skip_serializing_if = "Option::is_none")]
2412 pub replica_status_percent_progress: Option<String>,
2413}
2414
2415/// <p>Represents the properties of a replica global secondary index.</p>
2416#[derive(Clone, Debug, Default, PartialEq, Serialize)]
2417#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
2418pub struct ReplicaGlobalSecondaryIndex {
2419 /// <p>The name of the global secondary index.</p>
2420 #[serde(rename = "IndexName")]
2421 pub index_name: String,
2422 /// <p>Replica table GSI-specific provisioned throughput. If not specified, uses the source table GSI's read capacity settings.</p>
2423 #[serde(rename = "ProvisionedThroughputOverride")]
2424 #[serde(skip_serializing_if = "Option::is_none")]
2425 pub provisioned_throughput_override: Option<ProvisionedThroughputOverride>,
2426}
2427
2428/// <p>Represents the auto scaling configuration for a replica global secondary index.</p>
2429#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
2430#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
2431pub struct ReplicaGlobalSecondaryIndexAutoScalingDescription {
2432 /// <p>The name of the global secondary index.</p>
2433 #[serde(rename = "IndexName")]
2434 #[serde(skip_serializing_if = "Option::is_none")]
2435 pub index_name: Option<String>,
2436 /// <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>
2437 #[serde(rename = "IndexStatus")]
2438 #[serde(skip_serializing_if = "Option::is_none")]
2439 pub index_status: Option<String>,
2440 #[serde(rename = "ProvisionedReadCapacityAutoScalingSettings")]
2441 #[serde(skip_serializing_if = "Option::is_none")]
2442 pub provisioned_read_capacity_auto_scaling_settings: Option<AutoScalingSettingsDescription>,
2443 #[serde(rename = "ProvisionedWriteCapacityAutoScalingSettings")]
2444 #[serde(skip_serializing_if = "Option::is_none")]
2445 pub provisioned_write_capacity_auto_scaling_settings: Option<AutoScalingSettingsDescription>,
2446}
2447
2448/// <p>Represents the auto scaling settings of a global secondary index for a replica that will be modified.</p>
2449#[derive(Clone, Debug, Default, PartialEq, Serialize)]
2450#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
2451pub struct ReplicaGlobalSecondaryIndexAutoScalingUpdate {
2452 /// <p>The name of the global secondary index.</p>
2453 #[serde(rename = "IndexName")]
2454 #[serde(skip_serializing_if = "Option::is_none")]
2455 pub index_name: Option<String>,
2456 #[serde(rename = "ProvisionedReadCapacityAutoScalingUpdate")]
2457 #[serde(skip_serializing_if = "Option::is_none")]
2458 pub provisioned_read_capacity_auto_scaling_update: Option<AutoScalingSettingsUpdate>,
2459}
2460
2461/// <p>Represents the properties of a replica global secondary index.</p>
2462#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
2463#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
2464pub struct ReplicaGlobalSecondaryIndexDescription {
2465 /// <p>The name of the global secondary index.</p>
2466 #[serde(rename = "IndexName")]
2467 #[serde(skip_serializing_if = "Option::is_none")]
2468 pub index_name: Option<String>,
2469 /// <p>If not described, uses the source table GSI's read capacity settings.</p>
2470 #[serde(rename = "ProvisionedThroughputOverride")]
2471 #[serde(skip_serializing_if = "Option::is_none")]
2472 pub provisioned_throughput_override: Option<ProvisionedThroughputOverride>,
2473}
2474
2475/// <p>Represents the properties of a global secondary index.</p>
2476#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
2477#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
2478pub struct ReplicaGlobalSecondaryIndexSettingsDescription {
2479 /// <p>The name of the global secondary index. The name must be unique among all other indexes on this table.</p>
2480 #[serde(rename = "IndexName")]
2481 pub index_name: String,
2482 /// <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>
2483 #[serde(rename = "IndexStatus")]
2484 #[serde(skip_serializing_if = "Option::is_none")]
2485 pub index_status: Option<String>,
2486 /// <p>Auto scaling settings for a global secondary index replica's read capacity units.</p>
2487 #[serde(rename = "ProvisionedReadCapacityAutoScalingSettings")]
2488 #[serde(skip_serializing_if = "Option::is_none")]
2489 pub provisioned_read_capacity_auto_scaling_settings: Option<AutoScalingSettingsDescription>,
2490 /// <p>The maximum number of strongly consistent reads consumed per second before DynamoDB returns a <code>ThrottlingException</code>.</p>
2491 #[serde(rename = "ProvisionedReadCapacityUnits")]
2492 #[serde(skip_serializing_if = "Option::is_none")]
2493 pub provisioned_read_capacity_units: Option<i64>,
2494 /// <p>Auto scaling settings for a global secondary index replica's write capacity units.</p>
2495 #[serde(rename = "ProvisionedWriteCapacityAutoScalingSettings")]
2496 #[serde(skip_serializing_if = "Option::is_none")]
2497 pub provisioned_write_capacity_auto_scaling_settings: Option<AutoScalingSettingsDescription>,
2498 /// <p>The maximum number of writes consumed per second before DynamoDB returns a <code>ThrottlingException</code>.</p>
2499 #[serde(rename = "ProvisionedWriteCapacityUnits")]
2500 #[serde(skip_serializing_if = "Option::is_none")]
2501 pub provisioned_write_capacity_units: Option<i64>,
2502}
2503
2504/// <p>Represents the settings of a global secondary index for a global table that will be modified.</p>
2505#[derive(Clone, Debug, Default, PartialEq, Serialize)]
2506#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
2507pub struct ReplicaGlobalSecondaryIndexSettingsUpdate {
2508 /// <p>The name of the global secondary index. The name must be unique among all other indexes on this table.</p>
2509 #[serde(rename = "IndexName")]
2510 pub index_name: String,
2511 /// <p>Auto scaling settings for managing a global secondary index replica's read capacity units.</p>
2512 #[serde(rename = "ProvisionedReadCapacityAutoScalingSettingsUpdate")]
2513 #[serde(skip_serializing_if = "Option::is_none")]
2514 pub provisioned_read_capacity_auto_scaling_settings_update: Option<AutoScalingSettingsUpdate>,
2515 /// <p>The maximum number of strongly consistent reads consumed per second before DynamoDB returns a <code>ThrottlingException</code>.</p>
2516 #[serde(rename = "ProvisionedReadCapacityUnits")]
2517 #[serde(skip_serializing_if = "Option::is_none")]
2518 pub provisioned_read_capacity_units: Option<i64>,
2519}
2520
2521/// <p>Represents the properties of a replica.</p>
2522#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
2523#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
2524pub struct ReplicaSettingsDescription {
2525 /// <p>The Region name of the replica.</p>
2526 #[serde(rename = "RegionName")]
2527 pub region_name: String,
2528 /// <p>The read/write capacity mode of the replica.</p>
2529 #[serde(rename = "ReplicaBillingModeSummary")]
2530 #[serde(skip_serializing_if = "Option::is_none")]
2531 pub replica_billing_mode_summary: Option<BillingModeSummary>,
2532 /// <p>Replica global secondary index settings for the global table.</p>
2533 #[serde(rename = "ReplicaGlobalSecondaryIndexSettings")]
2534 #[serde(skip_serializing_if = "Option::is_none")]
2535 pub replica_global_secondary_index_settings:
2536 Option<Vec<ReplicaGlobalSecondaryIndexSettingsDescription>>,
2537 /// <p>Auto scaling settings for a global table replica's read capacity units.</p>
2538 #[serde(rename = "ReplicaProvisionedReadCapacityAutoScalingSettings")]
2539 #[serde(skip_serializing_if = "Option::is_none")]
2540 pub replica_provisioned_read_capacity_auto_scaling_settings:
2541 Option<AutoScalingSettingsDescription>,
2542 /// <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>
2543 #[serde(rename = "ReplicaProvisionedReadCapacityUnits")]
2544 #[serde(skip_serializing_if = "Option::is_none")]
2545 pub replica_provisioned_read_capacity_units: Option<i64>,
2546 /// <p>Auto scaling settings for a global table replica's write capacity units.</p>
2547 #[serde(rename = "ReplicaProvisionedWriteCapacityAutoScalingSettings")]
2548 #[serde(skip_serializing_if = "Option::is_none")]
2549 pub replica_provisioned_write_capacity_auto_scaling_settings:
2550 Option<AutoScalingSettingsDescription>,
2551 /// <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>
2552 #[serde(rename = "ReplicaProvisionedWriteCapacityUnits")]
2553 #[serde(skip_serializing_if = "Option::is_none")]
2554 pub replica_provisioned_write_capacity_units: Option<i64>,
2555 /// <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>
2556 #[serde(rename = "ReplicaStatus")]
2557 #[serde(skip_serializing_if = "Option::is_none")]
2558 pub replica_status: Option<String>,
2559}
2560
2561/// <p>Represents the settings for a global table in a Region that will be modified.</p>
2562#[derive(Clone, Debug, Default, PartialEq, Serialize)]
2563#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
2564pub struct ReplicaSettingsUpdate {
2565 /// <p>The Region of the replica to be added.</p>
2566 #[serde(rename = "RegionName")]
2567 pub region_name: String,
2568 /// <p>Represents the settings of a global secondary index for a global table that will be modified.</p>
2569 #[serde(rename = "ReplicaGlobalSecondaryIndexSettingsUpdate")]
2570 #[serde(skip_serializing_if = "Option::is_none")]
2571 pub replica_global_secondary_index_settings_update:
2572 Option<Vec<ReplicaGlobalSecondaryIndexSettingsUpdate>>,
2573 /// <p>Auto scaling settings for managing a global table replica's read capacity units.</p>
2574 #[serde(rename = "ReplicaProvisionedReadCapacityAutoScalingSettingsUpdate")]
2575 #[serde(skip_serializing_if = "Option::is_none")]
2576 pub replica_provisioned_read_capacity_auto_scaling_settings_update:
2577 Option<AutoScalingSettingsUpdate>,
2578 /// <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>
2579 #[serde(rename = "ReplicaProvisionedReadCapacityUnits")]
2580 #[serde(skip_serializing_if = "Option::is_none")]
2581 pub replica_provisioned_read_capacity_units: Option<i64>,
2582}
2583
2584/// <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>
2585#[derive(Clone, Debug, Default, PartialEq, Serialize)]
2586#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
2587pub struct ReplicaUpdate {
2588 /// <p>The parameters required for creating a replica on an existing global table.</p>
2589 #[serde(rename = "Create")]
2590 #[serde(skip_serializing_if = "Option::is_none")]
2591 pub create: Option<CreateReplicaAction>,
2592 /// <p>The name of the existing replica to be removed.</p>
2593 #[serde(rename = "Delete")]
2594 #[serde(skip_serializing_if = "Option::is_none")]
2595 pub delete: Option<DeleteReplicaAction>,
2596}
2597
2598/// <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>
2599#[derive(Clone, Debug, Default, PartialEq, Serialize)]
2600#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
2601pub struct ReplicationGroupUpdate {
2602 /// <p>The parameters required for creating a replica for the table.</p>
2603 #[serde(rename = "Create")]
2604 #[serde(skip_serializing_if = "Option::is_none")]
2605 pub create: Option<CreateReplicationGroupMemberAction>,
2606 /// <p>The parameters required for deleting a replica for the table.</p>
2607 #[serde(rename = "Delete")]
2608 #[serde(skip_serializing_if = "Option::is_none")]
2609 pub delete: Option<DeleteReplicationGroupMemberAction>,
2610 /// <p>The parameters required for updating a replica for the table.</p>
2611 #[serde(rename = "Update")]
2612 #[serde(skip_serializing_if = "Option::is_none")]
2613 pub update: Option<UpdateReplicationGroupMemberAction>,
2614}
2615
2616/// <p>Contains details for the restore.</p>
2617#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
2618#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
2619pub struct RestoreSummary {
2620 /// <p>Point in time or source backup time.</p>
2621 #[serde(rename = "RestoreDateTime")]
2622 pub restore_date_time: f64,
2623 /// <p>Indicates if a restore is in progress or not.</p>
2624 #[serde(rename = "RestoreInProgress")]
2625 pub restore_in_progress: bool,
2626 /// <p>The Amazon Resource Name (ARN) of the backup from which the table was restored.</p>
2627 #[serde(rename = "SourceBackupArn")]
2628 #[serde(skip_serializing_if = "Option::is_none")]
2629 pub source_backup_arn: Option<String>,
2630 /// <p>The ARN of the source table of the backup that is being restored.</p>
2631 #[serde(rename = "SourceTableArn")]
2632 #[serde(skip_serializing_if = "Option::is_none")]
2633 pub source_table_arn: Option<String>,
2634}
2635
2636#[derive(Clone, Debug, Default, PartialEq, Serialize)]
2637#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
2638pub struct RestoreTableFromBackupInput {
2639 /// <p>The Amazon Resource Name (ARN) associated with the backup.</p>
2640 #[serde(rename = "BackupArn")]
2641 pub backup_arn: String,
2642 /// <p>The billing mode of the restored table.</p>
2643 #[serde(rename = "BillingModeOverride")]
2644 #[serde(skip_serializing_if = "Option::is_none")]
2645 pub billing_mode_override: Option<String>,
2646 /// <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>
2647 #[serde(rename = "GlobalSecondaryIndexOverride")]
2648 #[serde(skip_serializing_if = "Option::is_none")]
2649 pub global_secondary_index_override: Option<Vec<GlobalSecondaryIndex>>,
2650 /// <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>
2651 #[serde(rename = "LocalSecondaryIndexOverride")]
2652 #[serde(skip_serializing_if = "Option::is_none")]
2653 pub local_secondary_index_override: Option<Vec<LocalSecondaryIndex>>,
2654 /// <p>Provisioned throughput settings for the restored table.</p>
2655 #[serde(rename = "ProvisionedThroughputOverride")]
2656 #[serde(skip_serializing_if = "Option::is_none")]
2657 pub provisioned_throughput_override: Option<ProvisionedThroughput>,
2658 /// <p>The new server-side encryption settings for the restored table.</p>
2659 #[serde(rename = "SSESpecificationOverride")]
2660 #[serde(skip_serializing_if = "Option::is_none")]
2661 pub sse_specification_override: Option<SSESpecification>,
2662 /// <p>The name of the new table to which the backup must be restored.</p>
2663 #[serde(rename = "TargetTableName")]
2664 pub target_table_name: String,
2665}
2666
2667#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
2668#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
2669pub struct RestoreTableFromBackupOutput {
2670 /// <p>The description of the table created from an existing backup.</p>
2671 #[serde(rename = "TableDescription")]
2672 #[serde(skip_serializing_if = "Option::is_none")]
2673 pub table_description: Option<TableDescription>,
2674}
2675
2676#[derive(Clone, Debug, Default, PartialEq, Serialize)]
2677#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
2678pub struct RestoreTableToPointInTimeInput {
2679 /// <p>The billing mode of the restored table.</p>
2680 #[serde(rename = "BillingModeOverride")]
2681 #[serde(skip_serializing_if = "Option::is_none")]
2682 pub billing_mode_override: Option<String>,
2683 /// <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>
2684 #[serde(rename = "GlobalSecondaryIndexOverride")]
2685 #[serde(skip_serializing_if = "Option::is_none")]
2686 pub global_secondary_index_override: Option<Vec<GlobalSecondaryIndex>>,
2687 /// <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>
2688 #[serde(rename = "LocalSecondaryIndexOverride")]
2689 #[serde(skip_serializing_if = "Option::is_none")]
2690 pub local_secondary_index_override: Option<Vec<LocalSecondaryIndex>>,
2691 /// <p>Provisioned throughput settings for the restored table.</p>
2692 #[serde(rename = "ProvisionedThroughputOverride")]
2693 #[serde(skip_serializing_if = "Option::is_none")]
2694 pub provisioned_throughput_override: Option<ProvisionedThroughput>,
2695 /// <p>Time in the past to restore the table to.</p>
2696 #[serde(rename = "RestoreDateTime")]
2697 #[serde(skip_serializing_if = "Option::is_none")]
2698 pub restore_date_time: Option<f64>,
2699 /// <p>The new server-side encryption settings for the restored table.</p>
2700 #[serde(rename = "SSESpecificationOverride")]
2701 #[serde(skip_serializing_if = "Option::is_none")]
2702 pub sse_specification_override: Option<SSESpecification>,
2703 /// <p>The DynamoDB table that will be restored. This value is an Amazon Resource Name (ARN).</p>
2704 #[serde(rename = "SourceTableArn")]
2705 #[serde(skip_serializing_if = "Option::is_none")]
2706 pub source_table_arn: Option<String>,
2707 /// <p>Name of the source table that is being restored.</p>
2708 #[serde(rename = "SourceTableName")]
2709 #[serde(skip_serializing_if = "Option::is_none")]
2710 pub source_table_name: Option<String>,
2711 /// <p>The name of the new table to which it must be restored to.</p>
2712 #[serde(rename = "TargetTableName")]
2713 pub target_table_name: String,
2714 /// <p>Restore the table to the latest possible time. <code>LatestRestorableDateTime</code> is typically 5 minutes before the current time. </p>
2715 #[serde(rename = "UseLatestRestorableTime")]
2716 #[serde(skip_serializing_if = "Option::is_none")]
2717 pub use_latest_restorable_time: Option<bool>,
2718}
2719
2720#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
2721#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
2722pub struct RestoreTableToPointInTimeOutput {
2723 /// <p>Represents the properties of a table.</p>
2724 #[serde(rename = "TableDescription")]
2725 #[serde(skip_serializing_if = "Option::is_none")]
2726 pub table_description: Option<TableDescription>,
2727}
2728
2729/// <p>The description of the server-side encryption status on the specified table.</p>
2730#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
2731#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
2732pub struct SSEDescription {
2733 /// <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>
2734 #[serde(rename = "InaccessibleEncryptionDateTime")]
2735 #[serde(skip_serializing_if = "Option::is_none")]
2736 pub inaccessible_encryption_date_time: Option<f64>,
2737 /// <p>The AWS KMS customer master key (CMK) ARN used for the AWS KMS encryption.</p>
2738 #[serde(rename = "KMSMasterKeyArn")]
2739 #[serde(skip_serializing_if = "Option::is_none")]
2740 pub kms_master_key_arn: Option<String>,
2741 /// <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>
2742 #[serde(rename = "SSEType")]
2743 #[serde(skip_serializing_if = "Option::is_none")]
2744 pub sse_type: Option<String>,
2745 /// <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>
2746 #[serde(rename = "Status")]
2747 #[serde(skip_serializing_if = "Option::is_none")]
2748 pub status: Option<String>,
2749}
2750
2751/// <p>Represents the settings used to enable server-side encryption.</p>
2752#[derive(Clone, Debug, Default, PartialEq, Serialize)]
2753#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
2754pub struct SSESpecification {
2755 /// <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>
2756 #[serde(rename = "Enabled")]
2757 #[serde(skip_serializing_if = "Option::is_none")]
2758 pub enabled: Option<bool>,
2759 /// <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>
2760 #[serde(rename = "KMSMasterKeyId")]
2761 #[serde(skip_serializing_if = "Option::is_none")]
2762 pub kms_master_key_id: Option<String>,
2763 /// <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>
2764 #[serde(rename = "SSEType")]
2765 #[serde(skip_serializing_if = "Option::is_none")]
2766 pub sse_type: Option<String>,
2767}
2768
2769/// <p>Represents the input of a <code>Scan</code> operation.</p>
2770#[derive(Clone, Debug, Default, PartialEq, Serialize)]
2771#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
2772pub struct ScanInput {
2773 /// <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>
2774 #[serde(rename = "AttributesToGet")]
2775 #[serde(skip_serializing_if = "Option::is_none")]
2776 pub attributes_to_get: Option<Vec<String>>,
2777 /// <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>
2778 #[serde(rename = "ConditionalOperator")]
2779 #[serde(skip_serializing_if = "Option::is_none")]
2780 pub conditional_operator: Option<String>,
2781 /// <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>
2782 #[serde(rename = "ConsistentRead")]
2783 #[serde(skip_serializing_if = "Option::is_none")]
2784 pub consistent_read: Option<bool>,
2785 /// <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>
2786 #[serde(rename = "ExclusiveStartKey")]
2787 #[serde(skip_serializing_if = "Option::is_none")]
2788 pub exclusive_start_key: Option<::std::collections::HashMap<String, AttributeValue>>,
2789 /// <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>
2790 #[serde(rename = "ExpressionAttributeNames")]
2791 #[serde(skip_serializing_if = "Option::is_none")]
2792 pub expression_attribute_names: Option<::std::collections::HashMap<String, String>>,
2793 /// <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>
2794 #[serde(rename = "ExpressionAttributeValues")]
2795 #[serde(skip_serializing_if = "Option::is_none")]
2796 pub expression_attribute_values: Option<::std::collections::HashMap<String, AttributeValue>>,
2797 /// <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>
2798 #[serde(rename = "FilterExpression")]
2799 #[serde(skip_serializing_if = "Option::is_none")]
2800 pub filter_expression: Option<String>,
2801 /// <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>
2802 #[serde(rename = "IndexName")]
2803 #[serde(skip_serializing_if = "Option::is_none")]
2804 pub index_name: Option<String>,
2805 /// <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>
2806 #[serde(rename = "Limit")]
2807 #[serde(skip_serializing_if = "Option::is_none")]
2808 pub limit: Option<i64>,
2809 /// <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>
2810 #[serde(rename = "ProjectionExpression")]
2811 #[serde(skip_serializing_if = "Option::is_none")]
2812 pub projection_expression: Option<String>,
2813 #[serde(rename = "ReturnConsumedCapacity")]
2814 #[serde(skip_serializing_if = "Option::is_none")]
2815 pub return_consumed_capacity: Option<String>,
2816 /// <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>
2817 #[serde(rename = "ScanFilter")]
2818 #[serde(skip_serializing_if = "Option::is_none")]
2819 pub scan_filter: Option<::std::collections::HashMap<String, Condition>>,
2820 /// <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>
2821 #[serde(rename = "Segment")]
2822 #[serde(skip_serializing_if = "Option::is_none")]
2823 pub segment: Option<i64>,
2824 /// <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>
2825 #[serde(rename = "Select")]
2826 #[serde(skip_serializing_if = "Option::is_none")]
2827 pub select: Option<String>,
2828 /// <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>
2829 #[serde(rename = "TableName")]
2830 pub table_name: String,
2831 /// <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>
2832 #[serde(rename = "TotalSegments")]
2833 #[serde(skip_serializing_if = "Option::is_none")]
2834 pub total_segments: Option<i64>,
2835}
2836
2837/// <p>Represents the output of a <code>Scan</code> operation.</p>
2838#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
2839#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
2840pub struct ScanOutput {
2841 /// <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>
2842 #[serde(rename = "ConsumedCapacity")]
2843 #[serde(skip_serializing_if = "Option::is_none")]
2844 pub consumed_capacity: Option<ConsumedCapacity>,
2845 /// <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>
2846 #[serde(rename = "Count")]
2847 #[serde(skip_serializing_if = "Option::is_none")]
2848 pub count: Option<i64>,
2849 /// <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>
2850 #[serde(rename = "Items")]
2851 #[serde(skip_serializing_if = "Option::is_none")]
2852 pub items: Option<Vec<::std::collections::HashMap<String, AttributeValue>>>,
2853 /// <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>
2854 #[serde(rename = "LastEvaluatedKey")]
2855 #[serde(skip_serializing_if = "Option::is_none")]
2856 pub last_evaluated_key: Option<::std::collections::HashMap<String, AttributeValue>>,
2857 /// <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>
2858 #[serde(rename = "ScannedCount")]
2859 #[serde(skip_serializing_if = "Option::is_none")]
2860 pub scanned_count: Option<i64>,
2861}
2862
2863/// <p>Contains the details of the table when the backup was created. </p>
2864#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
2865#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
2866pub struct SourceTableDetails {
2867 /// <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>
2868 #[serde(rename = "BillingMode")]
2869 #[serde(skip_serializing_if = "Option::is_none")]
2870 pub billing_mode: Option<String>,
2871 /// <p>Number of items in the table. Note that this is an approximate value. </p>
2872 #[serde(rename = "ItemCount")]
2873 #[serde(skip_serializing_if = "Option::is_none")]
2874 pub item_count: Option<i64>,
2875 /// <p>Schema of the table. </p>
2876 #[serde(rename = "KeySchema")]
2877 pub key_schema: Vec<KeySchemaElement>,
2878 /// <p>Read IOPs and Write IOPS on the table when the backup was created.</p>
2879 #[serde(rename = "ProvisionedThroughput")]
2880 pub provisioned_throughput: ProvisionedThroughput,
2881 /// <p>ARN of the table for which backup was created. </p>
2882 #[serde(rename = "TableArn")]
2883 #[serde(skip_serializing_if = "Option::is_none")]
2884 pub table_arn: Option<String>,
2885 /// <p>Time when the source table was created. </p>
2886 #[serde(rename = "TableCreationDateTime")]
2887 pub table_creation_date_time: f64,
2888 /// <p>Unique identifier for the table for which the backup was created. </p>
2889 #[serde(rename = "TableId")]
2890 pub table_id: String,
2891 /// <p>The name of the table for which the backup was created. </p>
2892 #[serde(rename = "TableName")]
2893 pub table_name: String,
2894 /// <p>Size of the table in bytes. Note that this is an approximate value.</p>
2895 #[serde(rename = "TableSizeBytes")]
2896 #[serde(skip_serializing_if = "Option::is_none")]
2897 pub table_size_bytes: Option<i64>,
2898}
2899
2900/// <p>Contains the details of the features enabled on the table when the backup was created. For example, LSIs, GSIs, streams, TTL. </p>
2901#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
2902#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
2903pub struct SourceTableFeatureDetails {
2904 /// <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>
2905 #[serde(rename = "GlobalSecondaryIndexes")]
2906 #[serde(skip_serializing_if = "Option::is_none")]
2907 pub global_secondary_indexes: Option<Vec<GlobalSecondaryIndexInfo>>,
2908 /// <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>
2909 #[serde(rename = "LocalSecondaryIndexes")]
2910 #[serde(skip_serializing_if = "Option::is_none")]
2911 pub local_secondary_indexes: Option<Vec<LocalSecondaryIndexInfo>>,
2912 /// <p>The description of the server-side encryption status on the table when the backup was created.</p>
2913 #[serde(rename = "SSEDescription")]
2914 #[serde(skip_serializing_if = "Option::is_none")]
2915 pub sse_description: Option<SSEDescription>,
2916 /// <p>Stream settings on the table when the backup was created.</p>
2917 #[serde(rename = "StreamDescription")]
2918 #[serde(skip_serializing_if = "Option::is_none")]
2919 pub stream_description: Option<StreamSpecification>,
2920 /// <p>Time to Live settings on the table when the backup was created.</p>
2921 #[serde(rename = "TimeToLiveDescription")]
2922 #[serde(skip_serializing_if = "Option::is_none")]
2923 pub time_to_live_description: Option<TimeToLiveDescription>,
2924}
2925
2926/// <p>Represents the DynamoDB Streams configuration for a table in DynamoDB.</p>
2927#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
2928pub struct StreamSpecification {
2929 /// <p>Indicates whether DynamoDB Streams is enabled (true) or disabled (false) on the table.</p>
2930 #[serde(rename = "StreamEnabled")]
2931 pub stream_enabled: bool,
2932 /// <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>
2933 #[serde(rename = "StreamViewType")]
2934 #[serde(skip_serializing_if = "Option::is_none")]
2935 pub stream_view_type: Option<String>,
2936}
2937
2938/// <p>Represents the auto scaling configuration for a global table.</p>
2939#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
2940#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
2941pub struct TableAutoScalingDescription {
2942 /// <p>Represents replicas of the global table.</p>
2943 #[serde(rename = "Replicas")]
2944 #[serde(skip_serializing_if = "Option::is_none")]
2945 pub replicas: Option<Vec<ReplicaAutoScalingDescription>>,
2946 /// <p>The name of the table.</p>
2947 #[serde(rename = "TableName")]
2948 #[serde(skip_serializing_if = "Option::is_none")]
2949 pub table_name: Option<String>,
2950 /// <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>
2951 #[serde(rename = "TableStatus")]
2952 #[serde(skip_serializing_if = "Option::is_none")]
2953 pub table_status: Option<String>,
2954}
2955
2956/// <p>Represents the properties of a table.</p>
2957#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
2958#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
2959pub struct TableDescription {
2960 /// <p>Contains information about the table archive.</p>
2961 #[serde(rename = "ArchivalSummary")]
2962 #[serde(skip_serializing_if = "Option::is_none")]
2963 pub archival_summary: Option<ArchivalSummary>,
2964 /// <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>
2965 #[serde(rename = "AttributeDefinitions")]
2966 #[serde(skip_serializing_if = "Option::is_none")]
2967 pub attribute_definitions: Option<Vec<AttributeDefinition>>,
2968 /// <p>Contains the details for the read/write capacity mode.</p>
2969 #[serde(rename = "BillingModeSummary")]
2970 #[serde(skip_serializing_if = "Option::is_none")]
2971 pub billing_mode_summary: Option<BillingModeSummary>,
2972 /// <p>The date and time when the table was created, in <a href="http://www.epochconverter.com/">UNIX epoch time</a> format.</p>
2973 #[serde(rename = "CreationDateTime")]
2974 #[serde(skip_serializing_if = "Option::is_none")]
2975 pub creation_date_time: Option<f64>,
2976 /// <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> - In addition to the attributes described in <code>KEYS_ONLY</code>, the secondary index will include other non-key attributes that you specify.</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>
2977 #[serde(rename = "GlobalSecondaryIndexes")]
2978 #[serde(skip_serializing_if = "Option::is_none")]
2979 pub global_secondary_indexes: Option<Vec<GlobalSecondaryIndexDescription>>,
2980 /// <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>
2981 #[serde(rename = "GlobalTableVersion")]
2982 #[serde(skip_serializing_if = "Option::is_none")]
2983 pub global_table_version: Option<String>,
2984 /// <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>
2985 #[serde(rename = "ItemCount")]
2986 #[serde(skip_serializing_if = "Option::is_none")]
2987 pub item_count: Option<i64>,
2988 /// <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>
2989 #[serde(rename = "KeySchema")]
2990 #[serde(skip_serializing_if = "Option::is_none")]
2991 pub key_schema: Option<Vec<KeySchemaElement>>,
2992 /// <p>The Amazon Resource Name (ARN) that uniquely identifies the latest stream for this table.</p>
2993 #[serde(rename = "LatestStreamArn")]
2994 #[serde(skip_serializing_if = "Option::is_none")]
2995 pub latest_stream_arn: Option<String>,
2996 /// <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>
2997 #[serde(rename = "LatestStreamLabel")]
2998 #[serde(skip_serializing_if = "Option::is_none")]
2999 pub latest_stream_label: Option<String>,
3000 /// <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>
3001 #[serde(rename = "LocalSecondaryIndexes")]
3002 #[serde(skip_serializing_if = "Option::is_none")]
3003 pub local_secondary_indexes: Option<Vec<LocalSecondaryIndexDescription>>,
3004 /// <p>The provisioned throughput settings for the table, consisting of read and write capacity units, along with data about increases and decreases.</p>
3005 #[serde(rename = "ProvisionedThroughput")]
3006 #[serde(skip_serializing_if = "Option::is_none")]
3007 pub provisioned_throughput: Option<ProvisionedThroughputDescription>,
3008 /// <p>Represents replicas of the table.</p>
3009 #[serde(rename = "Replicas")]
3010 #[serde(skip_serializing_if = "Option::is_none")]
3011 pub replicas: Option<Vec<ReplicaDescription>>,
3012 /// <p>Contains details for the restore.</p>
3013 #[serde(rename = "RestoreSummary")]
3014 #[serde(skip_serializing_if = "Option::is_none")]
3015 pub restore_summary: Option<RestoreSummary>,
3016 /// <p>The description of the server-side encryption status on the specified table.</p>
3017 #[serde(rename = "SSEDescription")]
3018 #[serde(skip_serializing_if = "Option::is_none")]
3019 pub sse_description: Option<SSEDescription>,
3020 /// <p>The current DynamoDB Streams configuration for the table.</p>
3021 #[serde(rename = "StreamSpecification")]
3022 #[serde(skip_serializing_if = "Option::is_none")]
3023 pub stream_specification: Option<StreamSpecification>,
3024 /// <p>The Amazon Resource Name (ARN) that uniquely identifies the table.</p>
3025 #[serde(rename = "TableArn")]
3026 #[serde(skip_serializing_if = "Option::is_none")]
3027 pub table_arn: Option<String>,
3028 /// <p>Unique identifier for the table for which the backup was created. </p>
3029 #[serde(rename = "TableId")]
3030 #[serde(skip_serializing_if = "Option::is_none")]
3031 pub table_id: Option<String>,
3032 /// <p>The name of the table.</p>
3033 #[serde(rename = "TableName")]
3034 #[serde(skip_serializing_if = "Option::is_none")]
3035 pub table_name: Option<String>,
3036 /// <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>
3037 #[serde(rename = "TableSizeBytes")]
3038 #[serde(skip_serializing_if = "Option::is_none")]
3039 pub table_size_bytes: Option<i64>,
3040 /// <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>
3041 #[serde(rename = "TableStatus")]
3042 #[serde(skip_serializing_if = "Option::is_none")]
3043 pub table_status: Option<String>,
3044}
3045
3046/// <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>
3047#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
3048pub struct Tag {
3049 /// <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>
3050 #[serde(rename = "Key")]
3051 pub key: String,
3052 /// <p>The value of the tag. Tag values are case-sensitive and can be null.</p>
3053 #[serde(rename = "Value")]
3054 pub value: String,
3055}
3056
3057#[derive(Clone, Debug, Default, PartialEq, Serialize)]
3058#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
3059pub struct TagResourceInput {
3060 /// <p>Identifies the Amazon DynamoDB resource to which tags should be added. This value is an Amazon Resource Name (ARN).</p>
3061 #[serde(rename = "ResourceArn")]
3062 pub resource_arn: String,
3063 /// <p>The tags to be assigned to the Amazon DynamoDB resource.</p>
3064 #[serde(rename = "Tags")]
3065 pub tags: Vec<Tag>,
3066}
3067
3068/// <p>The description of the Time to Live (TTL) status on the specified table. </p>
3069#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
3070#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
3071pub struct TimeToLiveDescription {
3072 /// <p> The name of the TTL attribute for items in the table.</p>
3073 #[serde(rename = "AttributeName")]
3074 #[serde(skip_serializing_if = "Option::is_none")]
3075 pub attribute_name: Option<String>,
3076 /// <p> The TTL status for the table.</p>
3077 #[serde(rename = "TimeToLiveStatus")]
3078 #[serde(skip_serializing_if = "Option::is_none")]
3079 pub time_to_live_status: Option<String>,
3080}
3081
3082/// <p>Represents the settings used to enable or disable Time to Live (TTL) for the specified table.</p>
3083#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
3084pub struct TimeToLiveSpecification {
3085 /// <p>The name of the TTL attribute used to store the expiration time for items in the table.</p>
3086 #[serde(rename = "AttributeName")]
3087 pub attribute_name: String,
3088 /// <p>Indicates whether TTL is to be enabled (true) or disabled (false) on the table.</p>
3089 #[serde(rename = "Enabled")]
3090 pub enabled: bool,
3091}
3092
3093/// <p>Specifies an item to be retrieved as part of the transaction.</p>
3094#[derive(Clone, Debug, Default, PartialEq, Serialize)]
3095#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
3096pub struct TransactGetItem {
3097 /// <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>
3098 #[serde(rename = "Get")]
3099 pub get: Get,
3100}
3101
3102#[derive(Clone, Debug, Default, PartialEq, Serialize)]
3103#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
3104pub struct TransactGetItemsInput {
3105 /// <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>
3106 #[serde(rename = "ReturnConsumedCapacity")]
3107 #[serde(skip_serializing_if = "Option::is_none")]
3108 pub return_consumed_capacity: Option<String>,
3109 /// <p>An ordered array of up to 25 <code>TransactGetItem</code> objects, each of which contains a <code>Get</code> structure.</p>
3110 #[serde(rename = "TransactItems")]
3111 pub transact_items: Vec<TransactGetItem>,
3112}
3113
3114#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
3115#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
3116pub struct TransactGetItemsOutput {
3117 /// <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>
3118 #[serde(rename = "ConsumedCapacity")]
3119 #[serde(skip_serializing_if = "Option::is_none")]
3120 pub consumed_capacity: Option<Vec<ConsumedCapacity>>,
3121 /// <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>
3122 #[serde(rename = "Responses")]
3123 #[serde(skip_serializing_if = "Option::is_none")]
3124 pub responses: Option<Vec<ItemResponse>>,
3125}
3126
3127/// <p>A list of requests that can perform update, put, delete, or check operations on multiple items in one or more tables atomically.</p>
3128#[derive(Clone, Debug, Default, PartialEq, Serialize)]
3129#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
3130pub struct TransactWriteItem {
3131 /// <p>A request to perform a check item operation.</p>
3132 #[serde(rename = "ConditionCheck")]
3133 #[serde(skip_serializing_if = "Option::is_none")]
3134 pub condition_check: Option<ConditionCheck>,
3135 /// <p>A request to perform a <code>DeleteItem</code> operation.</p>
3136 #[serde(rename = "Delete")]
3137 #[serde(skip_serializing_if = "Option::is_none")]
3138 pub delete: Option<Delete>,
3139 /// <p>A request to perform a <code>PutItem</code> operation.</p>
3140 #[serde(rename = "Put")]
3141 #[serde(skip_serializing_if = "Option::is_none")]
3142 pub put: Option<Put>,
3143 /// <p>A request to perform an <code>UpdateItem</code> operation.</p>
3144 #[serde(rename = "Update")]
3145 #[serde(skip_serializing_if = "Option::is_none")]
3146 pub update: Option<Update>,
3147}
3148
3149#[derive(Clone, Debug, Default, PartialEq, Serialize)]
3150#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
3151pub struct TransactWriteItemsInput {
3152 /// <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>
3153 #[serde(rename = "ClientRequestToken")]
3154 #[serde(skip_serializing_if = "Option::is_none")]
3155 pub client_request_token: Option<String>,
3156 #[serde(rename = "ReturnConsumedCapacity")]
3157 #[serde(skip_serializing_if = "Option::is_none")]
3158 pub return_consumed_capacity: Option<String>,
3159 /// <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>
3160 #[serde(rename = "ReturnItemCollectionMetrics")]
3161 #[serde(skip_serializing_if = "Option::is_none")]
3162 pub return_item_collection_metrics: Option<String>,
3163 /// <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>
3164 #[serde(rename = "TransactItems")]
3165 pub transact_items: Vec<TransactWriteItem>,
3166}
3167
3168#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
3169#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
3170pub struct TransactWriteItemsOutput {
3171 /// <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>
3172 #[serde(rename = "ConsumedCapacity")]
3173 #[serde(skip_serializing_if = "Option::is_none")]
3174 pub consumed_capacity: Option<Vec<ConsumedCapacity>>,
3175 /// <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>
3176 #[serde(rename = "ItemCollectionMetrics")]
3177 #[serde(skip_serializing_if = "Option::is_none")]
3178 pub item_collection_metrics:
3179 Option<::std::collections::HashMap<String, Vec<ItemCollectionMetrics>>>,
3180}
3181
3182#[derive(Clone, Debug, Default, PartialEq, Serialize)]
3183#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
3184pub struct UntagResourceInput {
3185 /// <p>The DynamoDB resource that the tags will be removed from. This value is an Amazon Resource Name (ARN).</p>
3186 #[serde(rename = "ResourceArn")]
3187 pub resource_arn: String,
3188 /// <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>
3189 #[serde(rename = "TagKeys")]
3190 pub tag_keys: Vec<String>,
3191}
3192
3193/// <p>Represents a request to perform an <code>UpdateItem</code> operation.</p>
3194#[derive(Clone, Debug, Default, PartialEq, Serialize)]
3195#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
3196pub struct Update {
3197 /// <p>A condition that must be satisfied in order for a conditional update to succeed.</p>
3198 #[serde(rename = "ConditionExpression")]
3199 #[serde(skip_serializing_if = "Option::is_none")]
3200 pub condition_expression: Option<String>,
3201 /// <p>One or more substitution tokens for attribute names in an expression.</p>
3202 #[serde(rename = "ExpressionAttributeNames")]
3203 #[serde(skip_serializing_if = "Option::is_none")]
3204 pub expression_attribute_names: Option<::std::collections::HashMap<String, String>>,
3205 /// <p>One or more values that can be substituted in an expression.</p>
3206 #[serde(rename = "ExpressionAttributeValues")]
3207 #[serde(skip_serializing_if = "Option::is_none")]
3208 pub expression_attribute_values: Option<::std::collections::HashMap<String, AttributeValue>>,
3209 /// <p>The primary key of the item to be updated. Each element consists of an attribute name and a value for that attribute.</p>
3210 #[serde(rename = "Key")]
3211 pub key: ::std::collections::HashMap<String, AttributeValue>,
3212 /// <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>
3213 #[serde(rename = "ReturnValuesOnConditionCheckFailure")]
3214 #[serde(skip_serializing_if = "Option::is_none")]
3215 pub return_values_on_condition_check_failure: Option<String>,
3216 /// <p>Name of the table for the <code>UpdateItem</code> request.</p>
3217 #[serde(rename = "TableName")]
3218 pub table_name: String,
3219 /// <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>
3220 #[serde(rename = "UpdateExpression")]
3221 pub update_expression: String,
3222}
3223
3224#[derive(Clone, Debug, Default, PartialEq, Serialize)]
3225#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
3226pub struct UpdateContinuousBackupsInput {
3227 /// <p>Represents the settings used to enable point in time recovery.</p>
3228 #[serde(rename = "PointInTimeRecoverySpecification")]
3229 pub point_in_time_recovery_specification: PointInTimeRecoverySpecification,
3230 /// <p>The name of the table.</p>
3231 #[serde(rename = "TableName")]
3232 pub table_name: String,
3233}
3234
3235#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
3236#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
3237pub struct UpdateContinuousBackupsOutput {
3238 /// <p>Represents the continuous backups and point in time recovery settings on the table.</p>
3239 #[serde(rename = "ContinuousBackupsDescription")]
3240 #[serde(skip_serializing_if = "Option::is_none")]
3241 pub continuous_backups_description: Option<ContinuousBackupsDescription>,
3242}
3243
3244#[derive(Clone, Debug, Default, PartialEq, Serialize)]
3245#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
3246pub struct UpdateContributorInsightsInput {
3247 /// <p>Represents the contributor insights action.</p>
3248 #[serde(rename = "ContributorInsightsAction")]
3249 pub contributor_insights_action: String,
3250 /// <p>The global secondary index name, if applicable.</p>
3251 #[serde(rename = "IndexName")]
3252 #[serde(skip_serializing_if = "Option::is_none")]
3253 pub index_name: Option<String>,
3254 /// <p>The name of the table.</p>
3255 #[serde(rename = "TableName")]
3256 pub table_name: String,
3257}
3258
3259#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
3260#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
3261pub struct UpdateContributorInsightsOutput {
3262 /// <p>The status of contributor insights</p>
3263 #[serde(rename = "ContributorInsightsStatus")]
3264 #[serde(skip_serializing_if = "Option::is_none")]
3265 pub contributor_insights_status: Option<String>,
3266 /// <p>The name of the global secondary index, if applicable.</p>
3267 #[serde(rename = "IndexName")]
3268 #[serde(skip_serializing_if = "Option::is_none")]
3269 pub index_name: Option<String>,
3270 /// <p>The name of the table.</p>
3271 #[serde(rename = "TableName")]
3272 #[serde(skip_serializing_if = "Option::is_none")]
3273 pub table_name: Option<String>,
3274}
3275
3276/// <p>Represents the new provisioned throughput settings to be applied to a global secondary index.</p>
3277#[derive(Clone, Debug, Default, PartialEq, Serialize)]
3278#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
3279pub struct UpdateGlobalSecondaryIndexAction {
3280 /// <p>The name of the global secondary index to be updated.</p>
3281 #[serde(rename = "IndexName")]
3282 pub index_name: String,
3283 /// <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">Service, Account, and Table Quotas</a> in the <i>Amazon DynamoDB Developer Guide</i>.</p>
3284 #[serde(rename = "ProvisionedThroughput")]
3285 pub provisioned_throughput: ProvisionedThroughput,
3286}
3287
3288#[derive(Clone, Debug, Default, PartialEq, Serialize)]
3289#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
3290pub struct UpdateGlobalTableInput {
3291 /// <p>The global table name.</p>
3292 #[serde(rename = "GlobalTableName")]
3293 pub global_table_name: String,
3294 /// <p>A list of Regions that should be added or removed from the global table.</p>
3295 #[serde(rename = "ReplicaUpdates")]
3296 pub replica_updates: Vec<ReplicaUpdate>,
3297}
3298
3299#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
3300#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
3301pub struct UpdateGlobalTableOutput {
3302 /// <p>Contains the details of the global table.</p>
3303 #[serde(rename = "GlobalTableDescription")]
3304 #[serde(skip_serializing_if = "Option::is_none")]
3305 pub global_table_description: Option<GlobalTableDescription>,
3306}
3307
3308#[derive(Clone, Debug, Default, PartialEq, Serialize)]
3309#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
3310pub struct UpdateGlobalTableSettingsInput {
3311 /// <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>
3312 #[serde(rename = "GlobalTableBillingMode")]
3313 #[serde(skip_serializing_if = "Option::is_none")]
3314 pub global_table_billing_mode: Option<String>,
3315 /// <p>Represents the settings of a global secondary index for a global table that will be modified.</p>
3316 #[serde(rename = "GlobalTableGlobalSecondaryIndexSettingsUpdate")]
3317 #[serde(skip_serializing_if = "Option::is_none")]
3318 pub global_table_global_secondary_index_settings_update:
3319 Option<Vec<GlobalTableGlobalSecondaryIndexSettingsUpdate>>,
3320 /// <p>The name of the global table</p>
3321 #[serde(rename = "GlobalTableName")]
3322 pub global_table_name: String,
3323 /// <p>Auto scaling settings for managing provisioned write capacity for the global table.</p>
3324 #[serde(rename = "GlobalTableProvisionedWriteCapacityAutoScalingSettingsUpdate")]
3325 #[serde(skip_serializing_if = "Option::is_none")]
3326 pub global_table_provisioned_write_capacity_auto_scaling_settings_update:
3327 Option<AutoScalingSettingsUpdate>,
3328 /// <p>The maximum number of writes consumed per second before DynamoDB returns a <code>ThrottlingException.</code> </p>
3329 #[serde(rename = "GlobalTableProvisionedWriteCapacityUnits")]
3330 #[serde(skip_serializing_if = "Option::is_none")]
3331 pub global_table_provisioned_write_capacity_units: Option<i64>,
3332 /// <p>Represents the settings for a global table in a Region that will be modified.</p>
3333 #[serde(rename = "ReplicaSettingsUpdate")]
3334 #[serde(skip_serializing_if = "Option::is_none")]
3335 pub replica_settings_update: Option<Vec<ReplicaSettingsUpdate>>,
3336}
3337
3338#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
3339#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
3340pub struct UpdateGlobalTableSettingsOutput {
3341 /// <p>The name of the global table.</p>
3342 #[serde(rename = "GlobalTableName")]
3343 #[serde(skip_serializing_if = "Option::is_none")]
3344 pub global_table_name: Option<String>,
3345 /// <p>The Region-specific settings for the global table.</p>
3346 #[serde(rename = "ReplicaSettings")]
3347 #[serde(skip_serializing_if = "Option::is_none")]
3348 pub replica_settings: Option<Vec<ReplicaSettingsDescription>>,
3349}
3350
3351/// <p>Represents the input of an <code>UpdateItem</code> operation.</p>
3352#[derive(Clone, Debug, Default, PartialEq, Serialize)]
3353#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
3354pub struct UpdateItemInput {
3355 /// <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>
3356 #[serde(rename = "AttributeUpdates")]
3357 #[serde(skip_serializing_if = "Option::is_none")]
3358 pub attribute_updates: Option<::std::collections::HashMap<String, AttributeValueUpdate>>,
3359 /// <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>
3360 #[serde(rename = "ConditionExpression")]
3361 #[serde(skip_serializing_if = "Option::is_none")]
3362 pub condition_expression: Option<String>,
3363 /// <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>
3364 #[serde(rename = "ConditionalOperator")]
3365 #[serde(skip_serializing_if = "Option::is_none")]
3366 pub conditional_operator: Option<String>,
3367 /// <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>
3368 #[serde(rename = "Expected")]
3369 #[serde(skip_serializing_if = "Option::is_none")]
3370 pub expected: Option<::std::collections::HashMap<String, ExpectedAttributeValue>>,
3371 /// <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>
3372 #[serde(rename = "ExpressionAttributeNames")]
3373 #[serde(skip_serializing_if = "Option::is_none")]
3374 pub expression_attribute_names: Option<::std::collections::HashMap<String, String>>,
3375 /// <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>
3376 #[serde(rename = "ExpressionAttributeValues")]
3377 #[serde(skip_serializing_if = "Option::is_none")]
3378 pub expression_attribute_values: Option<::std::collections::HashMap<String, AttributeValue>>,
3379 /// <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>
3380 #[serde(rename = "Key")]
3381 pub key: ::std::collections::HashMap<String, AttributeValue>,
3382 #[serde(rename = "ReturnConsumedCapacity")]
3383 #[serde(skip_serializing_if = "Option::is_none")]
3384 pub return_consumed_capacity: Option<String>,
3385 /// <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>
3386 #[serde(rename = "ReturnItemCollectionMetrics")]
3387 #[serde(skip_serializing_if = "Option::is_none")]
3388 pub return_item_collection_metrics: Option<String>,
3389 /// <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>
3390 #[serde(rename = "ReturnValues")]
3391 #[serde(skip_serializing_if = "Option::is_none")]
3392 pub return_values: Option<String>,
3393 /// <p>The name of the table containing the item to update.</p>
3394 #[serde(rename = "TableName")]
3395 pub table_name: String,
3396 /// <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>
3397 #[serde(rename = "UpdateExpression")]
3398 #[serde(skip_serializing_if = "Option::is_none")]
3399 pub update_expression: Option<String>,
3400}
3401
3402/// <p>Represents the output of an <code>UpdateItem</code> operation.</p>
3403#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
3404#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
3405pub struct UpdateItemOutput {
3406 /// <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>
3407 #[serde(rename = "Attributes")]
3408 #[serde(skip_serializing_if = "Option::is_none")]
3409 pub attributes: Option<::std::collections::HashMap<String, AttributeValue>>,
3410 /// <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>
3411 #[serde(rename = "ConsumedCapacity")]
3412 #[serde(skip_serializing_if = "Option::is_none")]
3413 pub consumed_capacity: Option<ConsumedCapacity>,
3414 /// <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>
3415 #[serde(rename = "ItemCollectionMetrics")]
3416 #[serde(skip_serializing_if = "Option::is_none")]
3417 pub item_collection_metrics: Option<ItemCollectionMetrics>,
3418}
3419
3420/// <p>Represents a replica to be modified.</p>
3421#[derive(Clone, Debug, Default, PartialEq, Serialize)]
3422#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
3423pub struct UpdateReplicationGroupMemberAction {
3424 /// <p>Replica-specific global secondary index settings.</p>
3425 #[serde(rename = "GlobalSecondaryIndexes")]
3426 #[serde(skip_serializing_if = "Option::is_none")]
3427 pub global_secondary_indexes: Option<Vec<ReplicaGlobalSecondaryIndex>>,
3428 /// <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>
3429 #[serde(rename = "KMSMasterKeyId")]
3430 #[serde(skip_serializing_if = "Option::is_none")]
3431 pub kms_master_key_id: Option<String>,
3432 /// <p>Replica-specific provisioned throughput. If not specified, uses the source table's provisioned throughput settings.</p>
3433 #[serde(rename = "ProvisionedThroughputOverride")]
3434 #[serde(skip_serializing_if = "Option::is_none")]
3435 pub provisioned_throughput_override: Option<ProvisionedThroughputOverride>,
3436 /// <p>The Region where the replica exists.</p>
3437 #[serde(rename = "RegionName")]
3438 pub region_name: String,
3439}
3440
3441/// <p>Represents the input of an <code>UpdateTable</code> operation.</p>
3442#[derive(Clone, Debug, Default, PartialEq, Serialize)]
3443#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
3444pub struct UpdateTableInput {
3445 /// <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>
3446 #[serde(rename = "AttributeDefinitions")]
3447 #[serde(skip_serializing_if = "Option::is_none")]
3448 pub attribute_definitions: Option<Vec<AttributeDefinition>>,
3449 /// <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>
3450 #[serde(rename = "BillingMode")]
3451 #[serde(skip_serializing_if = "Option::is_none")]
3452 pub billing_mode: Option<String>,
3453 /// <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>
3454 #[serde(rename = "GlobalSecondaryIndexUpdates")]
3455 #[serde(skip_serializing_if = "Option::is_none")]
3456 pub global_secondary_index_updates: Option<Vec<GlobalSecondaryIndexUpdate>>,
3457 /// <p>The new provisioned throughput settings for the specified table or index.</p>
3458 #[serde(rename = "ProvisionedThroughput")]
3459 #[serde(skip_serializing_if = "Option::is_none")]
3460 pub provisioned_throughput: Option<ProvisionedThroughput>,
3461 /// <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>
3462 #[serde(rename = "ReplicaUpdates")]
3463 #[serde(skip_serializing_if = "Option::is_none")]
3464 pub replica_updates: Option<Vec<ReplicationGroupUpdate>>,
3465 /// <p>The new server-side encryption settings for the specified table.</p>
3466 #[serde(rename = "SSESpecification")]
3467 #[serde(skip_serializing_if = "Option::is_none")]
3468 pub sse_specification: Option<SSESpecification>,
3469 /// <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>
3470 #[serde(rename = "StreamSpecification")]
3471 #[serde(skip_serializing_if = "Option::is_none")]
3472 pub stream_specification: Option<StreamSpecification>,
3473 /// <p>The name of the table to be updated.</p>
3474 #[serde(rename = "TableName")]
3475 pub table_name: String,
3476}
3477
3478/// <p>Represents the output of an <code>UpdateTable</code> operation.</p>
3479#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
3480#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
3481pub struct UpdateTableOutput {
3482 /// <p>Represents the properties of the table.</p>
3483 #[serde(rename = "TableDescription")]
3484 #[serde(skip_serializing_if = "Option::is_none")]
3485 pub table_description: Option<TableDescription>,
3486}
3487
3488#[derive(Clone, Debug, Default, PartialEq, Serialize)]
3489#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
3490pub struct UpdateTableReplicaAutoScalingInput {
3491 /// <p>Represents the auto scaling settings of the global secondary indexes of the replica to be updated.</p>
3492 #[serde(rename = "GlobalSecondaryIndexUpdates")]
3493 #[serde(skip_serializing_if = "Option::is_none")]
3494 pub global_secondary_index_updates: Option<Vec<GlobalSecondaryIndexAutoScalingUpdate>>,
3495 #[serde(rename = "ProvisionedWriteCapacityAutoScalingUpdate")]
3496 #[serde(skip_serializing_if = "Option::is_none")]
3497 pub provisioned_write_capacity_auto_scaling_update: Option<AutoScalingSettingsUpdate>,
3498 /// <p>Represents the auto scaling settings of replicas of the table that will be modified.</p>
3499 #[serde(rename = "ReplicaUpdates")]
3500 #[serde(skip_serializing_if = "Option::is_none")]
3501 pub replica_updates: Option<Vec<ReplicaAutoScalingUpdate>>,
3502 /// <p>The name of the global table to be updated.</p>
3503 #[serde(rename = "TableName")]
3504 pub table_name: String,
3505}
3506
3507#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
3508#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
3509pub struct UpdateTableReplicaAutoScalingOutput {
3510 /// <p>Returns information about the auto scaling settings of a table with replicas.</p>
3511 #[serde(rename = "TableAutoScalingDescription")]
3512 #[serde(skip_serializing_if = "Option::is_none")]
3513 pub table_auto_scaling_description: Option<TableAutoScalingDescription>,
3514}
3515
3516/// <p>Represents the input of an <code>UpdateTimeToLive</code> operation.</p>
3517#[derive(Clone, Debug, Default, PartialEq, Serialize)]
3518#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
3519pub struct UpdateTimeToLiveInput {
3520 /// <p>The name of the table to be configured.</p>
3521 #[serde(rename = "TableName")]
3522 pub table_name: String,
3523 /// <p>Represents the settings used to enable or disable Time to Live for the specified table.</p>
3524 #[serde(rename = "TimeToLiveSpecification")]
3525 pub time_to_live_specification: TimeToLiveSpecification,
3526}
3527
3528#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
3529#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
3530pub struct UpdateTimeToLiveOutput {
3531 /// <p>Represents the output of an <code>UpdateTimeToLive</code> operation.</p>
3532 #[serde(rename = "TimeToLiveSpecification")]
3533 #[serde(skip_serializing_if = "Option::is_none")]
3534 pub time_to_live_specification: Option<TimeToLiveSpecification>,
3535}
3536
3537/// <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>
3538#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
3539pub struct WriteRequest {
3540 /// <p>A request to perform a <code>DeleteItem</code> operation.</p>
3541 #[serde(rename = "DeleteRequest")]
3542 #[serde(skip_serializing_if = "Option::is_none")]
3543 pub delete_request: Option<DeleteRequest>,
3544 /// <p>A request to perform a <code>PutItem</code> operation.</p>
3545 #[serde(rename = "PutRequest")]
3546 #[serde(skip_serializing_if = "Option::is_none")]
3547 pub put_request: Option<PutRequest>,
3548}
3549
3550/// Errors returned by BatchExecuteStatement
3551#[derive(Debug, PartialEq)]
3552pub enum BatchExecuteStatementError {
3553 /// <p>An error occurred on the server side.</p>
3554 InternalServerError(String),
3555 /// <p>Throughput exceeds the current throughput quota for your account. Please contact AWS Support at <a href="https://aws.amazon.com/support">AWS Support</a> to request a quota increase.</p>
3556 RequestLimitExceeded(String),
3557}
3558
3559impl BatchExecuteStatementError {
3560 pub fn from_response(res: BufferedHttpResponse) -> RusotoError<BatchExecuteStatementError> {
3561 if let Some(err) = proto::json::Error::parse(&res) {
3562 match err.typ.as_str() {
3563 "InternalServerError" => {
3564 return RusotoError::Service(BatchExecuteStatementError::InternalServerError(
3565 err.msg,
3566 ))
3567 }
3568 "RequestLimitExceeded" => {
3569 return RusotoError::Service(BatchExecuteStatementError::RequestLimitExceeded(
3570 err.msg,
3571 ))
3572 }
3573 "ValidationException" => return RusotoError::Validation(err.msg),
3574 _ => {}
3575 }
3576 }
3577 RusotoError::Unknown(res)
3578 }
3579}
3580impl fmt::Display for BatchExecuteStatementError {
3581 #[allow(unused_variables)]
3582 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
3583 match *self {
3584 BatchExecuteStatementError::InternalServerError(ref cause) => write!(f, "{}", cause),
3585 BatchExecuteStatementError::RequestLimitExceeded(ref cause) => write!(f, "{}", cause),
3586 }
3587 }
3588}
3589impl Error for BatchExecuteStatementError {}
3590/// Errors returned by BatchGetItem
3591#[derive(Debug, PartialEq)]
3592pub enum BatchGetItemError {
3593 /// <p>An error occurred on the server side.</p>
3594 InternalServerError(String),
3595 /// <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>
3596 ProvisionedThroughputExceeded(String),
3597 /// <p>Throughput exceeds the current throughput quota for your account. Please contact AWS Support at <a href="https://aws.amazon.com/support">AWS Support</a> to request a quota increase.</p>
3598 RequestLimitExceeded(String),
3599 /// <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>
3600 ResourceNotFound(String),
3601}
3602
3603impl BatchGetItemError {
3604 pub fn from_response(res: BufferedHttpResponse) -> RusotoError<BatchGetItemError> {
3605 if let Some(err) = proto::json::Error::parse(&res) {
3606 match err.typ.as_str() {
3607 "InternalServerError" => {
3608 return RusotoError::Service(BatchGetItemError::InternalServerError(err.msg))
3609 }
3610 "ProvisionedThroughputExceededException" => {
3611 return RusotoError::Service(BatchGetItemError::ProvisionedThroughputExceeded(
3612 err.msg,
3613 ))
3614 }
3615 "RequestLimitExceeded" => {
3616 return RusotoError::Service(BatchGetItemError::RequestLimitExceeded(err.msg))
3617 }
3618 "ResourceNotFoundException" => {
3619 return RusotoError::Service(BatchGetItemError::ResourceNotFound(err.msg))
3620 }
3621 "ValidationException" => return RusotoError::Validation(err.msg),
3622 _ => {}
3623 }
3624 }
3625 RusotoError::Unknown(res)
3626 }
3627}
3628impl fmt::Display for BatchGetItemError {
3629 #[allow(unused_variables)]
3630 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
3631 match *self {
3632 BatchGetItemError::InternalServerError(ref cause) => write!(f, "{}", cause),
3633 BatchGetItemError::ProvisionedThroughputExceeded(ref cause) => write!(f, "{}", cause),
3634 BatchGetItemError::RequestLimitExceeded(ref cause) => write!(f, "{}", cause),
3635 BatchGetItemError::ResourceNotFound(ref cause) => write!(f, "{}", cause),
3636 }
3637 }
3638}
3639impl Error for BatchGetItemError {}
3640/// Errors returned by BatchWriteItem
3641#[derive(Debug, PartialEq)]
3642pub enum BatchWriteItemError {
3643 /// <p>An error occurred on the server side.</p>
3644 InternalServerError(String),
3645 /// <p>An item collection is too large. This exception is only returned for tables that have one or more local secondary indexes.</p>
3646 ItemCollectionSizeLimitExceeded(String),
3647 /// <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>
3648 ProvisionedThroughputExceeded(String),
3649 /// <p>Throughput exceeds the current throughput quota for your account. Please contact AWS Support at <a href="https://aws.amazon.com/support">AWS Support</a> to request a quota increase.</p>
3650 RequestLimitExceeded(String),
3651 /// <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>
3652 ResourceNotFound(String),
3653}
3654
3655impl BatchWriteItemError {
3656 pub fn from_response(res: BufferedHttpResponse) -> RusotoError<BatchWriteItemError> {
3657 if let Some(err) = proto::json::Error::parse(&res) {
3658 match err.typ.as_str() {
3659 "InternalServerError" => {
3660 return RusotoError::Service(BatchWriteItemError::InternalServerError(err.msg))
3661 }
3662 "ItemCollectionSizeLimitExceededException" => {
3663 return RusotoError::Service(
3664 BatchWriteItemError::ItemCollectionSizeLimitExceeded(err.msg),
3665 )
3666 }
3667 "ProvisionedThroughputExceededException" => {
3668 return RusotoError::Service(
3669 BatchWriteItemError::ProvisionedThroughputExceeded(err.msg),
3670 )
3671 }
3672 "RequestLimitExceeded" => {
3673 return RusotoError::Service(BatchWriteItemError::RequestLimitExceeded(err.msg))
3674 }
3675 "ResourceNotFoundException" => {
3676 return RusotoError::Service(BatchWriteItemError::ResourceNotFound(err.msg))
3677 }
3678 "ValidationException" => return RusotoError::Validation(err.msg),
3679 _ => {}
3680 }
3681 }
3682 RusotoError::Unknown(res)
3683 }
3684}
3685impl fmt::Display for BatchWriteItemError {
3686 #[allow(unused_variables)]
3687 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
3688 match *self {
3689 BatchWriteItemError::InternalServerError(ref cause) => write!(f, "{}", cause),
3690 BatchWriteItemError::ItemCollectionSizeLimitExceeded(ref cause) => {
3691 write!(f, "{}", cause)
3692 }
3693 BatchWriteItemError::ProvisionedThroughputExceeded(ref cause) => write!(f, "{}", cause),
3694 BatchWriteItemError::RequestLimitExceeded(ref cause) => write!(f, "{}", cause),
3695 BatchWriteItemError::ResourceNotFound(ref cause) => write!(f, "{}", cause),
3696 }
3697 }
3698}
3699impl Error for BatchWriteItemError {}
3700/// Errors returned by CreateBackup
3701#[derive(Debug, PartialEq)]
3702pub enum CreateBackupError {
3703 /// <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>
3704 BackupInUse(String),
3705 /// <p>Backups have not yet been enabled for this table.</p>
3706 ContinuousBackupsUnavailable(String),
3707 /// <p>An error occurred on the server side.</p>
3708 InternalServerError(String),
3709 /// <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 quota of 256 tables.</p>
3710 LimitExceeded(String),
3711 /// <p>A target table with the specified name is either being created or deleted. </p>
3712 TableInUse(String),
3713 /// <p>A source table with the name <code>TableName</code> does not currently exist within the subscriber's account.</p>
3714 TableNotFound(String),
3715}
3716
3717impl CreateBackupError {
3718 pub fn from_response(res: BufferedHttpResponse) -> RusotoError<CreateBackupError> {
3719 if let Some(err) = proto::json::Error::parse(&res) {
3720 match err.typ.as_str() {
3721 "BackupInUseException" => {
3722 return RusotoError::Service(CreateBackupError::BackupInUse(err.msg))
3723 }
3724 "ContinuousBackupsUnavailableException" => {
3725 return RusotoError::Service(CreateBackupError::ContinuousBackupsUnavailable(
3726 err.msg,
3727 ))
3728 }
3729 "InternalServerError" => {
3730 return RusotoError::Service(CreateBackupError::InternalServerError(err.msg))
3731 }
3732 "LimitExceededException" => {
3733 return RusotoError::Service(CreateBackupError::LimitExceeded(err.msg))
3734 }
3735 "TableInUseException" => {
3736 return RusotoError::Service(CreateBackupError::TableInUse(err.msg))
3737 }
3738 "TableNotFoundException" => {
3739 return RusotoError::Service(CreateBackupError::TableNotFound(err.msg))
3740 }
3741 "ValidationException" => return RusotoError::Validation(err.msg),
3742 _ => {}
3743 }
3744 }
3745 RusotoError::Unknown(res)
3746 }
3747}
3748impl fmt::Display for CreateBackupError {
3749 #[allow(unused_variables)]
3750 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
3751 match *self {
3752 CreateBackupError::BackupInUse(ref cause) => write!(f, "{}", cause),
3753 CreateBackupError::ContinuousBackupsUnavailable(ref cause) => write!(f, "{}", cause),
3754 CreateBackupError::InternalServerError(ref cause) => write!(f, "{}", cause),
3755 CreateBackupError::LimitExceeded(ref cause) => write!(f, "{}", cause),
3756 CreateBackupError::TableInUse(ref cause) => write!(f, "{}", cause),
3757 CreateBackupError::TableNotFound(ref cause) => write!(f, "{}", cause),
3758 }
3759 }
3760}
3761impl Error for CreateBackupError {}
3762/// Errors returned by CreateGlobalTable
3763#[derive(Debug, PartialEq)]
3764pub enum CreateGlobalTableError {
3765 /// <p>The specified global table already exists.</p>
3766 GlobalTableAlreadyExists(String),
3767 /// <p>An error occurred on the server side.</p>
3768 InternalServerError(String),
3769 /// <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 quota of 256 tables.</p>
3770 LimitExceeded(String),
3771 /// <p>A source table with the name <code>TableName</code> does not currently exist within the subscriber's account.</p>
3772 TableNotFound(String),
3773}
3774
3775impl CreateGlobalTableError {
3776 pub fn from_response(res: BufferedHttpResponse) -> RusotoError<CreateGlobalTableError> {
3777 if let Some(err) = proto::json::Error::parse(&res) {
3778 match err.typ.as_str() {
3779 "GlobalTableAlreadyExistsException" => {
3780 return RusotoError::Service(CreateGlobalTableError::GlobalTableAlreadyExists(
3781 err.msg,
3782 ))
3783 }
3784 "InternalServerError" => {
3785 return RusotoError::Service(CreateGlobalTableError::InternalServerError(
3786 err.msg,
3787 ))
3788 }
3789 "LimitExceededException" => {
3790 return RusotoError::Service(CreateGlobalTableError::LimitExceeded(err.msg))
3791 }
3792 "TableNotFoundException" => {
3793 return RusotoError::Service(CreateGlobalTableError::TableNotFound(err.msg))
3794 }
3795 "ValidationException" => return RusotoError::Validation(err.msg),
3796 _ => {}
3797 }
3798 }
3799 RusotoError::Unknown(res)
3800 }
3801}
3802impl fmt::Display for CreateGlobalTableError {
3803 #[allow(unused_variables)]
3804 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
3805 match *self {
3806 CreateGlobalTableError::GlobalTableAlreadyExists(ref cause) => write!(f, "{}", cause),
3807 CreateGlobalTableError::InternalServerError(ref cause) => write!(f, "{}", cause),
3808 CreateGlobalTableError::LimitExceeded(ref cause) => write!(f, "{}", cause),
3809 CreateGlobalTableError::TableNotFound(ref cause) => write!(f, "{}", cause),
3810 }
3811 }
3812}
3813impl Error for CreateGlobalTableError {}
3814/// Errors returned by CreateTable
3815#[derive(Debug, PartialEq)]
3816pub enum CreateTableError {
3817 /// <p>An error occurred on the server side.</p>
3818 InternalServerError(String),
3819 /// <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 quota of 256 tables.</p>
3820 LimitExceeded(String),
3821 /// <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>
3822 ResourceInUse(String),
3823}
3824
3825impl CreateTableError {
3826 pub fn from_response(res: BufferedHttpResponse) -> RusotoError<CreateTableError> {
3827 if let Some(err) = proto::json::Error::parse(&res) {
3828 match err.typ.as_str() {
3829 "InternalServerError" => {
3830 return RusotoError::Service(CreateTableError::InternalServerError(err.msg))
3831 }
3832 "LimitExceededException" => {
3833 return RusotoError::Service(CreateTableError::LimitExceeded(err.msg))
3834 }
3835 "ResourceInUseException" => {
3836 return RusotoError::Service(CreateTableError::ResourceInUse(err.msg))
3837 }
3838 "ValidationException" => return RusotoError::Validation(err.msg),
3839 _ => {}
3840 }
3841 }
3842 RusotoError::Unknown(res)
3843 }
3844}
3845impl fmt::Display for CreateTableError {
3846 #[allow(unused_variables)]
3847 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
3848 match *self {
3849 CreateTableError::InternalServerError(ref cause) => write!(f, "{}", cause),
3850 CreateTableError::LimitExceeded(ref cause) => write!(f, "{}", cause),
3851 CreateTableError::ResourceInUse(ref cause) => write!(f, "{}", cause),
3852 }
3853 }
3854}
3855impl Error for CreateTableError {}
3856/// Errors returned by DeleteBackup
3857#[derive(Debug, PartialEq)]
3858pub enum DeleteBackupError {
3859 /// <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>
3860 BackupInUse(String),
3861 /// <p>Backup not found for the given BackupARN. </p>
3862 BackupNotFound(String),
3863 /// <p>An error occurred on the server side.</p>
3864 InternalServerError(String),
3865 /// <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 quota of 256 tables.</p>
3866 LimitExceeded(String),
3867}
3868
3869impl DeleteBackupError {
3870 pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DeleteBackupError> {
3871 if let Some(err) = proto::json::Error::parse(&res) {
3872 match err.typ.as_str() {
3873 "BackupInUseException" => {
3874 return RusotoError::Service(DeleteBackupError::BackupInUse(err.msg))
3875 }
3876 "BackupNotFoundException" => {
3877 return RusotoError::Service(DeleteBackupError::BackupNotFound(err.msg))
3878 }
3879 "InternalServerError" => {
3880 return RusotoError::Service(DeleteBackupError::InternalServerError(err.msg))
3881 }
3882 "LimitExceededException" => {
3883 return RusotoError::Service(DeleteBackupError::LimitExceeded(err.msg))
3884 }
3885 "ValidationException" => return RusotoError::Validation(err.msg),
3886 _ => {}
3887 }
3888 }
3889 RusotoError::Unknown(res)
3890 }
3891}
3892impl fmt::Display for DeleteBackupError {
3893 #[allow(unused_variables)]
3894 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
3895 match *self {
3896 DeleteBackupError::BackupInUse(ref cause) => write!(f, "{}", cause),
3897 DeleteBackupError::BackupNotFound(ref cause) => write!(f, "{}", cause),
3898 DeleteBackupError::InternalServerError(ref cause) => write!(f, "{}", cause),
3899 DeleteBackupError::LimitExceeded(ref cause) => write!(f, "{}", cause),
3900 }
3901 }
3902}
3903impl Error for DeleteBackupError {}
3904/// Errors returned by DeleteItem
3905#[derive(Debug, PartialEq)]
3906pub enum DeleteItemError {
3907 /// <p>A condition specified in the operation could not be evaluated.</p>
3908 ConditionalCheckFailed(String),
3909 /// <p>An error occurred on the server side.</p>
3910 InternalServerError(String),
3911 /// <p>An item collection is too large. This exception is only returned for tables that have one or more local secondary indexes.</p>
3912 ItemCollectionSizeLimitExceeded(String),
3913 /// <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>
3914 ProvisionedThroughputExceeded(String),
3915 /// <p>Throughput exceeds the current throughput quota for your account. Please contact AWS Support at <a href="https://aws.amazon.com/support">AWS Support</a> to request a quota increase.</p>
3916 RequestLimitExceeded(String),
3917 /// <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>
3918 ResourceNotFound(String),
3919 /// <p>Operation was rejected because there is an ongoing transaction for the item.</p>
3920 TransactionConflict(String),
3921}
3922
3923impl DeleteItemError {
3924 pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DeleteItemError> {
3925 if let Some(err) = proto::json::Error::parse(&res) {
3926 match err.typ.as_str() {
3927 "ConditionalCheckFailedException" => {
3928 return RusotoError::Service(DeleteItemError::ConditionalCheckFailed(err.msg))
3929 }
3930 "InternalServerError" => {
3931 return RusotoError::Service(DeleteItemError::InternalServerError(err.msg))
3932 }
3933 "ItemCollectionSizeLimitExceededException" => {
3934 return RusotoError::Service(DeleteItemError::ItemCollectionSizeLimitExceeded(
3935 err.msg,
3936 ))
3937 }
3938 "ProvisionedThroughputExceededException" => {
3939 return RusotoError::Service(DeleteItemError::ProvisionedThroughputExceeded(
3940 err.msg,
3941 ))
3942 }
3943 "RequestLimitExceeded" => {
3944 return RusotoError::Service(DeleteItemError::RequestLimitExceeded(err.msg))
3945 }
3946 "ResourceNotFoundException" => {
3947 return RusotoError::Service(DeleteItemError::ResourceNotFound(err.msg))
3948 }
3949 "TransactionConflictException" => {
3950 return RusotoError::Service(DeleteItemError::TransactionConflict(err.msg))
3951 }
3952 "ValidationException" => return RusotoError::Validation(err.msg),
3953 _ => {}
3954 }
3955 }
3956 RusotoError::Unknown(res)
3957 }
3958}
3959impl fmt::Display for DeleteItemError {
3960 #[allow(unused_variables)]
3961 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
3962 match *self {
3963 DeleteItemError::ConditionalCheckFailed(ref cause) => write!(f, "{}", cause),
3964 DeleteItemError::InternalServerError(ref cause) => write!(f, "{}", cause),
3965 DeleteItemError::ItemCollectionSizeLimitExceeded(ref cause) => write!(f, "{}", cause),
3966 DeleteItemError::ProvisionedThroughputExceeded(ref cause) => write!(f, "{}", cause),
3967 DeleteItemError::RequestLimitExceeded(ref cause) => write!(f, "{}", cause),
3968 DeleteItemError::ResourceNotFound(ref cause) => write!(f, "{}", cause),
3969 DeleteItemError::TransactionConflict(ref cause) => write!(f, "{}", cause),
3970 }
3971 }
3972}
3973impl Error for DeleteItemError {}
3974/// Errors returned by DeleteTable
3975#[derive(Debug, PartialEq)]
3976pub enum DeleteTableError {
3977 /// <p>An error occurred on the server side.</p>
3978 InternalServerError(String),
3979 /// <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 quota of 256 tables.</p>
3980 LimitExceeded(String),
3981 /// <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>
3982 ResourceInUse(String),
3983 /// <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>
3984 ResourceNotFound(String),
3985}
3986
3987impl DeleteTableError {
3988 pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DeleteTableError> {
3989 if let Some(err) = proto::json::Error::parse(&res) {
3990 match err.typ.as_str() {
3991 "InternalServerError" => {
3992 return RusotoError::Service(DeleteTableError::InternalServerError(err.msg))
3993 }
3994 "LimitExceededException" => {
3995 return RusotoError::Service(DeleteTableError::LimitExceeded(err.msg))
3996 }
3997 "ResourceInUseException" => {
3998 return RusotoError::Service(DeleteTableError::ResourceInUse(err.msg))
3999 }
4000 "ResourceNotFoundException" => {
4001 return RusotoError::Service(DeleteTableError::ResourceNotFound(err.msg))
4002 }
4003 "ValidationException" => return RusotoError::Validation(err.msg),
4004 _ => {}
4005 }
4006 }
4007 RusotoError::Unknown(res)
4008 }
4009}
4010impl fmt::Display for DeleteTableError {
4011 #[allow(unused_variables)]
4012 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
4013 match *self {
4014 DeleteTableError::InternalServerError(ref cause) => write!(f, "{}", cause),
4015 DeleteTableError::LimitExceeded(ref cause) => write!(f, "{}", cause),
4016 DeleteTableError::ResourceInUse(ref cause) => write!(f, "{}", cause),
4017 DeleteTableError::ResourceNotFound(ref cause) => write!(f, "{}", cause),
4018 }
4019 }
4020}
4021impl Error for DeleteTableError {}
4022/// Errors returned by DescribeBackup
4023#[derive(Debug, PartialEq)]
4024pub enum DescribeBackupError {
4025 /// <p>Backup not found for the given BackupARN. </p>
4026 BackupNotFound(String),
4027 /// <p>An error occurred on the server side.</p>
4028 InternalServerError(String),
4029}
4030
4031impl DescribeBackupError {
4032 pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DescribeBackupError> {
4033 if let Some(err) = proto::json::Error::parse(&res) {
4034 match err.typ.as_str() {
4035 "BackupNotFoundException" => {
4036 return RusotoError::Service(DescribeBackupError::BackupNotFound(err.msg))
4037 }
4038 "InternalServerError" => {
4039 return RusotoError::Service(DescribeBackupError::InternalServerError(err.msg))
4040 }
4041 "ValidationException" => return RusotoError::Validation(err.msg),
4042 _ => {}
4043 }
4044 }
4045 RusotoError::Unknown(res)
4046 }
4047}
4048impl fmt::Display for DescribeBackupError {
4049 #[allow(unused_variables)]
4050 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
4051 match *self {
4052 DescribeBackupError::BackupNotFound(ref cause) => write!(f, "{}", cause),
4053 DescribeBackupError::InternalServerError(ref cause) => write!(f, "{}", cause),
4054 }
4055 }
4056}
4057impl Error for DescribeBackupError {}
4058/// Errors returned by DescribeContinuousBackups
4059#[derive(Debug, PartialEq)]
4060pub enum DescribeContinuousBackupsError {
4061 /// <p>An error occurred on the server side.</p>
4062 InternalServerError(String),
4063 /// <p>A source table with the name <code>TableName</code> does not currently exist within the subscriber's account.</p>
4064 TableNotFound(String),
4065}
4066
4067impl DescribeContinuousBackupsError {
4068 pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DescribeContinuousBackupsError> {
4069 if let Some(err) = proto::json::Error::parse(&res) {
4070 match err.typ.as_str() {
4071 "InternalServerError" => {
4072 return RusotoError::Service(
4073 DescribeContinuousBackupsError::InternalServerError(err.msg),
4074 )
4075 }
4076 "TableNotFoundException" => {
4077 return RusotoError::Service(DescribeContinuousBackupsError::TableNotFound(
4078 err.msg,
4079 ))
4080 }
4081 "ValidationException" => return RusotoError::Validation(err.msg),
4082 _ => {}
4083 }
4084 }
4085 RusotoError::Unknown(res)
4086 }
4087}
4088impl fmt::Display for DescribeContinuousBackupsError {
4089 #[allow(unused_variables)]
4090 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
4091 match *self {
4092 DescribeContinuousBackupsError::InternalServerError(ref cause) => {
4093 write!(f, "{}", cause)
4094 }
4095 DescribeContinuousBackupsError::TableNotFound(ref cause) => write!(f, "{}", cause),
4096 }
4097 }
4098}
4099impl Error for DescribeContinuousBackupsError {}
4100/// Errors returned by DescribeContributorInsights
4101#[derive(Debug, PartialEq)]
4102pub enum DescribeContributorInsightsError {
4103 /// <p>An error occurred on the server side.</p>
4104 InternalServerError(String),
4105 /// <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>
4106 ResourceNotFound(String),
4107}
4108
4109impl DescribeContributorInsightsError {
4110 pub fn from_response(
4111 res: BufferedHttpResponse,
4112 ) -> RusotoError<DescribeContributorInsightsError> {
4113 if let Some(err) = proto::json::Error::parse(&res) {
4114 match err.typ.as_str() {
4115 "InternalServerError" => {
4116 return RusotoError::Service(
4117 DescribeContributorInsightsError::InternalServerError(err.msg),
4118 )
4119 }
4120 "ResourceNotFoundException" => {
4121 return RusotoError::Service(
4122 DescribeContributorInsightsError::ResourceNotFound(err.msg),
4123 )
4124 }
4125 "ValidationException" => return RusotoError::Validation(err.msg),
4126 _ => {}
4127 }
4128 }
4129 RusotoError::Unknown(res)
4130 }
4131}
4132impl fmt::Display for DescribeContributorInsightsError {
4133 #[allow(unused_variables)]
4134 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
4135 match *self {
4136 DescribeContributorInsightsError::InternalServerError(ref cause) => {
4137 write!(f, "{}", cause)
4138 }
4139 DescribeContributorInsightsError::ResourceNotFound(ref cause) => write!(f, "{}", cause),
4140 }
4141 }
4142}
4143impl Error for DescribeContributorInsightsError {}
4144/// Errors returned by DescribeEndpoints
4145#[derive(Debug, PartialEq)]
4146pub enum DescribeEndpointsError {}
4147
4148impl DescribeEndpointsError {
4149 pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DescribeEndpointsError> {
4150 if let Some(err) = proto::json::Error::parse(&res) {
4151 match err.typ.as_str() {
4152 "ValidationException" => return RusotoError::Validation(err.msg),
4153 _ => {}
4154 }
4155 }
4156 RusotoError::Unknown(res)
4157 }
4158}
4159impl fmt::Display for DescribeEndpointsError {
4160 #[allow(unused_variables)]
4161 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
4162 match *self {}
4163 }
4164}
4165impl Error for DescribeEndpointsError {}
4166/// Errors returned by DescribeExport
4167#[derive(Debug, PartialEq)]
4168pub enum DescribeExportError {
4169 /// <p>The specified export was not found.</p>
4170 ExportNotFound(String),
4171 /// <p>An error occurred on the server side.</p>
4172 InternalServerError(String),
4173 /// <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 quota of 256 tables.</p>
4174 LimitExceeded(String),
4175}
4176
4177impl DescribeExportError {
4178 pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DescribeExportError> {
4179 if let Some(err) = proto::json::Error::parse(&res) {
4180 match err.typ.as_str() {
4181 "ExportNotFoundException" => {
4182 return RusotoError::Service(DescribeExportError::ExportNotFound(err.msg))
4183 }
4184 "InternalServerError" => {
4185 return RusotoError::Service(DescribeExportError::InternalServerError(err.msg))
4186 }
4187 "LimitExceededException" => {
4188 return RusotoError::Service(DescribeExportError::LimitExceeded(err.msg))
4189 }
4190 "ValidationException" => return RusotoError::Validation(err.msg),
4191 _ => {}
4192 }
4193 }
4194 RusotoError::Unknown(res)
4195 }
4196}
4197impl fmt::Display for DescribeExportError {
4198 #[allow(unused_variables)]
4199 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
4200 match *self {
4201 DescribeExportError::ExportNotFound(ref cause) => write!(f, "{}", cause),
4202 DescribeExportError::InternalServerError(ref cause) => write!(f, "{}", cause),
4203 DescribeExportError::LimitExceeded(ref cause) => write!(f, "{}", cause),
4204 }
4205 }
4206}
4207impl Error for DescribeExportError {}
4208/// Errors returned by DescribeGlobalTable
4209#[derive(Debug, PartialEq)]
4210pub enum DescribeGlobalTableError {
4211 /// <p>The specified global table does not exist.</p>
4212 GlobalTableNotFound(String),
4213 /// <p>An error occurred on the server side.</p>
4214 InternalServerError(String),
4215}
4216
4217impl DescribeGlobalTableError {
4218 pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DescribeGlobalTableError> {
4219 if let Some(err) = proto::json::Error::parse(&res) {
4220 match err.typ.as_str() {
4221 "GlobalTableNotFoundException" => {
4222 return RusotoError::Service(DescribeGlobalTableError::GlobalTableNotFound(
4223 err.msg,
4224 ))
4225 }
4226 "InternalServerError" => {
4227 return RusotoError::Service(DescribeGlobalTableError::InternalServerError(
4228 err.msg,
4229 ))
4230 }
4231 "ValidationException" => return RusotoError::Validation(err.msg),
4232 _ => {}
4233 }
4234 }
4235 RusotoError::Unknown(res)
4236 }
4237}
4238impl fmt::Display for DescribeGlobalTableError {
4239 #[allow(unused_variables)]
4240 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
4241 match *self {
4242 DescribeGlobalTableError::GlobalTableNotFound(ref cause) => write!(f, "{}", cause),
4243 DescribeGlobalTableError::InternalServerError(ref cause) => write!(f, "{}", cause),
4244 }
4245 }
4246}
4247impl Error for DescribeGlobalTableError {}
4248/// Errors returned by DescribeGlobalTableSettings
4249#[derive(Debug, PartialEq)]
4250pub enum DescribeGlobalTableSettingsError {
4251 /// <p>The specified global table does not exist.</p>
4252 GlobalTableNotFound(String),
4253 /// <p>An error occurred on the server side.</p>
4254 InternalServerError(String),
4255}
4256
4257impl DescribeGlobalTableSettingsError {
4258 pub fn from_response(
4259 res: BufferedHttpResponse,
4260 ) -> RusotoError<DescribeGlobalTableSettingsError> {
4261 if let Some(err) = proto::json::Error::parse(&res) {
4262 match err.typ.as_str() {
4263 "GlobalTableNotFoundException" => {
4264 return RusotoError::Service(
4265 DescribeGlobalTableSettingsError::GlobalTableNotFound(err.msg),
4266 )
4267 }
4268 "InternalServerError" => {
4269 return RusotoError::Service(
4270 DescribeGlobalTableSettingsError::InternalServerError(err.msg),
4271 )
4272 }
4273 "ValidationException" => return RusotoError::Validation(err.msg),
4274 _ => {}
4275 }
4276 }
4277 RusotoError::Unknown(res)
4278 }
4279}
4280impl fmt::Display for DescribeGlobalTableSettingsError {
4281 #[allow(unused_variables)]
4282 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
4283 match *self {
4284 DescribeGlobalTableSettingsError::GlobalTableNotFound(ref cause) => {
4285 write!(f, "{}", cause)
4286 }
4287 DescribeGlobalTableSettingsError::InternalServerError(ref cause) => {
4288 write!(f, "{}", cause)
4289 }
4290 }
4291 }
4292}
4293impl Error for DescribeGlobalTableSettingsError {}
4294/// Errors returned by DescribeKinesisStreamingDestination
4295#[derive(Debug, PartialEq)]
4296pub enum DescribeKinesisStreamingDestinationError {
4297 /// <p>An error occurred on the server side.</p>
4298 InternalServerError(String),
4299 /// <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>
4300 ResourceNotFound(String),
4301}
4302
4303impl DescribeKinesisStreamingDestinationError {
4304 pub fn from_response(
4305 res: BufferedHttpResponse,
4306 ) -> RusotoError<DescribeKinesisStreamingDestinationError> {
4307 if let Some(err) = proto::json::Error::parse(&res) {
4308 match err.typ.as_str() {
4309 "InternalServerError" => {
4310 return RusotoError::Service(
4311 DescribeKinesisStreamingDestinationError::InternalServerError(err.msg),
4312 )
4313 }
4314 "ResourceNotFoundException" => {
4315 return RusotoError::Service(
4316 DescribeKinesisStreamingDestinationError::ResourceNotFound(err.msg),
4317 )
4318 }
4319 "ValidationException" => return RusotoError::Validation(err.msg),
4320 _ => {}
4321 }
4322 }
4323 RusotoError::Unknown(res)
4324 }
4325}
4326impl fmt::Display for DescribeKinesisStreamingDestinationError {
4327 #[allow(unused_variables)]
4328 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
4329 match *self {
4330 DescribeKinesisStreamingDestinationError::InternalServerError(ref cause) => {
4331 write!(f, "{}", cause)
4332 }
4333 DescribeKinesisStreamingDestinationError::ResourceNotFound(ref cause) => {
4334 write!(f, "{}", cause)
4335 }
4336 }
4337 }
4338}
4339impl Error for DescribeKinesisStreamingDestinationError {}
4340/// Errors returned by DescribeLimits
4341#[derive(Debug, PartialEq)]
4342pub enum DescribeLimitsError {
4343 /// <p>An error occurred on the server side.</p>
4344 InternalServerError(String),
4345}
4346
4347impl DescribeLimitsError {
4348 pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DescribeLimitsError> {
4349 if let Some(err) = proto::json::Error::parse(&res) {
4350 match err.typ.as_str() {
4351 "InternalServerError" => {
4352 return RusotoError::Service(DescribeLimitsError::InternalServerError(err.msg))
4353 }
4354 "ValidationException" => return RusotoError::Validation(err.msg),
4355 _ => {}
4356 }
4357 }
4358 RusotoError::Unknown(res)
4359 }
4360}
4361impl fmt::Display for DescribeLimitsError {
4362 #[allow(unused_variables)]
4363 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
4364 match *self {
4365 DescribeLimitsError::InternalServerError(ref cause) => write!(f, "{}", cause),
4366 }
4367 }
4368}
4369impl Error for DescribeLimitsError {}
4370/// Errors returned by DescribeTable
4371#[derive(Debug, PartialEq)]
4372pub enum DescribeTableError {
4373 /// <p>An error occurred on the server side.</p>
4374 InternalServerError(String),
4375 /// <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>
4376 ResourceNotFound(String),
4377}
4378
4379impl DescribeTableError {
4380 pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DescribeTableError> {
4381 if let Some(err) = proto::json::Error::parse(&res) {
4382 match err.typ.as_str() {
4383 "InternalServerError" => {
4384 return RusotoError::Service(DescribeTableError::InternalServerError(err.msg))
4385 }
4386 "ResourceNotFoundException" => {
4387 return RusotoError::Service(DescribeTableError::ResourceNotFound(err.msg))
4388 }
4389 "ValidationException" => return RusotoError::Validation(err.msg),
4390 _ => {}
4391 }
4392 }
4393 RusotoError::Unknown(res)
4394 }
4395}
4396impl fmt::Display for DescribeTableError {
4397 #[allow(unused_variables)]
4398 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
4399 match *self {
4400 DescribeTableError::InternalServerError(ref cause) => write!(f, "{}", cause),
4401 DescribeTableError::ResourceNotFound(ref cause) => write!(f, "{}", cause),
4402 }
4403 }
4404}
4405impl Error for DescribeTableError {}
4406/// Errors returned by DescribeTableReplicaAutoScaling
4407#[derive(Debug, PartialEq)]
4408pub enum DescribeTableReplicaAutoScalingError {
4409 /// <p>An error occurred on the server side.</p>
4410 InternalServerError(String),
4411 /// <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>
4412 ResourceNotFound(String),
4413}
4414
4415impl DescribeTableReplicaAutoScalingError {
4416 pub fn from_response(
4417 res: BufferedHttpResponse,
4418 ) -> RusotoError<DescribeTableReplicaAutoScalingError> {
4419 if let Some(err) = proto::json::Error::parse(&res) {
4420 match err.typ.as_str() {
4421 "InternalServerError" => {
4422 return RusotoError::Service(
4423 DescribeTableReplicaAutoScalingError::InternalServerError(err.msg),
4424 )
4425 }
4426 "ResourceNotFoundException" => {
4427 return RusotoError::Service(
4428 DescribeTableReplicaAutoScalingError::ResourceNotFound(err.msg),
4429 )
4430 }
4431 "ValidationException" => return RusotoError::Validation(err.msg),
4432 _ => {}
4433 }
4434 }
4435 RusotoError::Unknown(res)
4436 }
4437}
4438impl fmt::Display for DescribeTableReplicaAutoScalingError {
4439 #[allow(unused_variables)]
4440 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
4441 match *self {
4442 DescribeTableReplicaAutoScalingError::InternalServerError(ref cause) => {
4443 write!(f, "{}", cause)
4444 }
4445 DescribeTableReplicaAutoScalingError::ResourceNotFound(ref cause) => {
4446 write!(f, "{}", cause)
4447 }
4448 }
4449 }
4450}
4451impl Error for DescribeTableReplicaAutoScalingError {}
4452/// Errors returned by DescribeTimeToLive
4453#[derive(Debug, PartialEq)]
4454pub enum DescribeTimeToLiveError {
4455 /// <p>An error occurred on the server side.</p>
4456 InternalServerError(String),
4457 /// <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>
4458 ResourceNotFound(String),
4459}
4460
4461impl DescribeTimeToLiveError {
4462 pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DescribeTimeToLiveError> {
4463 if let Some(err) = proto::json::Error::parse(&res) {
4464 match err.typ.as_str() {
4465 "InternalServerError" => {
4466 return RusotoError::Service(DescribeTimeToLiveError::InternalServerError(
4467 err.msg,
4468 ))
4469 }
4470 "ResourceNotFoundException" => {
4471 return RusotoError::Service(DescribeTimeToLiveError::ResourceNotFound(err.msg))
4472 }
4473 "ValidationException" => return RusotoError::Validation(err.msg),
4474 _ => {}
4475 }
4476 }
4477 RusotoError::Unknown(res)
4478 }
4479}
4480impl fmt::Display for DescribeTimeToLiveError {
4481 #[allow(unused_variables)]
4482 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
4483 match *self {
4484 DescribeTimeToLiveError::InternalServerError(ref cause) => write!(f, "{}", cause),
4485 DescribeTimeToLiveError::ResourceNotFound(ref cause) => write!(f, "{}", cause),
4486 }
4487 }
4488}
4489impl Error for DescribeTimeToLiveError {}
4490/// Errors returned by DisableKinesisStreamingDestination
4491#[derive(Debug, PartialEq)]
4492pub enum DisableKinesisStreamingDestinationError {
4493 /// <p>An error occurred on the server side.</p>
4494 InternalServerError(String),
4495 /// <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 quota of 256 tables.</p>
4496 LimitExceeded(String),
4497 /// <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>
4498 ResourceInUse(String),
4499 /// <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>
4500 ResourceNotFound(String),
4501}
4502
4503impl DisableKinesisStreamingDestinationError {
4504 pub fn from_response(
4505 res: BufferedHttpResponse,
4506 ) -> RusotoError<DisableKinesisStreamingDestinationError> {
4507 if let Some(err) = proto::json::Error::parse(&res) {
4508 match err.typ.as_str() {
4509 "InternalServerError" => {
4510 return RusotoError::Service(
4511 DisableKinesisStreamingDestinationError::InternalServerError(err.msg),
4512 )
4513 }
4514 "LimitExceededException" => {
4515 return RusotoError::Service(
4516 DisableKinesisStreamingDestinationError::LimitExceeded(err.msg),
4517 )
4518 }
4519 "ResourceInUseException" => {
4520 return RusotoError::Service(
4521 DisableKinesisStreamingDestinationError::ResourceInUse(err.msg),
4522 )
4523 }
4524 "ResourceNotFoundException" => {
4525 return RusotoError::Service(
4526 DisableKinesisStreamingDestinationError::ResourceNotFound(err.msg),
4527 )
4528 }
4529 "ValidationException" => return RusotoError::Validation(err.msg),
4530 _ => {}
4531 }
4532 }
4533 RusotoError::Unknown(res)
4534 }
4535}
4536impl fmt::Display for DisableKinesisStreamingDestinationError {
4537 #[allow(unused_variables)]
4538 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
4539 match *self {
4540 DisableKinesisStreamingDestinationError::InternalServerError(ref cause) => {
4541 write!(f, "{}", cause)
4542 }
4543 DisableKinesisStreamingDestinationError::LimitExceeded(ref cause) => {
4544 write!(f, "{}", cause)
4545 }
4546 DisableKinesisStreamingDestinationError::ResourceInUse(ref cause) => {
4547 write!(f, "{}", cause)
4548 }
4549 DisableKinesisStreamingDestinationError::ResourceNotFound(ref cause) => {
4550 write!(f, "{}", cause)
4551 }
4552 }
4553 }
4554}
4555impl Error for DisableKinesisStreamingDestinationError {}
4556/// Errors returned by EnableKinesisStreamingDestination
4557#[derive(Debug, PartialEq)]
4558pub enum EnableKinesisStreamingDestinationError {
4559 /// <p>An error occurred on the server side.</p>
4560 InternalServerError(String),
4561 /// <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 quota of 256 tables.</p>
4562 LimitExceeded(String),
4563 /// <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>
4564 ResourceInUse(String),
4565 /// <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>
4566 ResourceNotFound(String),
4567}
4568
4569impl EnableKinesisStreamingDestinationError {
4570 pub fn from_response(
4571 res: BufferedHttpResponse,
4572 ) -> RusotoError<EnableKinesisStreamingDestinationError> {
4573 if let Some(err) = proto::json::Error::parse(&res) {
4574 match err.typ.as_str() {
4575 "InternalServerError" => {
4576 return RusotoError::Service(
4577 EnableKinesisStreamingDestinationError::InternalServerError(err.msg),
4578 )
4579 }
4580 "LimitExceededException" => {
4581 return RusotoError::Service(
4582 EnableKinesisStreamingDestinationError::LimitExceeded(err.msg),
4583 )
4584 }
4585 "ResourceInUseException" => {
4586 return RusotoError::Service(
4587 EnableKinesisStreamingDestinationError::ResourceInUse(err.msg),
4588 )
4589 }
4590 "ResourceNotFoundException" => {
4591 return RusotoError::Service(
4592 EnableKinesisStreamingDestinationError::ResourceNotFound(err.msg),
4593 )
4594 }
4595 "ValidationException" => return RusotoError::Validation(err.msg),
4596 _ => {}
4597 }
4598 }
4599 RusotoError::Unknown(res)
4600 }
4601}
4602impl fmt::Display for EnableKinesisStreamingDestinationError {
4603 #[allow(unused_variables)]
4604 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
4605 match *self {
4606 EnableKinesisStreamingDestinationError::InternalServerError(ref cause) => {
4607 write!(f, "{}", cause)
4608 }
4609 EnableKinesisStreamingDestinationError::LimitExceeded(ref cause) => {
4610 write!(f, "{}", cause)
4611 }
4612 EnableKinesisStreamingDestinationError::ResourceInUse(ref cause) => {
4613 write!(f, "{}", cause)
4614 }
4615 EnableKinesisStreamingDestinationError::ResourceNotFound(ref cause) => {
4616 write!(f, "{}", cause)
4617 }
4618 }
4619 }
4620}
4621impl Error for EnableKinesisStreamingDestinationError {}
4622/// Errors returned by ExecuteStatement
4623#[derive(Debug, PartialEq)]
4624pub enum ExecuteStatementError {
4625 /// <p>A condition specified in the operation could not be evaluated.</p>
4626 ConditionalCheckFailed(String),
4627 /// <p> There was an attempt to insert an item with the same primary key as an item that already exists in the DynamoDB table. </p>
4628 DuplicateItem(String),
4629 /// <p>An error occurred on the server side.</p>
4630 InternalServerError(String),
4631 /// <p>An item collection is too large. This exception is only returned for tables that have one or more local secondary indexes.</p>
4632 ItemCollectionSizeLimitExceeded(String),
4633 /// <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>
4634 ProvisionedThroughputExceeded(String),
4635 /// <p>Throughput exceeds the current throughput quota for your account. Please contact AWS Support at <a href="https://aws.amazon.com/support">AWS Support</a> to request a quota increase.</p>
4636 RequestLimitExceeded(String),
4637 /// <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>
4638 ResourceNotFound(String),
4639 /// <p>Operation was rejected because there is an ongoing transaction for the item.</p>
4640 TransactionConflict(String),
4641}
4642
4643impl ExecuteStatementError {
4644 pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ExecuteStatementError> {
4645 if let Some(err) = proto::json::Error::parse(&res) {
4646 match err.typ.as_str() {
4647 "ConditionalCheckFailedException" => {
4648 return RusotoError::Service(ExecuteStatementError::ConditionalCheckFailed(
4649 err.msg,
4650 ))
4651 }
4652 "DuplicateItemException" => {
4653 return RusotoError::Service(ExecuteStatementError::DuplicateItem(err.msg))
4654 }
4655 "InternalServerError" => {
4656 return RusotoError::Service(ExecuteStatementError::InternalServerError(
4657 err.msg,
4658 ))
4659 }
4660 "ItemCollectionSizeLimitExceededException" => {
4661 return RusotoError::Service(
4662 ExecuteStatementError::ItemCollectionSizeLimitExceeded(err.msg),
4663 )
4664 }
4665 "ProvisionedThroughputExceededException" => {
4666 return RusotoError::Service(
4667 ExecuteStatementError::ProvisionedThroughputExceeded(err.msg),
4668 )
4669 }
4670 "RequestLimitExceeded" => {
4671 return RusotoError::Service(ExecuteStatementError::RequestLimitExceeded(
4672 err.msg,
4673 ))
4674 }
4675 "ResourceNotFoundException" => {
4676 return RusotoError::Service(ExecuteStatementError::ResourceNotFound(err.msg))
4677 }
4678 "TransactionConflictException" => {
4679 return RusotoError::Service(ExecuteStatementError::TransactionConflict(
4680 err.msg,
4681 ))
4682 }
4683 "ValidationException" => return RusotoError::Validation(err.msg),
4684 _ => {}
4685 }
4686 }
4687 RusotoError::Unknown(res)
4688 }
4689}
4690impl fmt::Display for ExecuteStatementError {
4691 #[allow(unused_variables)]
4692 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
4693 match *self {
4694 ExecuteStatementError::ConditionalCheckFailed(ref cause) => write!(f, "{}", cause),
4695 ExecuteStatementError::DuplicateItem(ref cause) => write!(f, "{}", cause),
4696 ExecuteStatementError::InternalServerError(ref cause) => write!(f, "{}", cause),
4697 ExecuteStatementError::ItemCollectionSizeLimitExceeded(ref cause) => {
4698 write!(f, "{}", cause)
4699 }
4700 ExecuteStatementError::ProvisionedThroughputExceeded(ref cause) => {
4701 write!(f, "{}", cause)
4702 }
4703 ExecuteStatementError::RequestLimitExceeded(ref cause) => write!(f, "{}", cause),
4704 ExecuteStatementError::ResourceNotFound(ref cause) => write!(f, "{}", cause),
4705 ExecuteStatementError::TransactionConflict(ref cause) => write!(f, "{}", cause),
4706 }
4707 }
4708}
4709impl Error for ExecuteStatementError {}
4710/// Errors returned by ExecuteTransaction
4711#[derive(Debug, PartialEq)]
4712pub enum ExecuteTransactionError {
4713 /// <p>DynamoDB rejected the request because you retried a request with a different payload but with an idempotent token that was already used.</p>
4714 IdempotentParameterMismatch(String),
4715 /// <p>An error occurred on the server side.</p>
4716 InternalServerError(String),
4717 /// <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>
4718 ProvisionedThroughputExceeded(String),
4719 /// <p>Throughput exceeds the current throughput quota for your account. Please contact AWS Support at <a href="https://aws.amazon.com/support">AWS Support</a> to request a quota increase.</p>
4720 RequestLimitExceeded(String),
4721 /// <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>
4722 ResourceNotFound(String),
4723 /// <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>
4724 TransactionCanceled(String),
4725 /// <p>The transaction with the given request token is already in progress.</p>
4726 TransactionInProgress(String),
4727}
4728
4729impl ExecuteTransactionError {
4730 pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ExecuteTransactionError> {
4731 if let Some(err) = proto::json::Error::parse(&res) {
4732 match err.typ.as_str() {
4733 "IdempotentParameterMismatchException" => {
4734 return RusotoError::Service(
4735 ExecuteTransactionError::IdempotentParameterMismatch(err.msg),
4736 )
4737 }
4738 "InternalServerError" => {
4739 return RusotoError::Service(ExecuteTransactionError::InternalServerError(
4740 err.msg,
4741 ))
4742 }
4743 "ProvisionedThroughputExceededException" => {
4744 return RusotoError::Service(
4745 ExecuteTransactionError::ProvisionedThroughputExceeded(err.msg),
4746 )
4747 }
4748 "RequestLimitExceeded" => {
4749 return RusotoError::Service(ExecuteTransactionError::RequestLimitExceeded(
4750 err.msg,
4751 ))
4752 }
4753 "ResourceNotFoundException" => {
4754 return RusotoError::Service(ExecuteTransactionError::ResourceNotFound(err.msg))
4755 }
4756 "TransactionCanceledException" => {
4757 return RusotoError::Service(ExecuteTransactionError::TransactionCanceled(
4758 err.msg,
4759 ))
4760 }
4761 "TransactionInProgressException" => {
4762 return RusotoError::Service(ExecuteTransactionError::TransactionInProgress(
4763 err.msg,
4764 ))
4765 }
4766 "ValidationException" => return RusotoError::Validation(err.msg),
4767 _ => {}
4768 }
4769 }
4770 RusotoError::Unknown(res)
4771 }
4772}
4773impl fmt::Display for ExecuteTransactionError {
4774 #[allow(unused_variables)]
4775 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
4776 match *self {
4777 ExecuteTransactionError::IdempotentParameterMismatch(ref cause) => {
4778 write!(f, "{}", cause)
4779 }
4780 ExecuteTransactionError::InternalServerError(ref cause) => write!(f, "{}", cause),
4781 ExecuteTransactionError::ProvisionedThroughputExceeded(ref cause) => {
4782 write!(f, "{}", cause)
4783 }
4784 ExecuteTransactionError::RequestLimitExceeded(ref cause) => write!(f, "{}", cause),
4785 ExecuteTransactionError::ResourceNotFound(ref cause) => write!(f, "{}", cause),
4786 ExecuteTransactionError::TransactionCanceled(ref cause) => write!(f, "{}", cause),
4787 ExecuteTransactionError::TransactionInProgress(ref cause) => write!(f, "{}", cause),
4788 }
4789 }
4790}
4791impl Error for ExecuteTransactionError {}
4792/// Errors returned by ExportTableToPointInTime
4793#[derive(Debug, PartialEq)]
4794pub enum ExportTableToPointInTimeError {
4795 /// <p>There was a conflict when writing to the specified S3 bucket.</p>
4796 ExportConflict(String),
4797 /// <p>An error occurred on the server side.</p>
4798 InternalServerError(String),
4799 /// <p>The specified <code>ExportTime</code> is outside of the point in time recovery window.</p>
4800 InvalidExportTime(String),
4801 /// <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 quota of 256 tables.</p>
4802 LimitExceeded(String),
4803 /// <p>Point in time recovery has not yet been enabled for this source table.</p>
4804 PointInTimeRecoveryUnavailable(String),
4805 /// <p>A source table with the name <code>TableName</code> does not currently exist within the subscriber's account.</p>
4806 TableNotFound(String),
4807}
4808
4809impl ExportTableToPointInTimeError {
4810 pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ExportTableToPointInTimeError> {
4811 if let Some(err) = proto::json::Error::parse(&res) {
4812 match err.typ.as_str() {
4813 "ExportConflictException" => {
4814 return RusotoError::Service(ExportTableToPointInTimeError::ExportConflict(
4815 err.msg,
4816 ))
4817 }
4818 "InternalServerError" => {
4819 return RusotoError::Service(
4820 ExportTableToPointInTimeError::InternalServerError(err.msg),
4821 )
4822 }
4823 "InvalidExportTimeException" => {
4824 return RusotoError::Service(ExportTableToPointInTimeError::InvalidExportTime(
4825 err.msg,
4826 ))
4827 }
4828 "LimitExceededException" => {
4829 return RusotoError::Service(ExportTableToPointInTimeError::LimitExceeded(
4830 err.msg,
4831 ))
4832 }
4833 "PointInTimeRecoveryUnavailableException" => {
4834 return RusotoError::Service(
4835 ExportTableToPointInTimeError::PointInTimeRecoveryUnavailable(err.msg),
4836 )
4837 }
4838 "TableNotFoundException" => {
4839 return RusotoError::Service(ExportTableToPointInTimeError::TableNotFound(
4840 err.msg,
4841 ))
4842 }
4843 "ValidationException" => return RusotoError::Validation(err.msg),
4844 _ => {}
4845 }
4846 }
4847 RusotoError::Unknown(res)
4848 }
4849}
4850impl fmt::Display for ExportTableToPointInTimeError {
4851 #[allow(unused_variables)]
4852 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
4853 match *self {
4854 ExportTableToPointInTimeError::ExportConflict(ref cause) => write!(f, "{}", cause),
4855 ExportTableToPointInTimeError::InternalServerError(ref cause) => write!(f, "{}", cause),
4856 ExportTableToPointInTimeError::InvalidExportTime(ref cause) => write!(f, "{}", cause),
4857 ExportTableToPointInTimeError::LimitExceeded(ref cause) => write!(f, "{}", cause),
4858 ExportTableToPointInTimeError::PointInTimeRecoveryUnavailable(ref cause) => {
4859 write!(f, "{}", cause)
4860 }
4861 ExportTableToPointInTimeError::TableNotFound(ref cause) => write!(f, "{}", cause),
4862 }
4863 }
4864}
4865impl Error for ExportTableToPointInTimeError {}
4866/// Errors returned by GetItem
4867#[derive(Debug, PartialEq)]
4868pub enum GetItemError {
4869 /// <p>An error occurred on the server side.</p>
4870 InternalServerError(String),
4871 /// <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>
4872 ProvisionedThroughputExceeded(String),
4873 /// <p>Throughput exceeds the current throughput quota for your account. Please contact AWS Support at <a href="https://aws.amazon.com/support">AWS Support</a> to request a quota increase.</p>
4874 RequestLimitExceeded(String),
4875 /// <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>
4876 ResourceNotFound(String),
4877}
4878
4879impl GetItemError {
4880 pub fn from_response(res: BufferedHttpResponse) -> RusotoError<GetItemError> {
4881 if let Some(err) = proto::json::Error::parse(&res) {
4882 match err.typ.as_str() {
4883 "InternalServerError" => {
4884 return RusotoError::Service(GetItemError::InternalServerError(err.msg))
4885 }
4886 "ProvisionedThroughputExceededException" => {
4887 return RusotoError::Service(GetItemError::ProvisionedThroughputExceeded(
4888 err.msg,
4889 ))
4890 }
4891 "RequestLimitExceeded" => {
4892 return RusotoError::Service(GetItemError::RequestLimitExceeded(err.msg))
4893 }
4894 "ResourceNotFoundException" => {
4895 return RusotoError::Service(GetItemError::ResourceNotFound(err.msg))
4896 }
4897 "ValidationException" => return RusotoError::Validation(err.msg),
4898 _ => {}
4899 }
4900 }
4901 RusotoError::Unknown(res)
4902 }
4903}
4904impl fmt::Display for GetItemError {
4905 #[allow(unused_variables)]
4906 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
4907 match *self {
4908 GetItemError::InternalServerError(ref cause) => write!(f, "{}", cause),
4909 GetItemError::ProvisionedThroughputExceeded(ref cause) => write!(f, "{}", cause),
4910 GetItemError::RequestLimitExceeded(ref cause) => write!(f, "{}", cause),
4911 GetItemError::ResourceNotFound(ref cause) => write!(f, "{}", cause),
4912 }
4913 }
4914}
4915impl Error for GetItemError {}
4916/// Errors returned by ListBackups
4917#[derive(Debug, PartialEq)]
4918pub enum ListBackupsError {
4919 /// <p>An error occurred on the server side.</p>
4920 InternalServerError(String),
4921}
4922
4923impl ListBackupsError {
4924 pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ListBackupsError> {
4925 if let Some(err) = proto::json::Error::parse(&res) {
4926 match err.typ.as_str() {
4927 "InternalServerError" => {
4928 return RusotoError::Service(ListBackupsError::InternalServerError(err.msg))
4929 }
4930 "ValidationException" => return RusotoError::Validation(err.msg),
4931 _ => {}
4932 }
4933 }
4934 RusotoError::Unknown(res)
4935 }
4936}
4937impl fmt::Display for ListBackupsError {
4938 #[allow(unused_variables)]
4939 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
4940 match *self {
4941 ListBackupsError::InternalServerError(ref cause) => write!(f, "{}", cause),
4942 }
4943 }
4944}
4945impl Error for ListBackupsError {}
4946/// Errors returned by ListContributorInsights
4947#[derive(Debug, PartialEq)]
4948pub enum ListContributorInsightsError {
4949 /// <p>An error occurred on the server side.</p>
4950 InternalServerError(String),
4951 /// <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>
4952 ResourceNotFound(String),
4953}
4954
4955impl ListContributorInsightsError {
4956 pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ListContributorInsightsError> {
4957 if let Some(err) = proto::json::Error::parse(&res) {
4958 match err.typ.as_str() {
4959 "InternalServerError" => {
4960 return RusotoError::Service(ListContributorInsightsError::InternalServerError(
4961 err.msg,
4962 ))
4963 }
4964 "ResourceNotFoundException" => {
4965 return RusotoError::Service(ListContributorInsightsError::ResourceNotFound(
4966 err.msg,
4967 ))
4968 }
4969 "ValidationException" => return RusotoError::Validation(err.msg),
4970 _ => {}
4971 }
4972 }
4973 RusotoError::Unknown(res)
4974 }
4975}
4976impl fmt::Display for ListContributorInsightsError {
4977 #[allow(unused_variables)]
4978 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
4979 match *self {
4980 ListContributorInsightsError::InternalServerError(ref cause) => write!(f, "{}", cause),
4981 ListContributorInsightsError::ResourceNotFound(ref cause) => write!(f, "{}", cause),
4982 }
4983 }
4984}
4985impl Error for ListContributorInsightsError {}
4986/// Errors returned by ListExports
4987#[derive(Debug, PartialEq)]
4988pub enum ListExportsError {
4989 /// <p>An error occurred on the server side.</p>
4990 InternalServerError(String),
4991 /// <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 quota of 256 tables.</p>
4992 LimitExceeded(String),
4993}
4994
4995impl ListExportsError {
4996 pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ListExportsError> {
4997 if let Some(err) = proto::json::Error::parse(&res) {
4998 match err.typ.as_str() {
4999 "InternalServerError" => {
5000 return RusotoError::Service(ListExportsError::InternalServerError(err.msg))
5001 }
5002 "LimitExceededException" => {
5003 return RusotoError::Service(ListExportsError::LimitExceeded(err.msg))
5004 }
5005 "ValidationException" => return RusotoError::Validation(err.msg),
5006 _ => {}
5007 }
5008 }
5009 RusotoError::Unknown(res)
5010 }
5011}
5012impl fmt::Display for ListExportsError {
5013 #[allow(unused_variables)]
5014 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
5015 match *self {
5016 ListExportsError::InternalServerError(ref cause) => write!(f, "{}", cause),
5017 ListExportsError::LimitExceeded(ref cause) => write!(f, "{}", cause),
5018 }
5019 }
5020}
5021impl Error for ListExportsError {}
5022/// Errors returned by ListGlobalTables
5023#[derive(Debug, PartialEq)]
5024pub enum ListGlobalTablesError {
5025 /// <p>An error occurred on the server side.</p>
5026 InternalServerError(String),
5027}
5028
5029impl ListGlobalTablesError {
5030 pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ListGlobalTablesError> {
5031 if let Some(err) = proto::json::Error::parse(&res) {
5032 match err.typ.as_str() {
5033 "InternalServerError" => {
5034 return RusotoError::Service(ListGlobalTablesError::InternalServerError(
5035 err.msg,
5036 ))
5037 }
5038 "ValidationException" => return RusotoError::Validation(err.msg),
5039 _ => {}
5040 }
5041 }
5042 RusotoError::Unknown(res)
5043 }
5044}
5045impl fmt::Display for ListGlobalTablesError {
5046 #[allow(unused_variables)]
5047 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
5048 match *self {
5049 ListGlobalTablesError::InternalServerError(ref cause) => write!(f, "{}", cause),
5050 }
5051 }
5052}
5053impl Error for ListGlobalTablesError {}
5054/// Errors returned by ListTables
5055#[derive(Debug, PartialEq)]
5056pub enum ListTablesError {
5057 /// <p>An error occurred on the server side.</p>
5058 InternalServerError(String),
5059}
5060
5061impl ListTablesError {
5062 pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ListTablesError> {
5063 if let Some(err) = proto::json::Error::parse(&res) {
5064 match err.typ.as_str() {
5065 "InternalServerError" => {
5066 return RusotoError::Service(ListTablesError::InternalServerError(err.msg))
5067 }
5068 "ValidationException" => return RusotoError::Validation(err.msg),
5069 _ => {}
5070 }
5071 }
5072 RusotoError::Unknown(res)
5073 }
5074}
5075impl fmt::Display for ListTablesError {
5076 #[allow(unused_variables)]
5077 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
5078 match *self {
5079 ListTablesError::InternalServerError(ref cause) => write!(f, "{}", cause),
5080 }
5081 }
5082}
5083impl Error for ListTablesError {}
5084/// Errors returned by ListTagsOfResource
5085#[derive(Debug, PartialEq)]
5086pub enum ListTagsOfResourceError {
5087 /// <p>An error occurred on the server side.</p>
5088 InternalServerError(String),
5089 /// <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>
5090 ResourceNotFound(String),
5091}
5092
5093impl ListTagsOfResourceError {
5094 pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ListTagsOfResourceError> {
5095 if let Some(err) = proto::json::Error::parse(&res) {
5096 match err.typ.as_str() {
5097 "InternalServerError" => {
5098 return RusotoError::Service(ListTagsOfResourceError::InternalServerError(
5099 err.msg,
5100 ))
5101 }
5102 "ResourceNotFoundException" => {
5103 return RusotoError::Service(ListTagsOfResourceError::ResourceNotFound(err.msg))
5104 }
5105 "ValidationException" => return RusotoError::Validation(err.msg),
5106 _ => {}
5107 }
5108 }
5109 RusotoError::Unknown(res)
5110 }
5111}
5112impl fmt::Display for ListTagsOfResourceError {
5113 #[allow(unused_variables)]
5114 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
5115 match *self {
5116 ListTagsOfResourceError::InternalServerError(ref cause) => write!(f, "{}", cause),
5117 ListTagsOfResourceError::ResourceNotFound(ref cause) => write!(f, "{}", cause),
5118 }
5119 }
5120}
5121impl Error for ListTagsOfResourceError {}
5122/// Errors returned by PutItem
5123#[derive(Debug, PartialEq)]
5124pub enum PutItemError {
5125 /// <p>A condition specified in the operation could not be evaluated.</p>
5126 ConditionalCheckFailed(String),
5127 /// <p>An error occurred on the server side.</p>
5128 InternalServerError(String),
5129 /// <p>An item collection is too large. This exception is only returned for tables that have one or more local secondary indexes.</p>
5130 ItemCollectionSizeLimitExceeded(String),
5131 /// <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>
5132 ProvisionedThroughputExceeded(String),
5133 /// <p>Throughput exceeds the current throughput quota for your account. Please contact AWS Support at <a href="https://aws.amazon.com/support">AWS Support</a> to request a quota increase.</p>
5134 RequestLimitExceeded(String),
5135 /// <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>
5136 ResourceNotFound(String),
5137 /// <p>Operation was rejected because there is an ongoing transaction for the item.</p>
5138 TransactionConflict(String),
5139}
5140
5141impl PutItemError {
5142 pub fn from_response(res: BufferedHttpResponse) -> RusotoError<PutItemError> {
5143 if let Some(err) = proto::json::Error::parse(&res) {
5144 match err.typ.as_str() {
5145 "ConditionalCheckFailedException" => {
5146 return RusotoError::Service(PutItemError::ConditionalCheckFailed(err.msg))
5147 }
5148 "InternalServerError" => {
5149 return RusotoError::Service(PutItemError::InternalServerError(err.msg))
5150 }
5151 "ItemCollectionSizeLimitExceededException" => {
5152 return RusotoError::Service(PutItemError::ItemCollectionSizeLimitExceeded(
5153 err.msg,
5154 ))
5155 }
5156 "ProvisionedThroughputExceededException" => {
5157 return RusotoError::Service(PutItemError::ProvisionedThroughputExceeded(
5158 err.msg,
5159 ))
5160 }
5161 "RequestLimitExceeded" => {
5162 return RusotoError::Service(PutItemError::RequestLimitExceeded(err.msg))
5163 }
5164 "ResourceNotFoundException" => {
5165 return RusotoError::Service(PutItemError::ResourceNotFound(err.msg))
5166 }
5167 "TransactionConflictException" => {
5168 return RusotoError::Service(PutItemError::TransactionConflict(err.msg))
5169 }
5170 "ValidationException" => return RusotoError::Validation(err.msg),
5171 _ => {}
5172 }
5173 }
5174 RusotoError::Unknown(res)
5175 }
5176}
5177impl fmt::Display for PutItemError {
5178 #[allow(unused_variables)]
5179 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
5180 match *self {
5181 PutItemError::ConditionalCheckFailed(ref cause) => write!(f, "{}", cause),
5182 PutItemError::InternalServerError(ref cause) => write!(f, "{}", cause),
5183 PutItemError::ItemCollectionSizeLimitExceeded(ref cause) => write!(f, "{}", cause),
5184 PutItemError::ProvisionedThroughputExceeded(ref cause) => write!(f, "{}", cause),
5185 PutItemError::RequestLimitExceeded(ref cause) => write!(f, "{}", cause),
5186 PutItemError::ResourceNotFound(ref cause) => write!(f, "{}", cause),
5187 PutItemError::TransactionConflict(ref cause) => write!(f, "{}", cause),
5188 }
5189 }
5190}
5191impl Error for PutItemError {}
5192/// Errors returned by Query
5193#[derive(Debug, PartialEq)]
5194pub enum QueryError {
5195 /// <p>An error occurred on the server side.</p>
5196 InternalServerError(String),
5197 /// <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>
5198 ProvisionedThroughputExceeded(String),
5199 /// <p>Throughput exceeds the current throughput quota for your account. Please contact AWS Support at <a href="https://aws.amazon.com/support">AWS Support</a> to request a quota increase.</p>
5200 RequestLimitExceeded(String),
5201 /// <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>
5202 ResourceNotFound(String),
5203}
5204
5205impl QueryError {
5206 pub fn from_response(res: BufferedHttpResponse) -> RusotoError<QueryError> {
5207 if let Some(err) = proto::json::Error::parse(&res) {
5208 match err.typ.as_str() {
5209 "InternalServerError" => {
5210 return RusotoError::Service(QueryError::InternalServerError(err.msg))
5211 }
5212 "ProvisionedThroughputExceededException" => {
5213 return RusotoError::Service(QueryError::ProvisionedThroughputExceeded(err.msg))
5214 }
5215 "RequestLimitExceeded" => {
5216 return RusotoError::Service(QueryError::RequestLimitExceeded(err.msg))
5217 }
5218 "ResourceNotFoundException" => {
5219 return RusotoError::Service(QueryError::ResourceNotFound(err.msg))
5220 }
5221 "ValidationException" => return RusotoError::Validation(err.msg),
5222 _ => {}
5223 }
5224 }
5225 RusotoError::Unknown(res)
5226 }
5227}
5228impl fmt::Display for QueryError {
5229 #[allow(unused_variables)]
5230 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
5231 match *self {
5232 QueryError::InternalServerError(ref cause) => write!(f, "{}", cause),
5233 QueryError::ProvisionedThroughputExceeded(ref cause) => write!(f, "{}", cause),
5234 QueryError::RequestLimitExceeded(ref cause) => write!(f, "{}", cause),
5235 QueryError::ResourceNotFound(ref cause) => write!(f, "{}", cause),
5236 }
5237 }
5238}
5239impl Error for QueryError {}
5240/// Errors returned by RestoreTableFromBackup
5241#[derive(Debug, PartialEq)]
5242pub enum RestoreTableFromBackupError {
5243 /// <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>
5244 BackupInUse(String),
5245 /// <p>Backup not found for the given BackupARN. </p>
5246 BackupNotFound(String),
5247 /// <p>An error occurred on the server side.</p>
5248 InternalServerError(String),
5249 /// <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 quota of 256 tables.</p>
5250 LimitExceeded(String),
5251 /// <p>A target table with the specified name already exists. </p>
5252 TableAlreadyExists(String),
5253 /// <p>A target table with the specified name is either being created or deleted. </p>
5254 TableInUse(String),
5255}
5256
5257impl RestoreTableFromBackupError {
5258 pub fn from_response(res: BufferedHttpResponse) -> RusotoError<RestoreTableFromBackupError> {
5259 if let Some(err) = proto::json::Error::parse(&res) {
5260 match err.typ.as_str() {
5261 "BackupInUseException" => {
5262 return RusotoError::Service(RestoreTableFromBackupError::BackupInUse(err.msg))
5263 }
5264 "BackupNotFoundException" => {
5265 return RusotoError::Service(RestoreTableFromBackupError::BackupNotFound(
5266 err.msg,
5267 ))
5268 }
5269 "InternalServerError" => {
5270 return RusotoError::Service(RestoreTableFromBackupError::InternalServerError(
5271 err.msg,
5272 ))
5273 }
5274 "LimitExceededException" => {
5275 return RusotoError::Service(RestoreTableFromBackupError::LimitExceeded(
5276 err.msg,
5277 ))
5278 }
5279 "TableAlreadyExistsException" => {
5280 return RusotoError::Service(RestoreTableFromBackupError::TableAlreadyExists(
5281 err.msg,
5282 ))
5283 }
5284 "TableInUseException" => {
5285 return RusotoError::Service(RestoreTableFromBackupError::TableInUse(err.msg))
5286 }
5287 "ValidationException" => return RusotoError::Validation(err.msg),
5288 _ => {}
5289 }
5290 }
5291 RusotoError::Unknown(res)
5292 }
5293}
5294impl fmt::Display for RestoreTableFromBackupError {
5295 #[allow(unused_variables)]
5296 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
5297 match *self {
5298 RestoreTableFromBackupError::BackupInUse(ref cause) => write!(f, "{}", cause),
5299 RestoreTableFromBackupError::BackupNotFound(ref cause) => write!(f, "{}", cause),
5300 RestoreTableFromBackupError::InternalServerError(ref cause) => write!(f, "{}", cause),
5301 RestoreTableFromBackupError::LimitExceeded(ref cause) => write!(f, "{}", cause),
5302 RestoreTableFromBackupError::TableAlreadyExists(ref cause) => write!(f, "{}", cause),
5303 RestoreTableFromBackupError::TableInUse(ref cause) => write!(f, "{}", cause),
5304 }
5305 }
5306}
5307impl Error for RestoreTableFromBackupError {}
5308/// Errors returned by RestoreTableToPointInTime
5309#[derive(Debug, PartialEq)]
5310pub enum RestoreTableToPointInTimeError {
5311 /// <p>An error occurred on the server side.</p>
5312 InternalServerError(String),
5313 /// <p>An invalid restore time was specified. RestoreDateTime must be between EarliestRestorableDateTime and LatestRestorableDateTime.</p>
5314 InvalidRestoreTime(String),
5315 /// <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 quota of 256 tables.</p>
5316 LimitExceeded(String),
5317 /// <p>Point in time recovery has not yet been enabled for this source table.</p>
5318 PointInTimeRecoveryUnavailable(String),
5319 /// <p>A target table with the specified name already exists. </p>
5320 TableAlreadyExists(String),
5321 /// <p>A target table with the specified name is either being created or deleted. </p>
5322 TableInUse(String),
5323 /// <p>A source table with the name <code>TableName</code> does not currently exist within the subscriber's account.</p>
5324 TableNotFound(String),
5325}
5326
5327impl RestoreTableToPointInTimeError {
5328 pub fn from_response(res: BufferedHttpResponse) -> RusotoError<RestoreTableToPointInTimeError> {
5329 if let Some(err) = proto::json::Error::parse(&res) {
5330 match err.typ.as_str() {
5331 "InternalServerError" => {
5332 return RusotoError::Service(
5333 RestoreTableToPointInTimeError::InternalServerError(err.msg),
5334 )
5335 }
5336 "InvalidRestoreTimeException" => {
5337 return RusotoError::Service(
5338 RestoreTableToPointInTimeError::InvalidRestoreTime(err.msg),
5339 )
5340 }
5341 "LimitExceededException" => {
5342 return RusotoError::Service(RestoreTableToPointInTimeError::LimitExceeded(
5343 err.msg,
5344 ))
5345 }
5346 "PointInTimeRecoveryUnavailableException" => {
5347 return RusotoError::Service(
5348 RestoreTableToPointInTimeError::PointInTimeRecoveryUnavailable(err.msg),
5349 )
5350 }
5351 "TableAlreadyExistsException" => {
5352 return RusotoError::Service(
5353 RestoreTableToPointInTimeError::TableAlreadyExists(err.msg),
5354 )
5355 }
5356 "TableInUseException" => {
5357 return RusotoError::Service(RestoreTableToPointInTimeError::TableInUse(
5358 err.msg,
5359 ))
5360 }
5361 "TableNotFoundException" => {
5362 return RusotoError::Service(RestoreTableToPointInTimeError::TableNotFound(
5363 err.msg,
5364 ))
5365 }
5366 "ValidationException" => return RusotoError::Validation(err.msg),
5367 _ => {}
5368 }
5369 }
5370 RusotoError::Unknown(res)
5371 }
5372}
5373impl fmt::Display for RestoreTableToPointInTimeError {
5374 #[allow(unused_variables)]
5375 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
5376 match *self {
5377 RestoreTableToPointInTimeError::InternalServerError(ref cause) => {
5378 write!(f, "{}", cause)
5379 }
5380 RestoreTableToPointInTimeError::InvalidRestoreTime(ref cause) => write!(f, "{}", cause),
5381 RestoreTableToPointInTimeError::LimitExceeded(ref cause) => write!(f, "{}", cause),
5382 RestoreTableToPointInTimeError::PointInTimeRecoveryUnavailable(ref cause) => {
5383 write!(f, "{}", cause)
5384 }
5385 RestoreTableToPointInTimeError::TableAlreadyExists(ref cause) => write!(f, "{}", cause),
5386 RestoreTableToPointInTimeError::TableInUse(ref cause) => write!(f, "{}", cause),
5387 RestoreTableToPointInTimeError::TableNotFound(ref cause) => write!(f, "{}", cause),
5388 }
5389 }
5390}
5391impl Error for RestoreTableToPointInTimeError {}
5392/// Errors returned by Scan
5393#[derive(Debug, PartialEq)]
5394pub enum ScanError {
5395 /// <p>An error occurred on the server side.</p>
5396 InternalServerError(String),
5397 /// <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>
5398 ProvisionedThroughputExceeded(String),
5399 /// <p>Throughput exceeds the current throughput quota for your account. Please contact AWS Support at <a href="https://aws.amazon.com/support">AWS Support</a> to request a quota increase.</p>
5400 RequestLimitExceeded(String),
5401 /// <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>
5402 ResourceNotFound(String),
5403}
5404
5405impl ScanError {
5406 pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ScanError> {
5407 if let Some(err) = proto::json::Error::parse(&res) {
5408 match err.typ.as_str() {
5409 "InternalServerError" => {
5410 return RusotoError::Service(ScanError::InternalServerError(err.msg))
5411 }
5412 "ProvisionedThroughputExceededException" => {
5413 return RusotoError::Service(ScanError::ProvisionedThroughputExceeded(err.msg))
5414 }
5415 "RequestLimitExceeded" => {
5416 return RusotoError::Service(ScanError::RequestLimitExceeded(err.msg))
5417 }
5418 "ResourceNotFoundException" => {
5419 return RusotoError::Service(ScanError::ResourceNotFound(err.msg))
5420 }
5421 "ValidationException" => return RusotoError::Validation(err.msg),
5422 _ => {}
5423 }
5424 }
5425 RusotoError::Unknown(res)
5426 }
5427}
5428impl fmt::Display for ScanError {
5429 #[allow(unused_variables)]
5430 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
5431 match *self {
5432 ScanError::InternalServerError(ref cause) => write!(f, "{}", cause),
5433 ScanError::ProvisionedThroughputExceeded(ref cause) => write!(f, "{}", cause),
5434 ScanError::RequestLimitExceeded(ref cause) => write!(f, "{}", cause),
5435 ScanError::ResourceNotFound(ref cause) => write!(f, "{}", cause),
5436 }
5437 }
5438}
5439impl Error for ScanError {}
5440/// Errors returned by TagResource
5441#[derive(Debug, PartialEq)]
5442pub enum TagResourceError {
5443 /// <p>An error occurred on the server side.</p>
5444 InternalServerError(String),
5445 /// <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 quota of 256 tables.</p>
5446 LimitExceeded(String),
5447 /// <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>
5448 ResourceInUse(String),
5449 /// <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>
5450 ResourceNotFound(String),
5451}
5452
5453impl TagResourceError {
5454 pub fn from_response(res: BufferedHttpResponse) -> RusotoError<TagResourceError> {
5455 if let Some(err) = proto::json::Error::parse(&res) {
5456 match err.typ.as_str() {
5457 "InternalServerError" => {
5458 return RusotoError::Service(TagResourceError::InternalServerError(err.msg))
5459 }
5460 "LimitExceededException" => {
5461 return RusotoError::Service(TagResourceError::LimitExceeded(err.msg))
5462 }
5463 "ResourceInUseException" => {
5464 return RusotoError::Service(TagResourceError::ResourceInUse(err.msg))
5465 }
5466 "ResourceNotFoundException" => {
5467 return RusotoError::Service(TagResourceError::ResourceNotFound(err.msg))
5468 }
5469 "ValidationException" => return RusotoError::Validation(err.msg),
5470 _ => {}
5471 }
5472 }
5473 RusotoError::Unknown(res)
5474 }
5475}
5476impl fmt::Display for TagResourceError {
5477 #[allow(unused_variables)]
5478 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
5479 match *self {
5480 TagResourceError::InternalServerError(ref cause) => write!(f, "{}", cause),
5481 TagResourceError::LimitExceeded(ref cause) => write!(f, "{}", cause),
5482 TagResourceError::ResourceInUse(ref cause) => write!(f, "{}", cause),
5483 TagResourceError::ResourceNotFound(ref cause) => write!(f, "{}", cause),
5484 }
5485 }
5486}
5487impl Error for TagResourceError {}
5488/// Errors returned by TransactGetItems
5489#[derive(Debug, PartialEq)]
5490pub enum TransactGetItemsError {
5491 /// <p>An error occurred on the server side.</p>
5492 InternalServerError(String),
5493 /// <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>
5494 ProvisionedThroughputExceeded(String),
5495 /// <p>Throughput exceeds the current throughput quota for your account. Please contact AWS Support at <a href="https://aws.amazon.com/support">AWS Support</a> to request a quota increase.</p>
5496 RequestLimitExceeded(String),
5497 /// <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>
5498 ResourceNotFound(String),
5499 /// <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>
5500 TransactionCanceled(String),
5501}
5502
5503impl TransactGetItemsError {
5504 pub fn from_response(res: BufferedHttpResponse) -> RusotoError<TransactGetItemsError> {
5505 if let Some(err) = proto::json::Error::parse(&res) {
5506 match err.typ.as_str() {
5507 "InternalServerError" => {
5508 return RusotoError::Service(TransactGetItemsError::InternalServerError(
5509 err.msg,
5510 ))
5511 }
5512 "ProvisionedThroughputExceededException" => {
5513 return RusotoError::Service(
5514 TransactGetItemsError::ProvisionedThroughputExceeded(err.msg),
5515 )
5516 }
5517 "RequestLimitExceeded" => {
5518 return RusotoError::Service(TransactGetItemsError::RequestLimitExceeded(
5519 err.msg,
5520 ))
5521 }
5522 "ResourceNotFoundException" => {
5523 return RusotoError::Service(TransactGetItemsError::ResourceNotFound(err.msg))
5524 }
5525 "TransactionCanceledException" => {
5526 return RusotoError::Service(TransactGetItemsError::TransactionCanceled(
5527 err.msg,
5528 ))
5529 }
5530 "ValidationException" => return RusotoError::Validation(err.msg),
5531 _ => {}
5532 }
5533 }
5534 RusotoError::Unknown(res)
5535 }
5536}
5537impl fmt::Display for TransactGetItemsError {
5538 #[allow(unused_variables)]
5539 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
5540 match *self {
5541 TransactGetItemsError::InternalServerError(ref cause) => write!(f, "{}", cause),
5542 TransactGetItemsError::ProvisionedThroughputExceeded(ref cause) => {
5543 write!(f, "{}", cause)
5544 }
5545 TransactGetItemsError::RequestLimitExceeded(ref cause) => write!(f, "{}", cause),
5546 TransactGetItemsError::ResourceNotFound(ref cause) => write!(f, "{}", cause),
5547 TransactGetItemsError::TransactionCanceled(ref cause) => write!(f, "{}", cause),
5548 }
5549 }
5550}
5551impl Error for TransactGetItemsError {}
5552/// Errors returned by TransactWriteItems
5553#[derive(Debug, PartialEq)]
5554pub enum TransactWriteItemsError {
5555 /// <p>DynamoDB rejected the request because you retried a request with a different payload but with an idempotent token that was already used.</p>
5556 IdempotentParameterMismatch(String),
5557 /// <p>An error occurred on the server side.</p>
5558 InternalServerError(String),
5559 /// <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>
5560 ProvisionedThroughputExceeded(String),
5561 /// <p>Throughput exceeds the current throughput quota for your account. Please contact AWS Support at <a href="https://aws.amazon.com/support">AWS Support</a> to request a quota increase.</p>
5562 RequestLimitExceeded(String),
5563 /// <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>
5564 ResourceNotFound(String),
5565 /// <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>
5566 TransactionCanceled(String),
5567 /// <p>The transaction with the given request token is already in progress.</p>
5568 TransactionInProgress(String),
5569}
5570
5571impl TransactWriteItemsError {
5572 pub fn from_response(res: BufferedHttpResponse) -> RusotoError<TransactWriteItemsError> {
5573 if let Some(err) = proto::json::Error::parse(&res) {
5574 match err.typ.as_str() {
5575 "IdempotentParameterMismatchException" => {
5576 return RusotoError::Service(
5577 TransactWriteItemsError::IdempotentParameterMismatch(err.msg),
5578 )
5579 }
5580 "InternalServerError" => {
5581 return RusotoError::Service(TransactWriteItemsError::InternalServerError(
5582 err.msg,
5583 ))
5584 }
5585 "ProvisionedThroughputExceededException" => {
5586 return RusotoError::Service(
5587 TransactWriteItemsError::ProvisionedThroughputExceeded(err.msg),
5588 )
5589 }
5590 "RequestLimitExceeded" => {
5591 return RusotoError::Service(TransactWriteItemsError::RequestLimitExceeded(
5592 err.msg,
5593 ))
5594 }
5595 "ResourceNotFoundException" => {
5596 return RusotoError::Service(TransactWriteItemsError::ResourceNotFound(err.msg))
5597 }
5598 "TransactionCanceledException" => {
5599 return RusotoError::Service(TransactWriteItemsError::TransactionCanceled(
5600 err.msg,
5601 ))
5602 }
5603 "TransactionInProgressException" => {
5604 return RusotoError::Service(TransactWriteItemsError::TransactionInProgress(
5605 err.msg,
5606 ))
5607 }
5608 "ValidationException" => return RusotoError::Validation(err.msg),
5609 _ => {}
5610 }
5611 }
5612 RusotoError::Unknown(res)
5613 }
5614}
5615impl fmt::Display for TransactWriteItemsError {
5616 #[allow(unused_variables)]
5617 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
5618 match *self {
5619 TransactWriteItemsError::IdempotentParameterMismatch(ref cause) => {
5620 write!(f, "{}", cause)
5621 }
5622 TransactWriteItemsError::InternalServerError(ref cause) => write!(f, "{}", cause),
5623 TransactWriteItemsError::ProvisionedThroughputExceeded(ref cause) => {
5624 write!(f, "{}", cause)
5625 }
5626 TransactWriteItemsError::RequestLimitExceeded(ref cause) => write!(f, "{}", cause),
5627 TransactWriteItemsError::ResourceNotFound(ref cause) => write!(f, "{}", cause),
5628 TransactWriteItemsError::TransactionCanceled(ref cause) => write!(f, "{}", cause),
5629 TransactWriteItemsError::TransactionInProgress(ref cause) => write!(f, "{}", cause),
5630 }
5631 }
5632}
5633impl Error for TransactWriteItemsError {}
5634/// Errors returned by UntagResource
5635#[derive(Debug, PartialEq)]
5636pub enum UntagResourceError {
5637 /// <p>An error occurred on the server side.</p>
5638 InternalServerError(String),
5639 /// <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 quota of 256 tables.</p>
5640 LimitExceeded(String),
5641 /// <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>
5642 ResourceInUse(String),
5643 /// <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>
5644 ResourceNotFound(String),
5645}
5646
5647impl UntagResourceError {
5648 pub fn from_response(res: BufferedHttpResponse) -> RusotoError<UntagResourceError> {
5649 if let Some(err) = proto::json::Error::parse(&res) {
5650 match err.typ.as_str() {
5651 "InternalServerError" => {
5652 return RusotoError::Service(UntagResourceError::InternalServerError(err.msg))
5653 }
5654 "LimitExceededException" => {
5655 return RusotoError::Service(UntagResourceError::LimitExceeded(err.msg))
5656 }
5657 "ResourceInUseException" => {
5658 return RusotoError::Service(UntagResourceError::ResourceInUse(err.msg))
5659 }
5660 "ResourceNotFoundException" => {
5661 return RusotoError::Service(UntagResourceError::ResourceNotFound(err.msg))
5662 }
5663 "ValidationException" => return RusotoError::Validation(err.msg),
5664 _ => {}
5665 }
5666 }
5667 RusotoError::Unknown(res)
5668 }
5669}
5670impl fmt::Display for UntagResourceError {
5671 #[allow(unused_variables)]
5672 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
5673 match *self {
5674 UntagResourceError::InternalServerError(ref cause) => write!(f, "{}", cause),
5675 UntagResourceError::LimitExceeded(ref cause) => write!(f, "{}", cause),
5676 UntagResourceError::ResourceInUse(ref cause) => write!(f, "{}", cause),
5677 UntagResourceError::ResourceNotFound(ref cause) => write!(f, "{}", cause),
5678 }
5679 }
5680}
5681impl Error for UntagResourceError {}
5682/// Errors returned by UpdateContinuousBackups
5683#[derive(Debug, PartialEq)]
5684pub enum UpdateContinuousBackupsError {
5685 /// <p>Backups have not yet been enabled for this table.</p>
5686 ContinuousBackupsUnavailable(String),
5687 /// <p>An error occurred on the server side.</p>
5688 InternalServerError(String),
5689 /// <p>A source table with the name <code>TableName</code> does not currently exist within the subscriber's account.</p>
5690 TableNotFound(String),
5691}
5692
5693impl UpdateContinuousBackupsError {
5694 pub fn from_response(res: BufferedHttpResponse) -> RusotoError<UpdateContinuousBackupsError> {
5695 if let Some(err) = proto::json::Error::parse(&res) {
5696 match err.typ.as_str() {
5697 "ContinuousBackupsUnavailableException" => {
5698 return RusotoError::Service(
5699 UpdateContinuousBackupsError::ContinuousBackupsUnavailable(err.msg),
5700 )
5701 }
5702 "InternalServerError" => {
5703 return RusotoError::Service(UpdateContinuousBackupsError::InternalServerError(
5704 err.msg,
5705 ))
5706 }
5707 "TableNotFoundException" => {
5708 return RusotoError::Service(UpdateContinuousBackupsError::TableNotFound(
5709 err.msg,
5710 ))
5711 }
5712 "ValidationException" => return RusotoError::Validation(err.msg),
5713 _ => {}
5714 }
5715 }
5716 RusotoError::Unknown(res)
5717 }
5718}
5719impl fmt::Display for UpdateContinuousBackupsError {
5720 #[allow(unused_variables)]
5721 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
5722 match *self {
5723 UpdateContinuousBackupsError::ContinuousBackupsUnavailable(ref cause) => {
5724 write!(f, "{}", cause)
5725 }
5726 UpdateContinuousBackupsError::InternalServerError(ref cause) => write!(f, "{}", cause),
5727 UpdateContinuousBackupsError::TableNotFound(ref cause) => write!(f, "{}", cause),
5728 }
5729 }
5730}
5731impl Error for UpdateContinuousBackupsError {}
5732/// Errors returned by UpdateContributorInsights
5733#[derive(Debug, PartialEq)]
5734pub enum UpdateContributorInsightsError {
5735 /// <p>An error occurred on the server side.</p>
5736 InternalServerError(String),
5737 /// <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>
5738 ResourceNotFound(String),
5739}
5740
5741impl UpdateContributorInsightsError {
5742 pub fn from_response(res: BufferedHttpResponse) -> RusotoError<UpdateContributorInsightsError> {
5743 if let Some(err) = proto::json::Error::parse(&res) {
5744 match err.typ.as_str() {
5745 "InternalServerError" => {
5746 return RusotoError::Service(
5747 UpdateContributorInsightsError::InternalServerError(err.msg),
5748 )
5749 }
5750 "ResourceNotFoundException" => {
5751 return RusotoError::Service(UpdateContributorInsightsError::ResourceNotFound(
5752 err.msg,
5753 ))
5754 }
5755 "ValidationException" => return RusotoError::Validation(err.msg),
5756 _ => {}
5757 }
5758 }
5759 RusotoError::Unknown(res)
5760 }
5761}
5762impl fmt::Display for UpdateContributorInsightsError {
5763 #[allow(unused_variables)]
5764 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
5765 match *self {
5766 UpdateContributorInsightsError::InternalServerError(ref cause) => {
5767 write!(f, "{}", cause)
5768 }
5769 UpdateContributorInsightsError::ResourceNotFound(ref cause) => write!(f, "{}", cause),
5770 }
5771 }
5772}
5773impl Error for UpdateContributorInsightsError {}
5774/// Errors returned by UpdateGlobalTable
5775#[derive(Debug, PartialEq)]
5776pub enum UpdateGlobalTableError {
5777 /// <p>The specified global table does not exist.</p>
5778 GlobalTableNotFound(String),
5779 /// <p>An error occurred on the server side.</p>
5780 InternalServerError(String),
5781 /// <p>The specified replica is already part of the global table.</p>
5782 ReplicaAlreadyExists(String),
5783 /// <p>The specified replica is no longer part of the global table.</p>
5784 ReplicaNotFound(String),
5785 /// <p>A source table with the name <code>TableName</code> does not currently exist within the subscriber's account.</p>
5786 TableNotFound(String),
5787}
5788
5789impl UpdateGlobalTableError {
5790 pub fn from_response(res: BufferedHttpResponse) -> RusotoError<UpdateGlobalTableError> {
5791 if let Some(err) = proto::json::Error::parse(&res) {
5792 match err.typ.as_str() {
5793 "GlobalTableNotFoundException" => {
5794 return RusotoError::Service(UpdateGlobalTableError::GlobalTableNotFound(
5795 err.msg,
5796 ))
5797 }
5798 "InternalServerError" => {
5799 return RusotoError::Service(UpdateGlobalTableError::InternalServerError(
5800 err.msg,
5801 ))
5802 }
5803 "ReplicaAlreadyExistsException" => {
5804 return RusotoError::Service(UpdateGlobalTableError::ReplicaAlreadyExists(
5805 err.msg,
5806 ))
5807 }
5808 "ReplicaNotFoundException" => {
5809 return RusotoError::Service(UpdateGlobalTableError::ReplicaNotFound(err.msg))
5810 }
5811 "TableNotFoundException" => {
5812 return RusotoError::Service(UpdateGlobalTableError::TableNotFound(err.msg))
5813 }
5814 "ValidationException" => return RusotoError::Validation(err.msg),
5815 _ => {}
5816 }
5817 }
5818 RusotoError::Unknown(res)
5819 }
5820}
5821impl fmt::Display for UpdateGlobalTableError {
5822 #[allow(unused_variables)]
5823 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
5824 match *self {
5825 UpdateGlobalTableError::GlobalTableNotFound(ref cause) => write!(f, "{}", cause),
5826 UpdateGlobalTableError::InternalServerError(ref cause) => write!(f, "{}", cause),
5827 UpdateGlobalTableError::ReplicaAlreadyExists(ref cause) => write!(f, "{}", cause),
5828 UpdateGlobalTableError::ReplicaNotFound(ref cause) => write!(f, "{}", cause),
5829 UpdateGlobalTableError::TableNotFound(ref cause) => write!(f, "{}", cause),
5830 }
5831 }
5832}
5833impl Error for UpdateGlobalTableError {}
5834/// Errors returned by UpdateGlobalTableSettings
5835#[derive(Debug, PartialEq)]
5836pub enum UpdateGlobalTableSettingsError {
5837 /// <p>The specified global table does not exist.</p>
5838 GlobalTableNotFound(String),
5839 /// <p>The operation tried to access a nonexistent index.</p>
5840 IndexNotFound(String),
5841 /// <p>An error occurred on the server side.</p>
5842 InternalServerError(String),
5843 /// <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 quota of 256 tables.</p>
5844 LimitExceeded(String),
5845 /// <p>The specified replica is no longer part of the global table.</p>
5846 ReplicaNotFound(String),
5847 /// <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>
5848 ResourceInUse(String),
5849}
5850
5851impl UpdateGlobalTableSettingsError {
5852 pub fn from_response(res: BufferedHttpResponse) -> RusotoError<UpdateGlobalTableSettingsError> {
5853 if let Some(err) = proto::json::Error::parse(&res) {
5854 match err.typ.as_str() {
5855 "GlobalTableNotFoundException" => {
5856 return RusotoError::Service(
5857 UpdateGlobalTableSettingsError::GlobalTableNotFound(err.msg),
5858 )
5859 }
5860 "IndexNotFoundException" => {
5861 return RusotoError::Service(UpdateGlobalTableSettingsError::IndexNotFound(
5862 err.msg,
5863 ))
5864 }
5865 "InternalServerError" => {
5866 return RusotoError::Service(
5867 UpdateGlobalTableSettingsError::InternalServerError(err.msg),
5868 )
5869 }
5870 "LimitExceededException" => {
5871 return RusotoError::Service(UpdateGlobalTableSettingsError::LimitExceeded(
5872 err.msg,
5873 ))
5874 }
5875 "ReplicaNotFoundException" => {
5876 return RusotoError::Service(UpdateGlobalTableSettingsError::ReplicaNotFound(
5877 err.msg,
5878 ))
5879 }
5880 "ResourceInUseException" => {
5881 return RusotoError::Service(UpdateGlobalTableSettingsError::ResourceInUse(
5882 err.msg,
5883 ))
5884 }
5885 "ValidationException" => return RusotoError::Validation(err.msg),
5886 _ => {}
5887 }
5888 }
5889 RusotoError::Unknown(res)
5890 }
5891}
5892impl fmt::Display for UpdateGlobalTableSettingsError {
5893 #[allow(unused_variables)]
5894 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
5895 match *self {
5896 UpdateGlobalTableSettingsError::GlobalTableNotFound(ref cause) => {
5897 write!(f, "{}", cause)
5898 }
5899 UpdateGlobalTableSettingsError::IndexNotFound(ref cause) => write!(f, "{}", cause),
5900 UpdateGlobalTableSettingsError::InternalServerError(ref cause) => {
5901 write!(f, "{}", cause)
5902 }
5903 UpdateGlobalTableSettingsError::LimitExceeded(ref cause) => write!(f, "{}", cause),
5904 UpdateGlobalTableSettingsError::ReplicaNotFound(ref cause) => write!(f, "{}", cause),
5905 UpdateGlobalTableSettingsError::ResourceInUse(ref cause) => write!(f, "{}", cause),
5906 }
5907 }
5908}
5909impl Error for UpdateGlobalTableSettingsError {}
5910/// Errors returned by UpdateItem
5911#[derive(Debug, PartialEq)]
5912pub enum UpdateItemError {
5913 /// <p>A condition specified in the operation could not be evaluated.</p>
5914 ConditionalCheckFailed(String),
5915 /// <p>An error occurred on the server side.</p>
5916 InternalServerError(String),
5917 /// <p>An item collection is too large. This exception is only returned for tables that have one or more local secondary indexes.</p>
5918 ItemCollectionSizeLimitExceeded(String),
5919 /// <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>
5920 ProvisionedThroughputExceeded(String),
5921 /// <p>Throughput exceeds the current throughput quota for your account. Please contact AWS Support at <a href="https://aws.amazon.com/support">AWS Support</a> to request a quota increase.</p>
5922 RequestLimitExceeded(String),
5923 /// <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>
5924 ResourceNotFound(String),
5925 /// <p>Operation was rejected because there is an ongoing transaction for the item.</p>
5926 TransactionConflict(String),
5927}
5928
5929impl UpdateItemError {
5930 pub fn from_response(res: BufferedHttpResponse) -> RusotoError<UpdateItemError> {
5931 if let Some(err) = proto::json::Error::parse(&res) {
5932 match err.typ.as_str() {
5933 "ConditionalCheckFailedException" => {
5934 return RusotoError::Service(UpdateItemError::ConditionalCheckFailed(err.msg))
5935 }
5936 "InternalServerError" => {
5937 return RusotoError::Service(UpdateItemError::InternalServerError(err.msg))
5938 }
5939 "ItemCollectionSizeLimitExceededException" => {
5940 return RusotoError::Service(UpdateItemError::ItemCollectionSizeLimitExceeded(
5941 err.msg,
5942 ))
5943 }
5944 "ProvisionedThroughputExceededException" => {
5945 return RusotoError::Service(UpdateItemError::ProvisionedThroughputExceeded(
5946 err.msg,
5947 ))
5948 }
5949 "RequestLimitExceeded" => {
5950 return RusotoError::Service(UpdateItemError::RequestLimitExceeded(err.msg))
5951 }
5952 "ResourceNotFoundException" => {
5953 return RusotoError::Service(UpdateItemError::ResourceNotFound(err.msg))
5954 }
5955 "TransactionConflictException" => {
5956 return RusotoError::Service(UpdateItemError::TransactionConflict(err.msg))
5957 }
5958 "ValidationException" => return RusotoError::Validation(err.msg),
5959 _ => {}
5960 }
5961 }
5962 RusotoError::Unknown(res)
5963 }
5964}
5965impl fmt::Display for UpdateItemError {
5966 #[allow(unused_variables)]
5967 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
5968 match *self {
5969 UpdateItemError::ConditionalCheckFailed(ref cause) => write!(f, "{}", cause),
5970 UpdateItemError::InternalServerError(ref cause) => write!(f, "{}", cause),
5971 UpdateItemError::ItemCollectionSizeLimitExceeded(ref cause) => write!(f, "{}", cause),
5972 UpdateItemError::ProvisionedThroughputExceeded(ref cause) => write!(f, "{}", cause),
5973 UpdateItemError::RequestLimitExceeded(ref cause) => write!(f, "{}", cause),
5974 UpdateItemError::ResourceNotFound(ref cause) => write!(f, "{}", cause),
5975 UpdateItemError::TransactionConflict(ref cause) => write!(f, "{}", cause),
5976 }
5977 }
5978}
5979impl Error for UpdateItemError {}
5980/// Errors returned by UpdateTable
5981#[derive(Debug, PartialEq)]
5982pub enum UpdateTableError {
5983 /// <p>An error occurred on the server side.</p>
5984 InternalServerError(String),
5985 /// <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 quota of 256 tables.</p>
5986 LimitExceeded(String),
5987 /// <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>
5988 ResourceInUse(String),
5989 /// <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>
5990 ResourceNotFound(String),
5991}
5992
5993impl UpdateTableError {
5994 pub fn from_response(res: BufferedHttpResponse) -> RusotoError<UpdateTableError> {
5995 if let Some(err) = proto::json::Error::parse(&res) {
5996 match err.typ.as_str() {
5997 "InternalServerError" => {
5998 return RusotoError::Service(UpdateTableError::InternalServerError(err.msg))
5999 }
6000 "LimitExceededException" => {
6001 return RusotoError::Service(UpdateTableError::LimitExceeded(err.msg))
6002 }
6003 "ResourceInUseException" => {
6004 return RusotoError::Service(UpdateTableError::ResourceInUse(err.msg))
6005 }
6006 "ResourceNotFoundException" => {
6007 return RusotoError::Service(UpdateTableError::ResourceNotFound(err.msg))
6008 }
6009 "ValidationException" => return RusotoError::Validation(err.msg),
6010 _ => {}
6011 }
6012 }
6013 RusotoError::Unknown(res)
6014 }
6015}
6016impl fmt::Display for UpdateTableError {
6017 #[allow(unused_variables)]
6018 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
6019 match *self {
6020 UpdateTableError::InternalServerError(ref cause) => write!(f, "{}", cause),
6021 UpdateTableError::LimitExceeded(ref cause) => write!(f, "{}", cause),
6022 UpdateTableError::ResourceInUse(ref cause) => write!(f, "{}", cause),
6023 UpdateTableError::ResourceNotFound(ref cause) => write!(f, "{}", cause),
6024 }
6025 }
6026}
6027impl Error for UpdateTableError {}
6028/// Errors returned by UpdateTableReplicaAutoScaling
6029#[derive(Debug, PartialEq)]
6030pub enum UpdateTableReplicaAutoScalingError {
6031 /// <p>An error occurred on the server side.</p>
6032 InternalServerError(String),
6033 /// <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 quota of 256 tables.</p>
6034 LimitExceeded(String),
6035 /// <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>
6036 ResourceInUse(String),
6037 /// <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>
6038 ResourceNotFound(String),
6039}
6040
6041impl UpdateTableReplicaAutoScalingError {
6042 pub fn from_response(
6043 res: BufferedHttpResponse,
6044 ) -> RusotoError<UpdateTableReplicaAutoScalingError> {
6045 if let Some(err) = proto::json::Error::parse(&res) {
6046 match err.typ.as_str() {
6047 "InternalServerError" => {
6048 return RusotoError::Service(
6049 UpdateTableReplicaAutoScalingError::InternalServerError(err.msg),
6050 )
6051 }
6052 "LimitExceededException" => {
6053 return RusotoError::Service(UpdateTableReplicaAutoScalingError::LimitExceeded(
6054 err.msg,
6055 ))
6056 }
6057 "ResourceInUseException" => {
6058 return RusotoError::Service(UpdateTableReplicaAutoScalingError::ResourceInUse(
6059 err.msg,
6060 ))
6061 }
6062 "ResourceNotFoundException" => {
6063 return RusotoError::Service(
6064 UpdateTableReplicaAutoScalingError::ResourceNotFound(err.msg),
6065 )
6066 }
6067 "ValidationException" => return RusotoError::Validation(err.msg),
6068 _ => {}
6069 }
6070 }
6071 RusotoError::Unknown(res)
6072 }
6073}
6074impl fmt::Display for UpdateTableReplicaAutoScalingError {
6075 #[allow(unused_variables)]
6076 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
6077 match *self {
6078 UpdateTableReplicaAutoScalingError::InternalServerError(ref cause) => {
6079 write!(f, "{}", cause)
6080 }
6081 UpdateTableReplicaAutoScalingError::LimitExceeded(ref cause) => write!(f, "{}", cause),
6082 UpdateTableReplicaAutoScalingError::ResourceInUse(ref cause) => write!(f, "{}", cause),
6083 UpdateTableReplicaAutoScalingError::ResourceNotFound(ref cause) => {
6084 write!(f, "{}", cause)
6085 }
6086 }
6087 }
6088}
6089impl Error for UpdateTableReplicaAutoScalingError {}
6090/// Errors returned by UpdateTimeToLive
6091#[derive(Debug, PartialEq)]
6092pub enum UpdateTimeToLiveError {
6093 /// <p>An error occurred on the server side.</p>
6094 InternalServerError(String),
6095 /// <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 quota of 256 tables.</p>
6096 LimitExceeded(String),
6097 /// <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>
6098 ResourceInUse(String),
6099 /// <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>
6100 ResourceNotFound(String),
6101}
6102
6103impl UpdateTimeToLiveError {
6104 pub fn from_response(res: BufferedHttpResponse) -> RusotoError<UpdateTimeToLiveError> {
6105 if let Some(err) = proto::json::Error::parse(&res) {
6106 match err.typ.as_str() {
6107 "InternalServerError" => {
6108 return RusotoError::Service(UpdateTimeToLiveError::InternalServerError(
6109 err.msg,
6110 ))
6111 }
6112 "LimitExceededException" => {
6113 return RusotoError::Service(UpdateTimeToLiveError::LimitExceeded(err.msg))
6114 }
6115 "ResourceInUseException" => {
6116 return RusotoError::Service(UpdateTimeToLiveError::ResourceInUse(err.msg))
6117 }
6118 "ResourceNotFoundException" => {
6119 return RusotoError::Service(UpdateTimeToLiveError::ResourceNotFound(err.msg))
6120 }
6121 "ValidationException" => return RusotoError::Validation(err.msg),
6122 _ => {}
6123 }
6124 }
6125 RusotoError::Unknown(res)
6126 }
6127}
6128impl fmt::Display for UpdateTimeToLiveError {
6129 #[allow(unused_variables)]
6130 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
6131 match *self {
6132 UpdateTimeToLiveError::InternalServerError(ref cause) => write!(f, "{}", cause),
6133 UpdateTimeToLiveError::LimitExceeded(ref cause) => write!(f, "{}", cause),
6134 UpdateTimeToLiveError::ResourceInUse(ref cause) => write!(f, "{}", cause),
6135 UpdateTimeToLiveError::ResourceNotFound(ref cause) => write!(f, "{}", cause),
6136 }
6137 }
6138}
6139impl Error for UpdateTimeToLiveError {}
6140/// Trait representing the capabilities of the DynamoDB API. DynamoDB clients implement this trait.
6141#[async_trait]
6142pub trait DynamoDb {
6143 /// <p> This operation allows you to perform batch reads and writes on data stored in DynamoDB, using PartiQL. </p>
6144 async fn batch_execute_statement(
6145 &self,
6146 input: BatchExecuteStatementInput,
6147 ) -> Result<BatchExecuteStatementOutput, RusotoError<BatchExecuteStatementError>>;
6148
6149 /// <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>
6150 async fn batch_get_item(
6151 &self,
6152 input: BatchGetItemInput,
6153 ) -> Result<BatchGetItemOutput, RusotoError<BatchGetItemError>>;
6154
6155 /// <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>
6156 async fn batch_write_item(
6157 &self,
6158 input: BatchWriteItemInput,
6159 ) -> Result<BatchWriteItemOutput, RusotoError<BatchWriteItemError>>;
6160
6161 /// <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>
6162 async fn create_backup(
6163 &self,
6164 input: CreateBackupInput,
6165 ) -> Result<CreateBackupOutput, RusotoError<CreateBackupError>>;
6166
6167 /// <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>
6168 async fn create_global_table(
6169 &self,
6170 input: CreateGlobalTableInput,
6171 ) -> Result<CreateGlobalTableOutput, RusotoError<CreateGlobalTableError>>;
6172
6173 /// <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>
6174 async fn create_table(
6175 &self,
6176 input: CreateTableInput,
6177 ) -> Result<CreateTableOutput, RusotoError<CreateTableError>>;
6178
6179 /// <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>
6180 async fn delete_backup(
6181 &self,
6182 input: DeleteBackupInput,
6183 ) -> Result<DeleteBackupOutput, RusotoError<DeleteBackupError>>;
6184
6185 /// <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>
6186 async fn delete_item(
6187 &self,
6188 input: DeleteItemInput,
6189 ) -> Result<DeleteItemOutput, RusotoError<DeleteItemError>>;
6190
6191 /// <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>
6192 async fn delete_table(
6193 &self,
6194 input: DeleteTableInput,
6195 ) -> Result<DeleteTableOutput, RusotoError<DeleteTableError>>;
6196
6197 /// <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>
6198 async fn describe_backup(
6199 &self,
6200 input: DescribeBackupInput,
6201 ) -> Result<DescribeBackupOutput, RusotoError<DescribeBackupError>>;
6202
6203 /// <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>
6204 async fn describe_continuous_backups(
6205 &self,
6206 input: DescribeContinuousBackupsInput,
6207 ) -> Result<DescribeContinuousBackupsOutput, RusotoError<DescribeContinuousBackupsError>>;
6208
6209 /// <p>Returns information about contributor insights, for a given table or global secondary index.</p>
6210 async fn describe_contributor_insights(
6211 &self,
6212 input: DescribeContributorInsightsInput,
6213 ) -> Result<DescribeContributorInsightsOutput, RusotoError<DescribeContributorInsightsError>>;
6214
6215 /// <p>Returns the regional endpoint information.</p>
6216 async fn describe_endpoints(
6217 &self,
6218 ) -> Result<DescribeEndpointsResponse, RusotoError<DescribeEndpointsError>>;
6219
6220 /// <p>Describes an existing table export.</p>
6221 async fn describe_export(
6222 &self,
6223 input: DescribeExportInput,
6224 ) -> Result<DescribeExportOutput, RusotoError<DescribeExportError>>;
6225
6226 /// <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>
6227 async fn describe_global_table(
6228 &self,
6229 input: DescribeGlobalTableInput,
6230 ) -> Result<DescribeGlobalTableOutput, RusotoError<DescribeGlobalTableError>>;
6231
6232 /// <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>
6233 async fn describe_global_table_settings(
6234 &self,
6235 input: DescribeGlobalTableSettingsInput,
6236 ) -> Result<DescribeGlobalTableSettingsOutput, RusotoError<DescribeGlobalTableSettingsError>>;
6237
6238 /// <p>Returns information about the status of Kinesis streaming.</p>
6239 async fn describe_kinesis_streaming_destination(
6240 &self,
6241 input: DescribeKinesisStreamingDestinationInput,
6242 ) -> Result<
6243 DescribeKinesisStreamingDestinationOutput,
6244 RusotoError<DescribeKinesisStreamingDestinationError>,
6245 >;
6246
6247 /// <p>Returns the current provisioned-capacity quotas 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 quotas 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 quotas that apply when you create a table there. For more information, see <a href="https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Limits.html">Service, Account, and Table Quotas</a> page in the <i>Amazon DynamoDB Developer Guide</i>.</p> <p>Although you can increase these quotas 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 quotas imposed by your account so that you have enough time to apply for an increase before you hit a quota.</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 quotas 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 quotas 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 quotas.</p> <p>The per-table quotas 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 quota that applies is that the aggregate provisioned capacity over all your tables and GSIs cannot exceed either of the per-account quotas.</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>
6248 async fn describe_limits(
6249 &self,
6250 ) -> Result<DescribeLimitsOutput, RusotoError<DescribeLimitsError>>;
6251
6252 /// <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>
6253 async fn describe_table(
6254 &self,
6255 input: DescribeTableInput,
6256 ) -> Result<DescribeTableOutput, RusotoError<DescribeTableError>>;
6257
6258 /// <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>
6259 async fn describe_table_replica_auto_scaling(
6260 &self,
6261 input: DescribeTableReplicaAutoScalingInput,
6262 ) -> Result<
6263 DescribeTableReplicaAutoScalingOutput,
6264 RusotoError<DescribeTableReplicaAutoScalingError>,
6265 >;
6266
6267 /// <p>Gives a description of the Time to Live (TTL) status on the specified table. </p>
6268 async fn describe_time_to_live(
6269 &self,
6270 input: DescribeTimeToLiveInput,
6271 ) -> Result<DescribeTimeToLiveOutput, RusotoError<DescribeTimeToLiveError>>;
6272
6273 /// <p>Stops replication from the DynamoDB table to the Kinesis data stream. This is done without deleting either of the resources.</p>
6274 async fn disable_kinesis_streaming_destination(
6275 &self,
6276 input: KinesisStreamingDestinationInput,
6277 ) -> Result<
6278 KinesisStreamingDestinationOutput,
6279 RusotoError<DisableKinesisStreamingDestinationError>,
6280 >;
6281
6282 /// <p>Starts table data replication to the specified Kinesis data stream at a timestamp chosen during the enable workflow. If this operation doesn't return results immediately, use DescribeKinesisStreamingDestination to check if streaming to the Kinesis data stream is ACTIVE.</p>
6283 async fn enable_kinesis_streaming_destination(
6284 &self,
6285 input: KinesisStreamingDestinationInput,
6286 ) -> Result<
6287 KinesisStreamingDestinationOutput,
6288 RusotoError<EnableKinesisStreamingDestinationError>,
6289 >;
6290
6291 /// <p> This operation allows you to perform reads and singleton writes on data stored in DynamoDB, using PartiQL. </p>
6292 async fn execute_statement(
6293 &self,
6294 input: ExecuteStatementInput,
6295 ) -> Result<ExecuteStatementOutput, RusotoError<ExecuteStatementError>>;
6296
6297 /// <p> This operation allows you to perform transactional reads or writes on data stored in DynamoDB, using PartiQL. </p>
6298 async fn execute_transaction(
6299 &self,
6300 input: ExecuteTransactionInput,
6301 ) -> Result<ExecuteTransactionOutput, RusotoError<ExecuteTransactionError>>;
6302
6303 /// <p>Exports table data to an S3 bucket. The table must have point in time recovery enabled, and you can export data from any time within the point in time recovery window.</p>
6304 async fn export_table_to_point_in_time(
6305 &self,
6306 input: ExportTableToPointInTimeInput,
6307 ) -> Result<ExportTableToPointInTimeOutput, RusotoError<ExportTableToPointInTimeError>>;
6308
6309 /// <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>
6310 async fn get_item(
6311 &self,
6312 input: GetItemInput,
6313 ) -> Result<GetItemOutput, RusotoError<GetItemError>>;
6314
6315 /// <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 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 boundaries 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>
6316 async fn list_backups(
6317 &self,
6318 input: ListBackupsInput,
6319 ) -> Result<ListBackupsOutput, RusotoError<ListBackupsError>>;
6320
6321 /// <p>Returns a list of ContributorInsightsSummary for a table and all its global secondary indexes.</p>
6322 async fn list_contributor_insights(
6323 &self,
6324 input: ListContributorInsightsInput,
6325 ) -> Result<ListContributorInsightsOutput, RusotoError<ListContributorInsightsError>>;
6326
6327 /// <p>Lists completed exports within the past 90 days.</p>
6328 async fn list_exports(
6329 &self,
6330 input: ListExportsInput,
6331 ) -> Result<ListExportsOutput, RusotoError<ListExportsError>>;
6332
6333 /// <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>
6334 async fn list_global_tables(
6335 &self,
6336 input: ListGlobalTablesInput,
6337 ) -> Result<ListGlobalTablesOutput, RusotoError<ListGlobalTablesError>>;
6338
6339 /// <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>
6340 async fn list_tables(
6341 &self,
6342 input: ListTablesInput,
6343 ) -> Result<ListTablesOutput, RusotoError<ListTablesError>>;
6344
6345 /// <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>
6346 async fn list_tags_of_resource(
6347 &self,
6348 input: ListTagsOfResourceInput,
6349 ) -> Result<ListTagsOfResourceOutput, RusotoError<ListTagsOfResourceError>>;
6350
6351 /// <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>
6352 async fn put_item(
6353 &self,
6354 input: PutItemInput,
6355 ) -> Result<PutItemOutput, RusotoError<PutItemError>>;
6356
6357 /// <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>
6358 async fn query(&self, input: QueryInput) -> Result<QueryOutput, RusotoError<QueryError>>;
6359
6360 /// <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>
6361 async fn restore_table_from_backup(
6362 &self,
6363 input: RestoreTableFromBackupInput,
6364 ) -> Result<RestoreTableFromBackupOutput, RusotoError<RestoreTableFromBackupError>>;
6365
6366 /// <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>
6367 async fn restore_table_to_point_in_time(
6368 &self,
6369 input: RestoreTableToPointInTimeInput,
6370 ) -> Result<RestoreTableToPointInTimeOutput, RusotoError<RestoreTableToPointInTimeError>>;
6371
6372 /// <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>
6373 async fn scan(&self, input: ScanInput) -> Result<ScanOutput, RusotoError<ScanError>>;
6374
6375 /// <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>
6376 async fn tag_resource(
6377 &self,
6378 input: TagResourceInput,
6379 ) -> Result<(), RusotoError<TagResourceError>>;
6380
6381 /// <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>
6382 async fn transact_get_items(
6383 &self,
6384 input: TransactGetItemsInput,
6385 ) -> Result<TransactGetItemsOutput, RusotoError<TransactGetItemsError>>;
6386
6387 /// <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>
6388 async fn transact_write_items(
6389 &self,
6390 input: TransactWriteItemsInput,
6391 ) -> Result<TransactWriteItemsOutput, RusotoError<TransactWriteItemsError>>;
6392
6393 /// <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>
6394 async fn untag_resource(
6395 &self,
6396 input: UntagResourceInput,
6397 ) -> Result<(), RusotoError<UntagResourceError>>;
6398
6399 /// <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>
6400 async fn update_continuous_backups(
6401 &self,
6402 input: UpdateContinuousBackupsInput,
6403 ) -> Result<UpdateContinuousBackupsOutput, RusotoError<UpdateContinuousBackupsError>>;
6404
6405 /// <p>Updates the status for contributor insights for a specific table or index.</p>
6406 async fn update_contributor_insights(
6407 &self,
6408 input: UpdateContributorInsightsInput,
6409 ) -> Result<UpdateContributorInsightsOutput, RusotoError<UpdateContributorInsightsError>>;
6410
6411 /// <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>
6412 async fn update_global_table(
6413 &self,
6414 input: UpdateGlobalTableInput,
6415 ) -> Result<UpdateGlobalTableOutput, RusotoError<UpdateGlobalTableError>>;
6416
6417 /// <p>Updates settings for a global table.</p>
6418 async fn update_global_table_settings(
6419 &self,
6420 input: UpdateGlobalTableSettingsInput,
6421 ) -> Result<UpdateGlobalTableSettingsOutput, RusotoError<UpdateGlobalTableSettingsError>>;
6422
6423 /// <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>
6424 async fn update_item(
6425 &self,
6426 input: UpdateItemInput,
6427 ) -> Result<UpdateItemOutput, RusotoError<UpdateItemError>>;
6428
6429 /// <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>
6430 async fn update_table(
6431 &self,
6432 input: UpdateTableInput,
6433 ) -> Result<UpdateTableOutput, RusotoError<UpdateTableError>>;
6434
6435 /// <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>
6436 async fn update_table_replica_auto_scaling(
6437 &self,
6438 input: UpdateTableReplicaAutoScalingInput,
6439 ) -> Result<UpdateTableReplicaAutoScalingOutput, RusotoError<UpdateTableReplicaAutoScalingError>>;
6440
6441 /// <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>
6442 async fn update_time_to_live(
6443 &self,
6444 input: UpdateTimeToLiveInput,
6445 ) -> Result<UpdateTimeToLiveOutput, RusotoError<UpdateTimeToLiveError>>;
6446}
6447/// A client for the DynamoDB API.
6448#[derive(Clone)]
6449pub struct DynamoDbClient {
6450 client: Client,
6451 region: region::Region,
6452}
6453
6454impl DynamoDbClient {
6455 /// Creates a client backed by the default tokio event loop.
6456 ///
6457 /// The client will use the default credentials provider and tls client.
6458 pub fn new(region: region::Region) -> DynamoDbClient {
6459 DynamoDbClient {
6460 client: Client::shared(),
6461 region,
6462 }
6463 }
6464
6465 pub fn new_with<P, D>(
6466 request_dispatcher: D,
6467 credentials_provider: P,
6468 region: region::Region,
6469 ) -> DynamoDbClient
6470 where
6471 P: ProvideAwsCredentials + Send + Sync + 'static,
6472 D: DispatchSignedRequest + Send + Sync + 'static,
6473 {
6474 DynamoDbClient {
6475 client: Client::new_with(credentials_provider, request_dispatcher),
6476 region,
6477 }
6478 }
6479
6480 pub fn new_with_client(client: Client, region: region::Region) -> DynamoDbClient {
6481 DynamoDbClient { client, region }
6482 }
6483}
6484
6485#[async_trait]
6486impl DynamoDb for DynamoDbClient {
6487 /// <p> This operation allows you to perform batch reads and writes on data stored in DynamoDB, using PartiQL. </p>
6488 async fn batch_execute_statement(
6489 &self,
6490 input: BatchExecuteStatementInput,
6491 ) -> Result<BatchExecuteStatementOutput, RusotoError<BatchExecuteStatementError>> {
6492 let mut request = self.new_signed_request("POST", "/");
6493 request.add_header("x-amz-target", "DynamoDB_20120810.BatchExecuteStatement");
6494 let encoded = serde_json::to_string(&input).unwrap();
6495 request.set_payload(Some(encoded));
6496
6497 let response = self
6498 .sign_and_dispatch(request, BatchExecuteStatementError::from_response)
6499 .await?;
6500 let mut response = response;
6501 let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
6502 proto::json::ResponsePayload::new(&response).deserialize::<BatchExecuteStatementOutput, _>()
6503 }
6504
6505 /// <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>
6506 async fn batch_get_item(
6507 &self,
6508 input: BatchGetItemInput,
6509 ) -> Result<BatchGetItemOutput, RusotoError<BatchGetItemError>> {
6510 let mut request = self.new_signed_request("POST", "/");
6511 request.add_header("x-amz-target", "DynamoDB_20120810.BatchGetItem");
6512 let encoded = serde_json::to_string(&input).unwrap();
6513 request.set_payload(Some(encoded));
6514
6515 let response = self
6516 .sign_and_dispatch(request, BatchGetItemError::from_response)
6517 .await?;
6518 let mut response = response;
6519 let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
6520 proto::json::ResponsePayload::new(&response).deserialize::<BatchGetItemOutput, _>()
6521 }
6522
6523 /// <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>
6524 async fn batch_write_item(
6525 &self,
6526 input: BatchWriteItemInput,
6527 ) -> Result<BatchWriteItemOutput, RusotoError<BatchWriteItemError>> {
6528 let mut request = self.new_signed_request("POST", "/");
6529 request.add_header("x-amz-target", "DynamoDB_20120810.BatchWriteItem");
6530 let encoded = serde_json::to_string(&input).unwrap();
6531 request.set_payload(Some(encoded));
6532
6533 let response = self
6534 .sign_and_dispatch(request, BatchWriteItemError::from_response)
6535 .await?;
6536 let mut response = response;
6537 let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
6538 proto::json::ResponsePayload::new(&response).deserialize::<BatchWriteItemOutput, _>()
6539 }
6540
6541 /// <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>
6542 async fn create_backup(
6543 &self,
6544 input: CreateBackupInput,
6545 ) -> Result<CreateBackupOutput, RusotoError<CreateBackupError>> {
6546 let mut request = self.new_signed_request("POST", "/");
6547 request.add_header("x-amz-target", "DynamoDB_20120810.CreateBackup");
6548 let encoded = serde_json::to_string(&input).unwrap();
6549 request.set_payload(Some(encoded));
6550
6551 let response = self
6552 .sign_and_dispatch(request, CreateBackupError::from_response)
6553 .await?;
6554 let mut response = response;
6555 let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
6556 proto::json::ResponsePayload::new(&response).deserialize::<CreateBackupOutput, _>()
6557 }
6558
6559 /// <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>
6560 async fn create_global_table(
6561 &self,
6562 input: CreateGlobalTableInput,
6563 ) -> Result<CreateGlobalTableOutput, RusotoError<CreateGlobalTableError>> {
6564 let mut request = self.new_signed_request("POST", "/");
6565 request.add_header("x-amz-target", "DynamoDB_20120810.CreateGlobalTable");
6566 let encoded = serde_json::to_string(&input).unwrap();
6567 request.set_payload(Some(encoded));
6568
6569 let response = self
6570 .sign_and_dispatch(request, CreateGlobalTableError::from_response)
6571 .await?;
6572 let mut response = response;
6573 let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
6574 proto::json::ResponsePayload::new(&response).deserialize::<CreateGlobalTableOutput, _>()
6575 }
6576
6577 /// <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>
6578 async fn create_table(
6579 &self,
6580 input: CreateTableInput,
6581 ) -> Result<CreateTableOutput, RusotoError<CreateTableError>> {
6582 let mut request = self.new_signed_request("POST", "/");
6583 request.add_header("x-amz-target", "DynamoDB_20120810.CreateTable");
6584 let encoded = serde_json::to_string(&input).unwrap();
6585 request.set_payload(Some(encoded));
6586
6587 let response = self
6588 .sign_and_dispatch(request, CreateTableError::from_response)
6589 .await?;
6590 let mut response = response;
6591 let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
6592 proto::json::ResponsePayload::new(&response).deserialize::<CreateTableOutput, _>()
6593 }
6594
6595 /// <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>
6596 async fn delete_backup(
6597 &self,
6598 input: DeleteBackupInput,
6599 ) -> Result<DeleteBackupOutput, RusotoError<DeleteBackupError>> {
6600 let mut request = self.new_signed_request("POST", "/");
6601 request.add_header("x-amz-target", "DynamoDB_20120810.DeleteBackup");
6602 let encoded = serde_json::to_string(&input).unwrap();
6603 request.set_payload(Some(encoded));
6604
6605 let response = self
6606 .sign_and_dispatch(request, DeleteBackupError::from_response)
6607 .await?;
6608 let mut response = response;
6609 let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
6610 proto::json::ResponsePayload::new(&response).deserialize::<DeleteBackupOutput, _>()
6611 }
6612
6613 /// <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>
6614 async fn delete_item(
6615 &self,
6616 input: DeleteItemInput,
6617 ) -> Result<DeleteItemOutput, RusotoError<DeleteItemError>> {
6618 let mut request = self.new_signed_request("POST", "/");
6619 request.add_header("x-amz-target", "DynamoDB_20120810.DeleteItem");
6620 let encoded = serde_json::to_string(&input).unwrap();
6621 request.set_payload(Some(encoded));
6622
6623 let response = self
6624 .sign_and_dispatch(request, DeleteItemError::from_response)
6625 .await?;
6626 let mut response = response;
6627 let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
6628 proto::json::ResponsePayload::new(&response).deserialize::<DeleteItemOutput, _>()
6629 }
6630
6631 /// <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>
6632 async fn delete_table(
6633 &self,
6634 input: DeleteTableInput,
6635 ) -> Result<DeleteTableOutput, RusotoError<DeleteTableError>> {
6636 let mut request = self.new_signed_request("POST", "/");
6637 request.add_header("x-amz-target", "DynamoDB_20120810.DeleteTable");
6638 let encoded = serde_json::to_string(&input).unwrap();
6639 request.set_payload(Some(encoded));
6640
6641 let response = self
6642 .sign_and_dispatch(request, DeleteTableError::from_response)
6643 .await?;
6644 let mut response = response;
6645 let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
6646 proto::json::ResponsePayload::new(&response).deserialize::<DeleteTableOutput, _>()
6647 }
6648
6649 /// <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>
6650 async fn describe_backup(
6651 &self,
6652 input: DescribeBackupInput,
6653 ) -> Result<DescribeBackupOutput, RusotoError<DescribeBackupError>> {
6654 let mut request = self.new_signed_request("POST", "/");
6655 request.add_header("x-amz-target", "DynamoDB_20120810.DescribeBackup");
6656 let encoded = serde_json::to_string(&input).unwrap();
6657 request.set_payload(Some(encoded));
6658
6659 let response = self
6660 .sign_and_dispatch(request, DescribeBackupError::from_response)
6661 .await?;
6662 let mut response = response;
6663 let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
6664 proto::json::ResponsePayload::new(&response).deserialize::<DescribeBackupOutput, _>()
6665 }
6666
6667 /// <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>
6668 async fn describe_continuous_backups(
6669 &self,
6670 input: DescribeContinuousBackupsInput,
6671 ) -> Result<DescribeContinuousBackupsOutput, RusotoError<DescribeContinuousBackupsError>> {
6672 let mut request = self.new_signed_request("POST", "/");
6673 request.add_header(
6674 "x-amz-target",
6675 "DynamoDB_20120810.DescribeContinuousBackups",
6676 );
6677 let encoded = serde_json::to_string(&input).unwrap();
6678 request.set_payload(Some(encoded));
6679
6680 let response = self
6681 .sign_and_dispatch(request, DescribeContinuousBackupsError::from_response)
6682 .await?;
6683 let mut response = response;
6684 let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
6685 proto::json::ResponsePayload::new(&response)
6686 .deserialize::<DescribeContinuousBackupsOutput, _>()
6687 }
6688
6689 /// <p>Returns information about contributor insights, for a given table or global secondary index.</p>
6690 async fn describe_contributor_insights(
6691 &self,
6692 input: DescribeContributorInsightsInput,
6693 ) -> Result<DescribeContributorInsightsOutput, RusotoError<DescribeContributorInsightsError>>
6694 {
6695 let mut request = self.new_signed_request("POST", "/");
6696 request.add_header(
6697 "x-amz-target",
6698 "DynamoDB_20120810.DescribeContributorInsights",
6699 );
6700 let encoded = serde_json::to_string(&input).unwrap();
6701 request.set_payload(Some(encoded));
6702
6703 let response = self
6704 .sign_and_dispatch(request, DescribeContributorInsightsError::from_response)
6705 .await?;
6706 let mut response = response;
6707 let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
6708 proto::json::ResponsePayload::new(&response)
6709 .deserialize::<DescribeContributorInsightsOutput, _>()
6710 }
6711
6712 /// <p>Returns the regional endpoint information.</p>
6713 async fn describe_endpoints(
6714 &self,
6715 ) -> Result<DescribeEndpointsResponse, RusotoError<DescribeEndpointsError>> {
6716 let mut request = self.new_signed_request("POST", "/");
6717 request.add_header("x-amz-target", "DynamoDB_20120810.DescribeEndpoints");
6718 request.set_payload(Some(bytes::Bytes::from_static(b"{}")));
6719
6720 let response = self
6721 .sign_and_dispatch(request, DescribeEndpointsError::from_response)
6722 .await?;
6723 let mut response = response;
6724 let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
6725 proto::json::ResponsePayload::new(&response).deserialize::<DescribeEndpointsResponse, _>()
6726 }
6727
6728 /// <p>Describes an existing table export.</p>
6729 async fn describe_export(
6730 &self,
6731 input: DescribeExportInput,
6732 ) -> Result<DescribeExportOutput, RusotoError<DescribeExportError>> {
6733 let mut request = self.new_signed_request("POST", "/");
6734 request.add_header("x-amz-target", "DynamoDB_20120810.DescribeExport");
6735 let encoded = serde_json::to_string(&input).unwrap();
6736 request.set_payload(Some(encoded));
6737
6738 let response = self
6739 .sign_and_dispatch(request, DescribeExportError::from_response)
6740 .await?;
6741 let mut response = response;
6742 let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
6743 proto::json::ResponsePayload::new(&response).deserialize::<DescribeExportOutput, _>()
6744 }
6745
6746 /// <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>
6747 async fn describe_global_table(
6748 &self,
6749 input: DescribeGlobalTableInput,
6750 ) -> Result<DescribeGlobalTableOutput, RusotoError<DescribeGlobalTableError>> {
6751 let mut request = self.new_signed_request("POST", "/");
6752 request.add_header("x-amz-target", "DynamoDB_20120810.DescribeGlobalTable");
6753 let encoded = serde_json::to_string(&input).unwrap();
6754 request.set_payload(Some(encoded));
6755
6756 let response = self
6757 .sign_and_dispatch(request, DescribeGlobalTableError::from_response)
6758 .await?;
6759 let mut response = response;
6760 let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
6761 proto::json::ResponsePayload::new(&response).deserialize::<DescribeGlobalTableOutput, _>()
6762 }
6763
6764 /// <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>
6765 async fn describe_global_table_settings(
6766 &self,
6767 input: DescribeGlobalTableSettingsInput,
6768 ) -> Result<DescribeGlobalTableSettingsOutput, RusotoError<DescribeGlobalTableSettingsError>>
6769 {
6770 let mut request = self.new_signed_request("POST", "/");
6771 request.add_header(
6772 "x-amz-target",
6773 "DynamoDB_20120810.DescribeGlobalTableSettings",
6774 );
6775 let encoded = serde_json::to_string(&input).unwrap();
6776 request.set_payload(Some(encoded));
6777
6778 let response = self
6779 .sign_and_dispatch(request, DescribeGlobalTableSettingsError::from_response)
6780 .await?;
6781 let mut response = response;
6782 let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
6783 proto::json::ResponsePayload::new(&response)
6784 .deserialize::<DescribeGlobalTableSettingsOutput, _>()
6785 }
6786
6787 /// <p>Returns information about the status of Kinesis streaming.</p>
6788 async fn describe_kinesis_streaming_destination(
6789 &self,
6790 input: DescribeKinesisStreamingDestinationInput,
6791 ) -> Result<
6792 DescribeKinesisStreamingDestinationOutput,
6793 RusotoError<DescribeKinesisStreamingDestinationError>,
6794 > {
6795 let mut request = self.new_signed_request("POST", "/");
6796 request.add_header(
6797 "x-amz-target",
6798 "DynamoDB_20120810.DescribeKinesisStreamingDestination",
6799 );
6800 let encoded = serde_json::to_string(&input).unwrap();
6801 request.set_payload(Some(encoded));
6802
6803 let response = self
6804 .sign_and_dispatch(
6805 request,
6806 DescribeKinesisStreamingDestinationError::from_response,
6807 )
6808 .await?;
6809 let mut response = response;
6810 let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
6811 proto::json::ResponsePayload::new(&response)
6812 .deserialize::<DescribeKinesisStreamingDestinationOutput, _>()
6813 }
6814
6815 /// <p>Returns the current provisioned-capacity quotas 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 quotas 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 quotas that apply when you create a table there. For more information, see <a href="https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Limits.html">Service, Account, and Table Quotas</a> page in the <i>Amazon DynamoDB Developer Guide</i>.</p> <p>Although you can increase these quotas 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 quotas imposed by your account so that you have enough time to apply for an increase before you hit a quota.</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 quotas 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 quotas 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 quotas.</p> <p>The per-table quotas 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 quota that applies is that the aggregate provisioned capacity over all your tables and GSIs cannot exceed either of the per-account quotas.</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>
6816 async fn describe_limits(
6817 &self,
6818 ) -> Result<DescribeLimitsOutput, RusotoError<DescribeLimitsError>> {
6819 let mut request = self.new_signed_request("POST", "/");
6820 request.add_header("x-amz-target", "DynamoDB_20120810.DescribeLimits");
6821 request.set_payload(Some(bytes::Bytes::from_static(b"{}")));
6822
6823 let response = self
6824 .sign_and_dispatch(request, DescribeLimitsError::from_response)
6825 .await?;
6826 let mut response = response;
6827 let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
6828 proto::json::ResponsePayload::new(&response).deserialize::<DescribeLimitsOutput, _>()
6829 }
6830
6831 /// <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>
6832 async fn describe_table(
6833 &self,
6834 input: DescribeTableInput,
6835 ) -> Result<DescribeTableOutput, RusotoError<DescribeTableError>> {
6836 let mut request = self.new_signed_request("POST", "/");
6837 request.add_header("x-amz-target", "DynamoDB_20120810.DescribeTable");
6838 let encoded = serde_json::to_string(&input).unwrap();
6839 request.set_payload(Some(encoded));
6840
6841 let response = self
6842 .sign_and_dispatch(request, DescribeTableError::from_response)
6843 .await?;
6844 let mut response = response;
6845 let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
6846 proto::json::ResponsePayload::new(&response).deserialize::<DescribeTableOutput, _>()
6847 }
6848
6849 /// <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>
6850 async fn describe_table_replica_auto_scaling(
6851 &self,
6852 input: DescribeTableReplicaAutoScalingInput,
6853 ) -> Result<
6854 DescribeTableReplicaAutoScalingOutput,
6855 RusotoError<DescribeTableReplicaAutoScalingError>,
6856 > {
6857 let mut request = self.new_signed_request("POST", "/");
6858 request.add_header(
6859 "x-amz-target",
6860 "DynamoDB_20120810.DescribeTableReplicaAutoScaling",
6861 );
6862 let encoded = serde_json::to_string(&input).unwrap();
6863 request.set_payload(Some(encoded));
6864
6865 let response = self
6866 .sign_and_dispatch(request, DescribeTableReplicaAutoScalingError::from_response)
6867 .await?;
6868 let mut response = response;
6869 let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
6870 proto::json::ResponsePayload::new(&response)
6871 .deserialize::<DescribeTableReplicaAutoScalingOutput, _>()
6872 }
6873
6874 /// <p>Gives a description of the Time to Live (TTL) status on the specified table. </p>
6875 async fn describe_time_to_live(
6876 &self,
6877 input: DescribeTimeToLiveInput,
6878 ) -> Result<DescribeTimeToLiveOutput, RusotoError<DescribeTimeToLiveError>> {
6879 let mut request = self.new_signed_request("POST", "/");
6880 request.add_header("x-amz-target", "DynamoDB_20120810.DescribeTimeToLive");
6881 let encoded = serde_json::to_string(&input).unwrap();
6882 request.set_payload(Some(encoded));
6883
6884 let response = self
6885 .sign_and_dispatch(request, DescribeTimeToLiveError::from_response)
6886 .await?;
6887 let mut response = response;
6888 let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
6889 proto::json::ResponsePayload::new(&response).deserialize::<DescribeTimeToLiveOutput, _>()
6890 }
6891
6892 /// <p>Stops replication from the DynamoDB table to the Kinesis data stream. This is done without deleting either of the resources.</p>
6893 async fn disable_kinesis_streaming_destination(
6894 &self,
6895 input: KinesisStreamingDestinationInput,
6896 ) -> Result<
6897 KinesisStreamingDestinationOutput,
6898 RusotoError<DisableKinesisStreamingDestinationError>,
6899 > {
6900 let mut request = self.new_signed_request("POST", "/");
6901 request.add_header(
6902 "x-amz-target",
6903 "DynamoDB_20120810.DisableKinesisStreamingDestination",
6904 );
6905 let encoded = serde_json::to_string(&input).unwrap();
6906 request.set_payload(Some(encoded));
6907
6908 let response = self
6909 .sign_and_dispatch(
6910 request,
6911 DisableKinesisStreamingDestinationError::from_response,
6912 )
6913 .await?;
6914 let mut response = response;
6915 let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
6916 proto::json::ResponsePayload::new(&response)
6917 .deserialize::<KinesisStreamingDestinationOutput, _>()
6918 }
6919
6920 /// <p>Starts table data replication to the specified Kinesis data stream at a timestamp chosen during the enable workflow. If this operation doesn't return results immediately, use DescribeKinesisStreamingDestination to check if streaming to the Kinesis data stream is ACTIVE.</p>
6921 async fn enable_kinesis_streaming_destination(
6922 &self,
6923 input: KinesisStreamingDestinationInput,
6924 ) -> Result<
6925 KinesisStreamingDestinationOutput,
6926 RusotoError<EnableKinesisStreamingDestinationError>,
6927 > {
6928 let mut request = self.new_signed_request("POST", "/");
6929 request.add_header(
6930 "x-amz-target",
6931 "DynamoDB_20120810.EnableKinesisStreamingDestination",
6932 );
6933 let encoded = serde_json::to_string(&input).unwrap();
6934 request.set_payload(Some(encoded));
6935
6936 let response = self
6937 .sign_and_dispatch(
6938 request,
6939 EnableKinesisStreamingDestinationError::from_response,
6940 )
6941 .await?;
6942 let mut response = response;
6943 let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
6944 proto::json::ResponsePayload::new(&response)
6945 .deserialize::<KinesisStreamingDestinationOutput, _>()
6946 }
6947
6948 /// <p> This operation allows you to perform reads and singleton writes on data stored in DynamoDB, using PartiQL. </p>
6949 async fn execute_statement(
6950 &self,
6951 input: ExecuteStatementInput,
6952 ) -> Result<ExecuteStatementOutput, RusotoError<ExecuteStatementError>> {
6953 let mut request = self.new_signed_request("POST", "/");
6954 request.add_header("x-amz-target", "DynamoDB_20120810.ExecuteStatement");
6955 let encoded = serde_json::to_string(&input).unwrap();
6956 request.set_payload(Some(encoded));
6957
6958 let response = self
6959 .sign_and_dispatch(request, ExecuteStatementError::from_response)
6960 .await?;
6961 let mut response = response;
6962 let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
6963 proto::json::ResponsePayload::new(&response).deserialize::<ExecuteStatementOutput, _>()
6964 }
6965
6966 /// <p> This operation allows you to perform transactional reads or writes on data stored in DynamoDB, using PartiQL. </p>
6967 async fn execute_transaction(
6968 &self,
6969 input: ExecuteTransactionInput,
6970 ) -> Result<ExecuteTransactionOutput, RusotoError<ExecuteTransactionError>> {
6971 let mut request = self.new_signed_request("POST", "/");
6972 request.add_header("x-amz-target", "DynamoDB_20120810.ExecuteTransaction");
6973 let encoded = serde_json::to_string(&input).unwrap();
6974 request.set_payload(Some(encoded));
6975
6976 let response = self
6977 .sign_and_dispatch(request, ExecuteTransactionError::from_response)
6978 .await?;
6979 let mut response = response;
6980 let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
6981 proto::json::ResponsePayload::new(&response).deserialize::<ExecuteTransactionOutput, _>()
6982 }
6983
6984 /// <p>Exports table data to an S3 bucket. The table must have point in time recovery enabled, and you can export data from any time within the point in time recovery window.</p>
6985 async fn export_table_to_point_in_time(
6986 &self,
6987 input: ExportTableToPointInTimeInput,
6988 ) -> Result<ExportTableToPointInTimeOutput, RusotoError<ExportTableToPointInTimeError>> {
6989 let mut request = self.new_signed_request("POST", "/");
6990 request.add_header("x-amz-target", "DynamoDB_20120810.ExportTableToPointInTime");
6991 let encoded = serde_json::to_string(&input).unwrap();
6992 request.set_payload(Some(encoded));
6993
6994 let response = self
6995 .sign_and_dispatch(request, ExportTableToPointInTimeError::from_response)
6996 .await?;
6997 let mut response = response;
6998 let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
6999 proto::json::ResponsePayload::new(&response)
7000 .deserialize::<ExportTableToPointInTimeOutput, _>()
7001 }
7002
7003 /// <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>
7004 async fn get_item(
7005 &self,
7006 input: GetItemInput,
7007 ) -> Result<GetItemOutput, RusotoError<GetItemError>> {
7008 let mut request = self.new_signed_request("POST", "/");
7009 request.add_header("x-amz-target", "DynamoDB_20120810.GetItem");
7010 let encoded = serde_json::to_string(&input).unwrap();
7011 request.set_payload(Some(encoded));
7012
7013 let response = self
7014 .sign_and_dispatch(request, GetItemError::from_response)
7015 .await?;
7016 let mut response = response;
7017 let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
7018 proto::json::ResponsePayload::new(&response).deserialize::<GetItemOutput, _>()
7019 }
7020
7021 /// <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 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 boundaries 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>
7022 async fn list_backups(
7023 &self,
7024 input: ListBackupsInput,
7025 ) -> Result<ListBackupsOutput, RusotoError<ListBackupsError>> {
7026 let mut request = self.new_signed_request("POST", "/");
7027 request.add_header("x-amz-target", "DynamoDB_20120810.ListBackups");
7028 let encoded = serde_json::to_string(&input).unwrap();
7029 request.set_payload(Some(encoded));
7030
7031 let response = self
7032 .sign_and_dispatch(request, ListBackupsError::from_response)
7033 .await?;
7034 let mut response = response;
7035 let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
7036 proto::json::ResponsePayload::new(&response).deserialize::<ListBackupsOutput, _>()
7037 }
7038
7039 /// <p>Returns a list of ContributorInsightsSummary for a table and all its global secondary indexes.</p>
7040 async fn list_contributor_insights(
7041 &self,
7042 input: ListContributorInsightsInput,
7043 ) -> Result<ListContributorInsightsOutput, RusotoError<ListContributorInsightsError>> {
7044 let mut request = self.new_signed_request("POST", "/");
7045 request.add_header("x-amz-target", "DynamoDB_20120810.ListContributorInsights");
7046 let encoded = serde_json::to_string(&input).unwrap();
7047 request.set_payload(Some(encoded));
7048
7049 let response = self
7050 .sign_and_dispatch(request, ListContributorInsightsError::from_response)
7051 .await?;
7052 let mut response = response;
7053 let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
7054 proto::json::ResponsePayload::new(&response)
7055 .deserialize::<ListContributorInsightsOutput, _>()
7056 }
7057
7058 /// <p>Lists completed exports within the past 90 days.</p>
7059 async fn list_exports(
7060 &self,
7061 input: ListExportsInput,
7062 ) -> Result<ListExportsOutput, RusotoError<ListExportsError>> {
7063 let mut request = self.new_signed_request("POST", "/");
7064 request.add_header("x-amz-target", "DynamoDB_20120810.ListExports");
7065 let encoded = serde_json::to_string(&input).unwrap();
7066 request.set_payload(Some(encoded));
7067
7068 let response = self
7069 .sign_and_dispatch(request, ListExportsError::from_response)
7070 .await?;
7071 let mut response = response;
7072 let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
7073 proto::json::ResponsePayload::new(&response).deserialize::<ListExportsOutput, _>()
7074 }
7075
7076 /// <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>
7077 async fn list_global_tables(
7078 &self,
7079 input: ListGlobalTablesInput,
7080 ) -> Result<ListGlobalTablesOutput, RusotoError<ListGlobalTablesError>> {
7081 let mut request = self.new_signed_request("POST", "/");
7082 request.add_header("x-amz-target", "DynamoDB_20120810.ListGlobalTables");
7083 let encoded = serde_json::to_string(&input).unwrap();
7084 request.set_payload(Some(encoded));
7085
7086 let response = self
7087 .sign_and_dispatch(request, ListGlobalTablesError::from_response)
7088 .await?;
7089 let mut response = response;
7090 let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
7091 proto::json::ResponsePayload::new(&response).deserialize::<ListGlobalTablesOutput, _>()
7092 }
7093
7094 /// <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>
7095 async fn list_tables(
7096 &self,
7097 input: ListTablesInput,
7098 ) -> Result<ListTablesOutput, RusotoError<ListTablesError>> {
7099 let mut request = self.new_signed_request("POST", "/");
7100 request.add_header("x-amz-target", "DynamoDB_20120810.ListTables");
7101 let encoded = serde_json::to_string(&input).unwrap();
7102 request.set_payload(Some(encoded));
7103
7104 let response = self
7105 .sign_and_dispatch(request, ListTablesError::from_response)
7106 .await?;
7107 let mut response = response;
7108 let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
7109 proto::json::ResponsePayload::new(&response).deserialize::<ListTablesOutput, _>()
7110 }
7111
7112 /// <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>
7113 async fn list_tags_of_resource(
7114 &self,
7115 input: ListTagsOfResourceInput,
7116 ) -> Result<ListTagsOfResourceOutput, RusotoError<ListTagsOfResourceError>> {
7117 let mut request = self.new_signed_request("POST", "/");
7118 request.add_header("x-amz-target", "DynamoDB_20120810.ListTagsOfResource");
7119 let encoded = serde_json::to_string(&input).unwrap();
7120 request.set_payload(Some(encoded));
7121
7122 let response = self
7123 .sign_and_dispatch(request, ListTagsOfResourceError::from_response)
7124 .await?;
7125 let mut response = response;
7126 let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
7127 proto::json::ResponsePayload::new(&response).deserialize::<ListTagsOfResourceOutput, _>()
7128 }
7129
7130 /// <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>
7131 async fn put_item(
7132 &self,
7133 input: PutItemInput,
7134 ) -> Result<PutItemOutput, RusotoError<PutItemError>> {
7135 let mut request = self.new_signed_request("POST", "/");
7136 request.add_header("x-amz-target", "DynamoDB_20120810.PutItem");
7137 let encoded = serde_json::to_string(&input).unwrap();
7138 request.set_payload(Some(encoded));
7139
7140 let response = self
7141 .sign_and_dispatch(request, PutItemError::from_response)
7142 .await?;
7143 let mut response = response;
7144 let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
7145 proto::json::ResponsePayload::new(&response).deserialize::<PutItemOutput, _>()
7146 }
7147
7148 /// <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>
7149 async fn query(&self, input: QueryInput) -> Result<QueryOutput, RusotoError<QueryError>> {
7150 let mut request = self.new_signed_request("POST", "/");
7151 request.add_header("x-amz-target", "DynamoDB_20120810.Query");
7152 let encoded = serde_json::to_string(&input).unwrap();
7153 request.set_payload(Some(encoded));
7154
7155 let response = self
7156 .sign_and_dispatch(request, QueryError::from_response)
7157 .await?;
7158 let mut response = response;
7159 let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
7160 proto::json::ResponsePayload::new(&response).deserialize::<QueryOutput, _>()
7161 }
7162
7163 /// <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>
7164 async fn restore_table_from_backup(
7165 &self,
7166 input: RestoreTableFromBackupInput,
7167 ) -> Result<RestoreTableFromBackupOutput, RusotoError<RestoreTableFromBackupError>> {
7168 let mut request = self.new_signed_request("POST", "/");
7169 request.add_header("x-amz-target", "DynamoDB_20120810.RestoreTableFromBackup");
7170 let encoded = serde_json::to_string(&input).unwrap();
7171 request.set_payload(Some(encoded));
7172
7173 let response = self
7174 .sign_and_dispatch(request, RestoreTableFromBackupError::from_response)
7175 .await?;
7176 let mut response = response;
7177 let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
7178 proto::json::ResponsePayload::new(&response)
7179 .deserialize::<RestoreTableFromBackupOutput, _>()
7180 }
7181
7182 /// <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>
7183 async fn restore_table_to_point_in_time(
7184 &self,
7185 input: RestoreTableToPointInTimeInput,
7186 ) -> Result<RestoreTableToPointInTimeOutput, RusotoError<RestoreTableToPointInTimeError>> {
7187 let mut request = self.new_signed_request("POST", "/");
7188 request.add_header(
7189 "x-amz-target",
7190 "DynamoDB_20120810.RestoreTableToPointInTime",
7191 );
7192 let encoded = serde_json::to_string(&input).unwrap();
7193 request.set_payload(Some(encoded));
7194
7195 let response = self
7196 .sign_and_dispatch(request, RestoreTableToPointInTimeError::from_response)
7197 .await?;
7198 let mut response = response;
7199 let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
7200 proto::json::ResponsePayload::new(&response)
7201 .deserialize::<RestoreTableToPointInTimeOutput, _>()
7202 }
7203
7204 /// <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>
7205 async fn scan(&self, input: ScanInput) -> Result<ScanOutput, RusotoError<ScanError>> {
7206 let mut request = self.new_signed_request("POST", "/");
7207 request.add_header("x-amz-target", "DynamoDB_20120810.Scan");
7208 let encoded = serde_json::to_string(&input).unwrap();
7209 request.set_payload(Some(encoded));
7210
7211 let response = self
7212 .sign_and_dispatch(request, ScanError::from_response)
7213 .await?;
7214 let mut response = response;
7215 let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
7216 proto::json::ResponsePayload::new(&response).deserialize::<ScanOutput, _>()
7217 }
7218
7219 /// <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>
7220 async fn tag_resource(
7221 &self,
7222 input: TagResourceInput,
7223 ) -> Result<(), RusotoError<TagResourceError>> {
7224 let mut request = self.new_signed_request("POST", "/");
7225 request.add_header("x-amz-target", "DynamoDB_20120810.TagResource");
7226 let encoded = serde_json::to_string(&input).unwrap();
7227 request.set_payload(Some(encoded));
7228
7229 let response = self
7230 .sign_and_dispatch(request, TagResourceError::from_response)
7231 .await?;
7232 std::mem::drop(response);
7233 Ok(())
7234 }
7235
7236 /// <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>
7237 async fn transact_get_items(
7238 &self,
7239 input: TransactGetItemsInput,
7240 ) -> Result<TransactGetItemsOutput, RusotoError<TransactGetItemsError>> {
7241 let mut request = self.new_signed_request("POST", "/");
7242 request.add_header("x-amz-target", "DynamoDB_20120810.TransactGetItems");
7243 let encoded = serde_json::to_string(&input).unwrap();
7244 request.set_payload(Some(encoded));
7245
7246 let response = self
7247 .sign_and_dispatch(request, TransactGetItemsError::from_response)
7248 .await?;
7249 let mut response = response;
7250 let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
7251 proto::json::ResponsePayload::new(&response).deserialize::<TransactGetItemsOutput, _>()
7252 }
7253
7254 /// <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>
7255 async fn transact_write_items(
7256 &self,
7257 input: TransactWriteItemsInput,
7258 ) -> Result<TransactWriteItemsOutput, RusotoError<TransactWriteItemsError>> {
7259 let mut request = self.new_signed_request("POST", "/");
7260 request.add_header("x-amz-target", "DynamoDB_20120810.TransactWriteItems");
7261 let encoded = serde_json::to_string(&input).unwrap();
7262 request.set_payload(Some(encoded));
7263
7264 let response = self
7265 .sign_and_dispatch(request, TransactWriteItemsError::from_response)
7266 .await?;
7267 let mut response = response;
7268 let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
7269 proto::json::ResponsePayload::new(&response).deserialize::<TransactWriteItemsOutput, _>()
7270 }
7271
7272 /// <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>
7273 async fn untag_resource(
7274 &self,
7275 input: UntagResourceInput,
7276 ) -> Result<(), RusotoError<UntagResourceError>> {
7277 let mut request = self.new_signed_request("POST", "/");
7278 request.add_header("x-amz-target", "DynamoDB_20120810.UntagResource");
7279 let encoded = serde_json::to_string(&input).unwrap();
7280 request.set_payload(Some(encoded));
7281
7282 let response = self
7283 .sign_and_dispatch(request, UntagResourceError::from_response)
7284 .await?;
7285 std::mem::drop(response);
7286 Ok(())
7287 }
7288
7289 /// <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>
7290 async fn update_continuous_backups(
7291 &self,
7292 input: UpdateContinuousBackupsInput,
7293 ) -> Result<UpdateContinuousBackupsOutput, RusotoError<UpdateContinuousBackupsError>> {
7294 let mut request = self.new_signed_request("POST", "/");
7295 request.add_header("x-amz-target", "DynamoDB_20120810.UpdateContinuousBackups");
7296 let encoded = serde_json::to_string(&input).unwrap();
7297 request.set_payload(Some(encoded));
7298
7299 let response = self
7300 .sign_and_dispatch(request, UpdateContinuousBackupsError::from_response)
7301 .await?;
7302 let mut response = response;
7303 let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
7304 proto::json::ResponsePayload::new(&response)
7305 .deserialize::<UpdateContinuousBackupsOutput, _>()
7306 }
7307
7308 /// <p>Updates the status for contributor insights for a specific table or index.</p>
7309 async fn update_contributor_insights(
7310 &self,
7311 input: UpdateContributorInsightsInput,
7312 ) -> Result<UpdateContributorInsightsOutput, RusotoError<UpdateContributorInsightsError>> {
7313 let mut request = self.new_signed_request("POST", "/");
7314 request.add_header(
7315 "x-amz-target",
7316 "DynamoDB_20120810.UpdateContributorInsights",
7317 );
7318 let encoded = serde_json::to_string(&input).unwrap();
7319 request.set_payload(Some(encoded));
7320
7321 let response = self
7322 .sign_and_dispatch(request, UpdateContributorInsightsError::from_response)
7323 .await?;
7324 let mut response = response;
7325 let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
7326 proto::json::ResponsePayload::new(&response)
7327 .deserialize::<UpdateContributorInsightsOutput, _>()
7328 }
7329
7330 /// <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>
7331 async fn update_global_table(
7332 &self,
7333 input: UpdateGlobalTableInput,
7334 ) -> Result<UpdateGlobalTableOutput, RusotoError<UpdateGlobalTableError>> {
7335 let mut request = self.new_signed_request("POST", "/");
7336 request.add_header("x-amz-target", "DynamoDB_20120810.UpdateGlobalTable");
7337 let encoded = serde_json::to_string(&input).unwrap();
7338 request.set_payload(Some(encoded));
7339
7340 let response = self
7341 .sign_and_dispatch(request, UpdateGlobalTableError::from_response)
7342 .await?;
7343 let mut response = response;
7344 let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
7345 proto::json::ResponsePayload::new(&response).deserialize::<UpdateGlobalTableOutput, _>()
7346 }
7347
7348 /// <p>Updates settings for a global table.</p>
7349 async fn update_global_table_settings(
7350 &self,
7351 input: UpdateGlobalTableSettingsInput,
7352 ) -> Result<UpdateGlobalTableSettingsOutput, RusotoError<UpdateGlobalTableSettingsError>> {
7353 let mut request = self.new_signed_request("POST", "/");
7354 request.add_header(
7355 "x-amz-target",
7356 "DynamoDB_20120810.UpdateGlobalTableSettings",
7357 );
7358 let encoded = serde_json::to_string(&input).unwrap();
7359 request.set_payload(Some(encoded));
7360
7361 let response = self
7362 .sign_and_dispatch(request, UpdateGlobalTableSettingsError::from_response)
7363 .await?;
7364 let mut response = response;
7365 let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
7366 proto::json::ResponsePayload::new(&response)
7367 .deserialize::<UpdateGlobalTableSettingsOutput, _>()
7368 }
7369
7370 /// <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>
7371 async fn update_item(
7372 &self,
7373 input: UpdateItemInput,
7374 ) -> Result<UpdateItemOutput, RusotoError<UpdateItemError>> {
7375 let mut request = self.new_signed_request("POST", "/");
7376 request.add_header("x-amz-target", "DynamoDB_20120810.UpdateItem");
7377 let encoded = serde_json::to_string(&input).unwrap();
7378 request.set_payload(Some(encoded));
7379
7380 let response = self
7381 .sign_and_dispatch(request, UpdateItemError::from_response)
7382 .await?;
7383 let mut response = response;
7384 let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
7385 proto::json::ResponsePayload::new(&response).deserialize::<UpdateItemOutput, _>()
7386 }
7387
7388 /// <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>
7389 async fn update_table(
7390 &self,
7391 input: UpdateTableInput,
7392 ) -> Result<UpdateTableOutput, RusotoError<UpdateTableError>> {
7393 let mut request = self.new_signed_request("POST", "/");
7394 request.add_header("x-amz-target", "DynamoDB_20120810.UpdateTable");
7395 let encoded = serde_json::to_string(&input).unwrap();
7396 request.set_payload(Some(encoded));
7397
7398 let response = self
7399 .sign_and_dispatch(request, UpdateTableError::from_response)
7400 .await?;
7401 let mut response = response;
7402 let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
7403 proto::json::ResponsePayload::new(&response).deserialize::<UpdateTableOutput, _>()
7404 }
7405
7406 /// <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>
7407 async fn update_table_replica_auto_scaling(
7408 &self,
7409 input: UpdateTableReplicaAutoScalingInput,
7410 ) -> Result<UpdateTableReplicaAutoScalingOutput, RusotoError<UpdateTableReplicaAutoScalingError>>
7411 {
7412 let mut request = self.new_signed_request("POST", "/");
7413 request.add_header(
7414 "x-amz-target",
7415 "DynamoDB_20120810.UpdateTableReplicaAutoScaling",
7416 );
7417 let encoded = serde_json::to_string(&input).unwrap();
7418 request.set_payload(Some(encoded));
7419
7420 let response = self
7421 .sign_and_dispatch(request, UpdateTableReplicaAutoScalingError::from_response)
7422 .await?;
7423 let mut response = response;
7424 let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
7425 proto::json::ResponsePayload::new(&response)
7426 .deserialize::<UpdateTableReplicaAutoScalingOutput, _>()
7427 }
7428
7429 /// <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>
7430 async fn update_time_to_live(
7431 &self,
7432 input: UpdateTimeToLiveInput,
7433 ) -> Result<UpdateTimeToLiveOutput, RusotoError<UpdateTimeToLiveError>> {
7434 let mut request = self.new_signed_request("POST", "/");
7435 request.add_header("x-amz-target", "DynamoDB_20120810.UpdateTimeToLive");
7436 let encoded = serde_json::to_string(&input).unwrap();
7437 request.set_payload(Some(encoded));
7438
7439 let response = self
7440 .sign_and_dispatch(request, UpdateTimeToLiveError::from_response)
7441 .await?;
7442 let mut response = response;
7443 let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
7444 proto::json::ResponsePayload::new(&response).deserialize::<UpdateTimeToLiveOutput, _>()
7445 }
7446}