1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
impl super::Client {
    /// Constructs a fluent builder for the [`BatchWriteItem`](crate::operation::batch_write_item::builders::BatchWriteItemFluentBuilder) operation.
    ///
    /// - The fluent builder is configurable:
    ///   - [`request_items(HashMap<String, Vec<WriteRequest>>)`](crate::operation::batch_write_item::builders::BatchWriteItemFluentBuilder::request_items) / [`set_request_items(Option<HashMap<String, Vec<WriteRequest>>>)`](crate::operation::batch_write_item::builders::BatchWriteItemFluentBuilder::set_request_items): <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>
    ///   - [`return_consumed_capacity(ReturnConsumedCapacity)`](crate::operation::batch_write_item::builders::BatchWriteItemFluentBuilder::return_consumed_capacity) / [`set_return_consumed_capacity(Option<ReturnConsumedCapacity>)`](crate::operation::batch_write_item::builders::BatchWriteItemFluentBuilder::set_return_consumed_capacity): <p>Determines the level of detail about either provisioned or on-demand throughput consumption that is returned in the response:</p>  <ul>   <li> <p> <code>INDEXES</code> - The response includes the aggregate <code>ConsumedCapacity</code> for the operation, together with <code>ConsumedCapacity</code> for each table and secondary index that was accessed.</p> <p>Note that some operations, such as <code>GetItem</code> and <code>BatchGetItem</code>, do not access any indexes at all. In these cases, specifying <code>INDEXES</code> will only return <code>ConsumedCapacity</code> information for table(s).</p> </li>   <li> <p> <code>TOTAL</code> - The response includes only the aggregate <code>ConsumedCapacity</code> for the operation.</p> </li>   <li> <p> <code>NONE</code> - No <code>ConsumedCapacity</code> details are included in the response.</p> </li>  </ul>
    ///   - [`return_item_collection_metrics(ReturnItemCollectionMetrics)`](crate::operation::batch_write_item::builders::BatchWriteItemFluentBuilder::return_item_collection_metrics) / [`set_return_item_collection_metrics(Option<ReturnItemCollectionMetrics>)`](crate::operation::batch_write_item::builders::BatchWriteItemFluentBuilder::set_return_item_collection_metrics): <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>
    /// - On success, responds with [`BatchWriteItemOutput`](crate::operation::batch_write_item::BatchWriteItemOutput) with field(s):
    ///   - [`unprocessed_items(Option<HashMap<String, Vec<WriteRequest>>>)`](crate::operation::batch_write_item::BatchWriteItemOutput::unprocessed_items): <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>BatchWriteItem</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>
    ///   - [`item_collection_metrics(Option<HashMap<String, Vec<ItemCollectionMetrics>>>)`](crate::operation::batch_write_item::BatchWriteItemOutput::item_collection_metrics): <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>
    ///   - [`consumed_capacity(Option<Vec<ConsumedCapacity>>)`](crate::operation::batch_write_item::BatchWriteItemOutput::consumed_capacity): <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>
    /// - On failure, responds with [`SdkError<BatchWriteItemError>`](crate::operation::batch_write_item::BatchWriteItemError)
    pub fn batch_write_item(
        &self,
    ) -> crate::operation::batch_write_item::builders::BatchWriteItemFluentBuilder {
        crate::operation::batch_write_item::builders::BatchWriteItemFluentBuilder::new(
            self.handle.clone(),
        )
    }
}