Struct aws_sdk_dynamodb::client::Client
source · pub struct Client { /* private fields */ }Expand description
Client for Amazon DynamoDB
Client for invoking operations on Amazon DynamoDB. Each operation on Amazon DynamoDB is a method on this
this struct. .send() MUST be invoked on the generated operations to dispatch the request to the service.
§Constructing a Client
A Config is required to construct a client. For most use cases, the aws-config
crate should be used to automatically resolve this config using
aws_config::load_from_env(), since this will resolve an SdkConfig which can be shared
across multiple different AWS SDK clients. This config resolution process can be customized
by calling aws_config::from_env() instead, which returns a ConfigLoader that uses
the builder pattern to customize the default config.
In the simplest case, creating a client looks as follows:
let config = aws_config::load_from_env().await;
let client = aws_sdk_dynamodb::Client::new(&config);Occasionally, SDKs may have additional service-specific values that can be set on the Config that
is absent from SdkConfig, or slightly different settings for a specific client may be desired.
The [Builder] struct implements From<&SdkConfig>, so setting these specific settings can be
done as follows:
let sdk_config = ::aws_config::load_from_env().await;
let config = aws_sdk_dynamodb::config::Builder::from(&sdk_config)
.some_service_specific_setting("value")
.build();See the aws-config docs and Config for more information on customizing configuration.
Note: Client construction is expensive due to connection thread pool initialization, and should be done once at application start-up.
§Using the Client
A client has a function for every operation that can be performed by the service.
For example, the BatchExecuteStatement operation has
a Client::batch_execute_statement, function which returns a builder for that operation.
The fluent builder ultimately has a send() function that returns an async future that
returns a result, as illustrated below:
let result = client.batch_execute_statement()
.return_consumed_capacity("example")
.send()
.await;The underlying HTTP requests that get made by this can be modified with the customize_operation
function on the fluent builder. See the customize module for more
information.
§Waiters
This client provides wait_until methods behind the Waiters trait.
To use them, simply import the trait, and then call one of the wait_until methods. This will
return a waiter fluent builder that takes various parameters, which are documented on the builder
type. Once parameters have been provided, the wait method can be called to initiate waiting.
For example, if there was a wait_until_thing method, it could look like:
let result = client.wait_until_thing()
.thing_id("someId")
.wait(Duration::from_secs(120))
.await;Implementations§
source§impl Client
impl Client
sourcepub fn batch_execute_statement(&self) -> BatchExecuteStatementFluentBuilder
pub fn batch_execute_statement(&self) -> BatchExecuteStatementFluentBuilder
Constructs a fluent builder for the BatchExecuteStatement operation.
- The fluent builder is configurable:
statements(BatchStatementRequest)/set_statements(Option<Vec::<BatchStatementRequest>>):
required: trueThe list of PartiQL statements representing the batch to run.
return_consumed_capacity(ReturnConsumedCapacity)/set_return_consumed_capacity(Option<ReturnConsumedCapacity>):
required: falseDetermines the level of detail about either provisioned or on-demand throughput consumption that is returned in the response:
-
INDEXES- The response includes the aggregateConsumedCapacityfor the operation, together withConsumedCapacityfor each table and secondary index that was accessed.Note that some operations, such as
GetItemandBatchGetItem, do not access any indexes at all. In these cases, specifyingINDEXESwill only returnConsumedCapacityinformation for table(s). -
TOTAL- The response includes only the aggregateConsumedCapacityfor the operation. -
NONE- NoConsumedCapacitydetails are included in the response.
-
- On success, responds with
BatchExecuteStatementOutputwith field(s):responses(Option<Vec::<BatchStatementResponse>>):The response to each PartiQL statement in the batch. The values of the list are ordered according to the ordering of the request statements.
consumed_capacity(Option<Vec::<ConsumedCapacity>>):The capacity units consumed by the entire operation. The values of the list are ordered according to the ordering of the statements.
- On failure, responds with
SdkError<BatchExecuteStatementError>
source§impl Client
impl Client
sourcepub fn batch_get_item(&self) -> BatchGetItemFluentBuilder
pub fn batch_get_item(&self) -> BatchGetItemFluentBuilder
Constructs a fluent builder for the BatchGetItem operation.
- The fluent builder is configurable:
request_items(impl Into<String>, KeysAndAttributes)/set_request_items(Option<HashMap::<String, KeysAndAttributes>>):
required: trueA map of one or more table names or table ARNs and, for each table, a map that describes one or more items to retrieve from that table. Each table name or ARN can be used only once per
BatchGetItemrequest.Each element in the map of items to retrieve consists of the following:
-
ConsistentRead- Iftrue, a strongly consistent read is used; iffalse(the default), an eventually consistent read is used. -
ExpressionAttributeNames- One or more substitution tokens for attribute names in theProjectionExpressionparameter. The following are some use cases for usingExpressionAttributeNames:-
To access an attribute whose name conflicts with a DynamoDB reserved word.
-
To create a placeholder for repeating occurrences of an attribute name in an expression.
-
To prevent special characters in an attribute name from being misinterpreted in an expression.
Use the # character in an expression to dereference an attribute name. For example, consider the following attribute name:
-
Percentile
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 Reserved Words in the Amazon DynamoDB Developer Guide). To work around this, you could specify the following for
ExpressionAttributeNames:-
{“#P”:“Percentile”}
You could then use this substitution in an expression, as in this example:
-
#P = :val
Tokens that begin with the : character are expression attribute values, which are placeholders for the actual value at runtime.
For more information about expression attribute names, see Accessing Item Attributes in the Amazon DynamoDB Developer Guide.
-
-
Keys- An array of primary key attribute values that define specific items in the table. For each primary key, you must provide all 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 both the partition key value and the sort key value. -
ProjectionExpression- 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.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.
For more information, see Accessing Item Attributes in the Amazon DynamoDB Developer Guide.
-
AttributesToGet- This is a legacy parameter. UseProjectionExpressioninstead. For more information, see AttributesToGet in the Amazon DynamoDB Developer Guide.
-
return_consumed_capacity(ReturnConsumedCapacity)/set_return_consumed_capacity(Option<ReturnConsumedCapacity>):
required: falseDetermines the level of detail about either provisioned or on-demand throughput consumption that is returned in the response:
-
INDEXES- The response includes the aggregateConsumedCapacityfor the operation, together withConsumedCapacityfor each table and secondary index that was accessed.Note that some operations, such as
GetItemandBatchGetItem, do not access any indexes at all. In these cases, specifyingINDEXESwill only returnConsumedCapacityinformation for table(s). -
TOTAL- The response includes only the aggregateConsumedCapacityfor the operation. -
NONE- NoConsumedCapacitydetails are included in the response.
-
- On success, responds with
BatchGetItemOutputwith field(s):responses(Option<HashMap::<String, Vec::<HashMap::<String, AttributeValue>>>>):A map of table name or table ARN to a list of items. Each object in
Responsesconsists of a table name or ARN, along with a map of attribute data consisting of the data type and attribute value.unprocessed_keys(Option<HashMap::<String, KeysAndAttributes>>):A map of tables and their respective keys that were not processed with the current response. The
UnprocessedKeysvalue is in the same form asRequestItems, so the value can be provided directly to a subsequentBatchGetItemoperation. For more information, seeRequestItemsin the Request Parameters section.Each element consists of:
-
Keys- An array of primary key attribute values that define specific items in the table. -
ProjectionExpression- 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. -
ConsistentRead- The consistency of a read operation. If set totrue, then a strongly consistent read is used; otherwise, an eventually consistent read is used.
If there are no unprocessed keys remaining, the response contains an empty
UnprocessedKeysmap.-
consumed_capacity(Option<Vec::<ConsumedCapacity>>):The read capacity units consumed by the entire
BatchGetItemoperation.Each element consists of:
-
TableName- The table that consumed the provisioned throughput. -
CapacityUnits- The total number of capacity units consumed.
-
- On failure, responds with
SdkError<BatchGetItemError>
source§impl Client
impl Client
sourcepub fn batch_write_item(&self) -> BatchWriteItemFluentBuilder
pub fn batch_write_item(&self) -> BatchWriteItemFluentBuilder
Constructs a fluent builder for the BatchWriteItem operation.
- The fluent builder is configurable:
request_items(impl Into<String>, Vec::<WriteRequest>)/set_request_items(Option<HashMap::<String, Vec::<WriteRequest>>>):
required: trueA map of one or more table names or table ARNs and, for each table, a list of operations to be performed (
DeleteRequestorPutRequest). Each element in the map consists of the following:-
DeleteRequest- Perform aDeleteItemoperation on the specified item. The item to be deleted is identified by aKeysubelement:-
Key- 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 all 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 both the partition key and the sort key.
-
-
PutRequest- Perform aPutItemoperation on the specified item. The item to be put is identified by anItemsubelement:-
Item- 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 aValidationExceptionexception.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.
-
-
return_consumed_capacity(ReturnConsumedCapacity)/set_return_consumed_capacity(Option<ReturnConsumedCapacity>):
required: falseDetermines the level of detail about either provisioned or on-demand throughput consumption that is returned in the response:
-
INDEXES- The response includes the aggregateConsumedCapacityfor the operation, together withConsumedCapacityfor each table and secondary index that was accessed.Note that some operations, such as
GetItemandBatchGetItem, do not access any indexes at all. In these cases, specifyingINDEXESwill only returnConsumedCapacityinformation for table(s). -
TOTAL- The response includes only the aggregateConsumedCapacityfor the operation. -
NONE- NoConsumedCapacitydetails are included in the response.
-
return_item_collection_metrics(ReturnItemCollectionMetrics)/set_return_item_collection_metrics(Option<ReturnItemCollectionMetrics>):
required: falseDetermines whether item collection metrics are returned. If set to
SIZE, the response includes statistics about item collections, if any, that were modified during the operation are returned in the response. If set toNONE(the default), no statistics are returned.
- On success, responds with
BatchWriteItemOutputwith field(s):unprocessed_items(Option<HashMap::<String, Vec::<WriteRequest>>>):A map of tables and requests against those tables that were not processed. The
UnprocessedItemsvalue is in the same form asRequestItems, so you can provide this value directly to a subsequentBatchWriteItemoperation. For more information, seeRequestItemsin the Request Parameters section.Each
UnprocessedItemsentry consists of a table name or table ARN and, for that table, a list of operations to perform (DeleteRequestorPutRequest).-
DeleteRequest- Perform aDeleteItemoperation on the specified item. The item to be deleted is identified by aKeysubelement:-
Key- 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.
-
-
PutRequest- Perform aPutItemoperation on the specified item. The item to be put is identified by anItemsubelement:-
Item- 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 aValidationExceptionexception.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.
-
If there are no unprocessed items remaining, the response contains an empty
UnprocessedItemsmap.-
item_collection_metrics(Option<HashMap::<String, Vec::<ItemCollectionMetrics>>>):A list of tables that were processed by
BatchWriteItemand, for each table, information about any item collections that were affected by individualDeleteItemorPutItemoperations.Each entry consists of the following subelements:
-
ItemCollectionKey- The partition key value of the item collection. This is the same as the partition key value of the item. -
SizeEstimateRangeGB- 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.The estimate is subject to change over time; therefore, do not rely on the precision or accuracy of the estimate.
-
consumed_capacity(Option<Vec::<ConsumedCapacity>>):The capacity units consumed by the entire
BatchWriteItemoperation.Each element consists of:
-
TableName- The table that consumed the provisioned throughput. -
CapacityUnits- The total number of capacity units consumed.
-
- On failure, responds with
SdkError<BatchWriteItemError>
source§impl Client
impl Client
sourcepub fn create_backup(&self) -> CreateBackupFluentBuilder
pub fn create_backup(&self) -> CreateBackupFluentBuilder
Constructs a fluent builder for the CreateBackup operation.
- The fluent builder is configurable:
table_name(impl Into<String>)/set_table_name(Option<String>):
required: trueThe name of the table. You can also provide the Amazon Resource Name (ARN) of the table in this parameter.
backup_name(impl Into<String>)/set_backup_name(Option<String>):
required: trueSpecified name for the backup.
- On success, responds with
CreateBackupOutputwith field(s):backup_details(Option<BackupDetails>):Contains the details of the backup created for the table.
- On failure, responds with
SdkError<CreateBackupError>
source§impl Client
impl Client
sourcepub fn create_global_table(&self) -> CreateGlobalTableFluentBuilder
pub fn create_global_table(&self) -> CreateGlobalTableFluentBuilder
Constructs a fluent builder for the CreateGlobalTable operation.
- The fluent builder is configurable:
global_table_name(impl Into<String>)/set_global_table_name(Option<String>):
required: trueThe global table name.
replication_group(Replica)/set_replication_group(Option<Vec::<Replica>>):
required: trueThe Regions where the global table needs to be created.
- On success, responds with
CreateGlobalTableOutputwith field(s):global_table_description(Option<GlobalTableDescription>):Contains the details of the global table.
- On failure, responds with
SdkError<CreateGlobalTableError>
source§impl Client
impl Client
sourcepub fn create_table(&self) -> CreateTableFluentBuilder
pub fn create_table(&self) -> CreateTableFluentBuilder
Constructs a fluent builder for the CreateTable operation.
- The fluent builder is configurable:
attribute_definitions(AttributeDefinition)/set_attribute_definitions(Option<Vec::<AttributeDefinition>>):
required: trueAn array of attributes that describe the key schema for the table and indexes.
table_name(impl Into<String>)/set_table_name(Option<String>):
required: trueThe name of the table to create. You can also provide the Amazon Resource Name (ARN) of the table in this parameter.
key_schema(KeySchemaElement)/set_key_schema(Option<Vec::<KeySchemaElement>>):
required: trueSpecifies the attributes that make up the primary key for a table or an index. The attributes in
KeySchemamust also be defined in theAttributeDefinitionsarray. For more information, see Data Model in the Amazon DynamoDB Developer Guide.Each
KeySchemaElementin the array is composed of:-
AttributeName- The name of this key attribute. -
KeyType- The role that the key attribute will assume:-
HASH- partition key -
RANGE- sort key
-
The partition key of an item is also known as its hash attribute. 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.
The sort key of an item is also known as its range attribute. 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.
For a simple primary key (partition key), you must provide exactly one element with a
KeyTypeofHASH.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
KeyTypeofHASH, and the second element must have aKeyTypeofRANGE.For more information, see Working with Tables in the Amazon DynamoDB Developer Guide.
-
local_secondary_indexes(LocalSecondaryIndex)/set_local_secondary_indexes(Option<Vec::<LocalSecondaryIndex>>):
required: falseOne 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.
Each local secondary index in the array includes the following:
-
IndexName- The name of the local secondary index. Must be unique only for this table. -
KeySchema- Specifies the key schema for the local secondary index. The key schema must begin with the same partition key as the table. -
Projection- 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:-
ProjectionType- One of the following:-
KEYS_ONLY- Only the index and primary keys are projected into the index. -
INCLUDE- Only the specified table attributes are projected into the index. The list of projected attributes is inNonKeyAttributes. -
ALL- All of the table attributes are projected into the index.
-
-
NonKeyAttributes- A list of one or more non-key attribute names that are projected into the secondary index. The total count of attributes provided inNonKeyAttributes, 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.
-
-
global_secondary_indexes(GlobalSecondaryIndex)/set_global_secondary_indexes(Option<Vec::<GlobalSecondaryIndex>>):
required: falseOne 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:
-
IndexName- The name of the global secondary index. Must be unique only for this table. -
KeySchema- Specifies the key schema for the global secondary index. -
Projection- 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:-
ProjectionType- One of the following:-
KEYS_ONLY- Only the index and primary keys are projected into the index. -
INCLUDE- Only the specified table attributes are projected into the index. The list of projected attributes is inNonKeyAttributes. -
ALL- All of the table attributes are projected into the index.
-
-
NonKeyAttributes- A list of one or more non-key attribute names that are projected into the secondary index. The total count of attributes provided inNonKeyAttributes, 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.
-
-
ProvisionedThroughput- The provisioned throughput settings for the global secondary index, consisting of read and write capacity units.
-
billing_mode(BillingMode)/set_billing_mode(Option<BillingMode>):
required: falseControls how you are charged for read and write throughput and how you manage capacity. This setting can be changed later.
-
PROVISIONED- We recommend usingPROVISIONEDfor predictable workloads.PROVISIONEDsets the billing mode to Provisioned capacity mode. -
PAY_PER_REQUEST- We recommend usingPAY_PER_REQUESTfor unpredictable workloads.PAY_PER_REQUESTsets the billing mode to On-demand capacity mode.
-
provisioned_throughput(ProvisionedThroughput)/set_provisioned_throughput(Option<ProvisionedThroughput>):
required: falseRepresents the provisioned throughput settings for a specified table or index. The settings can be modified using the
UpdateTableoperation.If you set BillingMode as
PROVISIONED, you must specify this property. If you set BillingMode asPAY_PER_REQUEST, you cannot specify this property.For current minimum and maximum provisioned throughput values, see Service, Account, and Table Quotas in the Amazon DynamoDB Developer Guide.
stream_specification(StreamSpecification)/set_stream_specification(Option<StreamSpecification>):
required: falseThe settings for DynamoDB Streams on the table. These settings consist of:
-
StreamEnabled- Indicates whether DynamoDB Streams is to be enabled (true) or disabled (false). -
StreamViewType- When an item in the table is modified,StreamViewTypedetermines what information is written to the table’s stream. Valid values forStreamViewTypeare:-
KEYS_ONLY- Only the key attributes of the modified item are written to the stream. -
NEW_IMAGE- The entire item, as it appears after it was modified, is written to the stream. -
OLD_IMAGE- The entire item, as it appeared before it was modified, is written to the stream. -
NEW_AND_OLD_IMAGES- Both the new and the old item images of the item are written to the stream.
-
-
sse_specification(SseSpecification)/set_sse_specification(Option<SseSpecification>):
required: falseRepresents the settings used to enable server-side encryption.
tags(Tag)/set_tags(Option<Vec::<Tag>>):
required: falseA list of key-value pairs to label the table. For more information, see Tagging for DynamoDB.
table_class(TableClass)/set_table_class(Option<TableClass>):
required: falseThe table class of the new table. Valid values are
STANDARDandSTANDARD_INFREQUENT_ACCESS.deletion_protection_enabled(bool)/set_deletion_protection_enabled(Option<bool>):
required: falseIndicates whether deletion protection is to be enabled (true) or disabled (false) on the table.
resource_policy(impl Into<String>)/set_resource_policy(Option<String>):
required: falseAn Amazon Web Services resource-based policy document in JSON format that will be attached to the table.
When you attach a resource-based policy while creating a table, the policy application is strongly consistent.
The maximum size supported for a resource-based policy document is 20 KB. DynamoDB counts whitespaces when calculating the size of a policy against this limit. For a full list of all considerations that apply for resource-based policies, see Resource-based policy considerations.
You need to specify the
CreateTableandPutResourcePolicyIAM actions for authorizing a user to create a table with a resource-based policy.on_demand_throughput(OnDemandThroughput)/set_on_demand_throughput(Option<OnDemandThroughput>):
required: falseSets the maximum number of read and write units for the specified table in on-demand capacity mode. If you use this parameter, you must specify
MaxReadRequestUnits,MaxWriteRequestUnits, or both.
- On success, responds with
CreateTableOutputwith field(s):table_description(Option<TableDescription>):Represents the properties of the table.
- On failure, responds with
SdkError<CreateTableError>
source§impl Client
impl Client
sourcepub fn delete_backup(&self) -> DeleteBackupFluentBuilder
pub fn delete_backup(&self) -> DeleteBackupFluentBuilder
Constructs a fluent builder for the DeleteBackup operation.
- The fluent builder is configurable:
backup_arn(impl Into<String>)/set_backup_arn(Option<String>):
required: trueThe ARN associated with the backup.
- On success, responds with
DeleteBackupOutputwith field(s):backup_description(Option<BackupDescription>):Contains the description of the backup created for the table.
- On failure, responds with
SdkError<DeleteBackupError>
source§impl Client
impl Client
sourcepub fn delete_item(&self) -> DeleteItemFluentBuilder
pub fn delete_item(&self) -> DeleteItemFluentBuilder
Constructs a fluent builder for the DeleteItem operation.
- The fluent builder is configurable:
table_name(impl Into<String>)/set_table_name(Option<String>):
required: trueThe name of the table from which to delete the item. You can also provide the Amazon Resource Name (ARN) of the table in this parameter.
key(impl Into<String>, AttributeValue)/set_key(Option<HashMap::<String, AttributeValue>>):
required: trueA map of attribute names to
AttributeValueobjects, representing the primary key of the item to delete.For the primary key, you must provide all 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 both the partition key and the sort key.
expected(impl Into<String>, ExpectedAttributeValue)/set_expected(Option<HashMap::<String, ExpectedAttributeValue>>):
required: falseThis is a legacy parameter. Use
ConditionExpressioninstead. For more information, see Expected in the Amazon DynamoDB Developer Guide.conditional_operator(ConditionalOperator)/set_conditional_operator(Option<ConditionalOperator>):
required: falseThis is a legacy parameter. Use
ConditionExpressioninstead. For more information, see ConditionalOperator in the Amazon DynamoDB Developer Guide.return_values(ReturnValue)/set_return_values(Option<ReturnValue>):
required: falseUse
ReturnValuesif you want to get the item attributes as they appeared before they were deleted. ForDeleteItem, the valid values are:-
NONE- IfReturnValuesis not specified, or if its value isNONE, then nothing is returned. (This setting is the default forReturnValues.) -
ALL_OLD- The content of the old item is returned.
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.
The
ReturnValuesparameter is used by several DynamoDB operations; however,DeleteItemdoes not recognize any values other thanNONEorALL_OLD.-
return_consumed_capacity(ReturnConsumedCapacity)/set_return_consumed_capacity(Option<ReturnConsumedCapacity>):
required: falseDetermines the level of detail about either provisioned or on-demand throughput consumption that is returned in the response:
-
INDEXES- The response includes the aggregateConsumedCapacityfor the operation, together withConsumedCapacityfor each table and secondary index that was accessed.Note that some operations, such as
GetItemandBatchGetItem, do not access any indexes at all. In these cases, specifyingINDEXESwill only returnConsumedCapacityinformation for table(s). -
TOTAL- The response includes only the aggregateConsumedCapacityfor the operation. -
NONE- NoConsumedCapacitydetails are included in the response.
-
return_item_collection_metrics(ReturnItemCollectionMetrics)/set_return_item_collection_metrics(Option<ReturnItemCollectionMetrics>):
required: falseDetermines whether item collection metrics are returned. If set to
SIZE, the response includes statistics about item collections, if any, that were modified during the operation are returned in the response. If set toNONE(the default), no statistics are returned.condition_expression(impl Into<String>)/set_condition_expression(Option<String>):
required: falseA condition that must be satisfied in order for a conditional
DeleteItemto succeed.An expression can contain any of the following:
-
Functions:
attribute_exists | attribute_not_exists | attribute_type | contains | begins_with | sizeThese function names are case-sensitive.
-
Comparison operators:
= | <> | < | > | <= | >= | BETWEEN | IN -
Logical operators:
AND | OR | NOT
For more information about condition expressions, see Condition Expressions in the Amazon DynamoDB Developer Guide.
-
expression_attribute_names(impl Into<String>, impl Into<String>)/set_expression_attribute_names(Option<HashMap::<String, String>>):
required: falseOne or more substitution tokens for attribute names in an expression. The following are some use cases for using
ExpressionAttributeNames:-
To access an attribute whose name conflicts with a DynamoDB reserved word.
-
To create a placeholder for repeating occurrences of an attribute name in an expression.
-
To prevent special characters in an attribute name from being misinterpreted in an expression.
Use the # character in an expression to dereference an attribute name. For example, consider the following attribute name:
-
Percentile
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 Reserved Words in the Amazon DynamoDB Developer Guide). To work around this, you could specify the following for
ExpressionAttributeNames:-
{“#P”:“Percentile”}
You could then use this substitution in an expression, as in this example:
-
#P = :val
Tokens that begin with the : character are expression attribute values, which are placeholders for the actual value at runtime.
For more information on expression attribute names, see Specifying Item Attributes in the Amazon DynamoDB Developer Guide.
-
expression_attribute_values(impl Into<String>, AttributeValue)/set_expression_attribute_values(Option<HashMap::<String, AttributeValue>>):
required: falseOne or more values that can be substituted in an expression.
Use the : (colon) character in an expression to dereference an attribute value. For example, suppose that you wanted to check whether the value of the ProductStatus attribute was one of the following:
Available | Backordered | DiscontinuedYou would first need to specify
ExpressionAttributeValuesas follows:{ “:avail”:{“S”:“Available”}, “:back”:{“S”:“Backordered”}, “:disc”:{“S”:“Discontinued”} }You could then use these values in an expression, such as this:
ProductStatus IN (:avail, :back, :disc)For more information on expression attribute values, see Condition Expressions in the Amazon DynamoDB Developer Guide.
return_values_on_condition_check_failure(ReturnValuesOnConditionCheckFailure)/set_return_values_on_condition_check_failure(Option<ReturnValuesOnConditionCheckFailure>):
required: falseAn optional parameter that returns the item attributes for a
DeleteItemoperation that failed a condition check.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.
- On success, responds with
DeleteItemOutputwith field(s):attributes(Option<HashMap::<String, AttributeValue>>):A map of attribute names to
AttributeValueobjects, representing the item as it appeared before theDeleteItemoperation. This map appears in the response only ifReturnValueswas specified asALL_OLDin the request.consumed_capacity(Option<ConsumedCapacity>):The capacity units consumed by the
DeleteItemoperation. The data returned includes the total provisioned throughput consumed, along with statistics for the table and any indexes involved in the operation.ConsumedCapacityis only returned if theReturnConsumedCapacityparameter was specified. For more information, see Provisioned capacity mode in the Amazon DynamoDB Developer Guide.item_collection_metrics(Option<ItemCollectionMetrics>):Information about item collections, if any, that were affected by the
DeleteItemoperation.ItemCollectionMetricsis only returned if theReturnItemCollectionMetricsparameter was specified. If the table does not have any local secondary indexes, this information is not returned in the response.Each
ItemCollectionMetricselement consists of:-
ItemCollectionKey- The partition key value of the item collection. This is the same as the partition key value of the item itself. -
SizeEstimateRangeGB- 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.The estimate is subject to change over time; therefore, do not rely on the precision or accuracy of the estimate.
-
- On failure, responds with
SdkError<DeleteItemError>
source§impl Client
impl Client
sourcepub fn delete_resource_policy(&self) -> DeleteResourcePolicyFluentBuilder
pub fn delete_resource_policy(&self) -> DeleteResourcePolicyFluentBuilder
Constructs a fluent builder for the DeleteResourcePolicy operation.
- The fluent builder is configurable:
resource_arn(impl Into<String>)/set_resource_arn(Option<String>):
required: trueThe Amazon Resource Name (ARN) of the DynamoDB resource from which the policy will be removed. The resources you can specify include tables and streams. If you remove the policy of a table, it will also remove the permissions for the table’s indexes defined in that policy document. This is because index permissions are defined in the table’s policy.
expected_revision_id(impl Into<String>)/set_expected_revision_id(Option<String>):
required: falseA string value that you can use to conditionally delete your policy. When you provide an expected revision ID, if the revision ID of the existing policy on the resource doesn’t match or if there’s no policy attached to the resource, the request will fail and return a
PolicyNotFoundException.
- On success, responds with
DeleteResourcePolicyOutputwith field(s):revision_id(Option<String>):A unique string that represents the revision ID of the policy. If you’re comparing revision IDs, make sure to always use string comparison logic.
This value will be empty if you make a request against a resource without a policy.
- On failure, responds with
SdkError<DeleteResourcePolicyError>
source§impl Client
impl Client
sourcepub fn delete_table(&self) -> DeleteTableFluentBuilder
pub fn delete_table(&self) -> DeleteTableFluentBuilder
Constructs a fluent builder for the DeleteTable operation.
- The fluent builder is configurable:
table_name(impl Into<String>)/set_table_name(Option<String>):
required: trueThe name of the table to delete. You can also provide the Amazon Resource Name (ARN) of the table in this parameter.
- On success, responds with
DeleteTableOutputwith field(s):table_description(Option<TableDescription>):Represents the properties of a table.
- On failure, responds with
SdkError<DeleteTableError>
source§impl Client
impl Client
sourcepub fn describe_backup(&self) -> DescribeBackupFluentBuilder
pub fn describe_backup(&self) -> DescribeBackupFluentBuilder
Constructs a fluent builder for the DescribeBackup operation.
- The fluent builder is configurable:
backup_arn(impl Into<String>)/set_backup_arn(Option<String>):
required: trueThe Amazon Resource Name (ARN) associated with the backup.
- On success, responds with
DescribeBackupOutputwith field(s):backup_description(Option<BackupDescription>):Contains the description of the backup created for the table.
- On failure, responds with
SdkError<DescribeBackupError>
source§impl Client
impl Client
sourcepub fn describe_continuous_backups(
&self,
) -> DescribeContinuousBackupsFluentBuilder
pub fn describe_continuous_backups( &self, ) -> DescribeContinuousBackupsFluentBuilder
Constructs a fluent builder for the DescribeContinuousBackups operation.
- The fluent builder is configurable:
table_name(impl Into<String>)/set_table_name(Option<String>):
required: trueName of the table for which the customer wants to check the continuous backups and point in time recovery settings.
You can also provide the Amazon Resource Name (ARN) of the table in this parameter.
- On success, responds with
DescribeContinuousBackupsOutputwith field(s):continuous_backups_description(Option<ContinuousBackupsDescription>):Represents the continuous backups and point in time recovery settings on the table.
- On failure, responds with
SdkError<DescribeContinuousBackupsError>
source§impl Client
impl Client
sourcepub fn describe_contributor_insights(
&self,
) -> DescribeContributorInsightsFluentBuilder
pub fn describe_contributor_insights( &self, ) -> DescribeContributorInsightsFluentBuilder
Constructs a fluent builder for the DescribeContributorInsights operation.
- The fluent builder is configurable:
table_name(impl Into<String>)/set_table_name(Option<String>):
required: trueThe name of the table to describe. You can also provide the Amazon Resource Name (ARN) of the table in this parameter.
index_name(impl Into<String>)/set_index_name(Option<String>):
required: falseThe name of the global secondary index to describe, if applicable.
- On success, responds with
DescribeContributorInsightsOutputwith field(s):table_name(Option<String>):The name of the table being described.
index_name(Option<String>):The name of the global secondary index being described.
contributor_insights_rule_list(Option<Vec::<String>>):List of names of the associated contributor insights rules.
contributor_insights_status(Option<ContributorInsightsStatus>):Current status of contributor insights.
last_update_date_time(Option<DateTime>):Timestamp of the last time the status was changed.
failure_exception(Option<FailureException>):Returns information about the last failure that was encountered.
The most common exceptions for a FAILED status are:
-
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.
-
AccessDeniedException - Amazon CloudWatch Contributor Insights rules cannot be modified due to insufficient permissions.
-
AccessDeniedException - Failed to create service-linked role for Contributor Insights due to insufficient permissions.
-
InternalServerError - Failed to create Amazon CloudWatch Contributor Insights rules. Please retry request.
-
- On failure, responds with
SdkError<DescribeContributorInsightsError>
source§impl Client
impl Client
sourcepub fn describe_endpoints(&self) -> DescribeEndpointsFluentBuilder
pub fn describe_endpoints(&self) -> DescribeEndpointsFluentBuilder
Constructs a fluent builder for the DescribeEndpoints operation.
- The fluent builder takes no input, just
sendit. - On success, responds with
DescribeEndpointsOutputwith field(s):endpoints(Vec::<Endpoint>):List of endpoints.
- On failure, responds with
SdkError<DescribeEndpointsError>
source§impl Client
impl Client
sourcepub fn describe_export(&self) -> DescribeExportFluentBuilder
pub fn describe_export(&self) -> DescribeExportFluentBuilder
Constructs a fluent builder for the DescribeExport operation.
- The fluent builder is configurable:
export_arn(impl Into<String>)/set_export_arn(Option<String>):
required: trueThe Amazon Resource Name (ARN) associated with the export.
- On success, responds with
DescribeExportOutputwith field(s):export_description(Option<ExportDescription>):Represents the properties of the export.
- On failure, responds with
SdkError<DescribeExportError>
source§impl Client
impl Client
sourcepub fn describe_global_table(&self) -> DescribeGlobalTableFluentBuilder
pub fn describe_global_table(&self) -> DescribeGlobalTableFluentBuilder
Constructs a fluent builder for the DescribeGlobalTable operation.
- The fluent builder is configurable:
global_table_name(impl Into<String>)/set_global_table_name(Option<String>):
required: trueThe name of the global table.
- On success, responds with
DescribeGlobalTableOutputwith field(s):global_table_description(Option<GlobalTableDescription>):Contains the details of the global table.
- On failure, responds with
SdkError<DescribeGlobalTableError>
source§impl Client
impl Client
sourcepub fn describe_global_table_settings(
&self,
) -> DescribeGlobalTableSettingsFluentBuilder
pub fn describe_global_table_settings( &self, ) -> DescribeGlobalTableSettingsFluentBuilder
Constructs a fluent builder for the DescribeGlobalTableSettings operation.
- The fluent builder is configurable:
global_table_name(impl Into<String>)/set_global_table_name(Option<String>):
required: trueThe name of the global table to describe.
- On success, responds with
DescribeGlobalTableSettingsOutputwith field(s):global_table_name(Option<String>):The name of the global table.
replica_settings(Option<Vec::<ReplicaSettingsDescription>>):The Region-specific settings for the global table.
- On failure, responds with
SdkError<DescribeGlobalTableSettingsError>
source§impl Client
impl Client
sourcepub fn describe_import(&self) -> DescribeImportFluentBuilder
pub fn describe_import(&self) -> DescribeImportFluentBuilder
Constructs a fluent builder for the DescribeImport operation.
- The fluent builder is configurable:
import_arn(impl Into<String>)/set_import_arn(Option<String>):
required: trueThe Amazon Resource Name (ARN) associated with the table you’re importing to.
- On success, responds with
DescribeImportOutputwith field(s):import_table_description(Option<ImportTableDescription>):Represents the properties of the table created for the import, and parameters of the import. The import parameters include import status, how many items were processed, and how many errors were encountered.
- On failure, responds with
SdkError<DescribeImportError>
source§impl Client
impl Client
sourcepub fn describe_kinesis_streaming_destination(
&self,
) -> DescribeKinesisStreamingDestinationFluentBuilder
pub fn describe_kinesis_streaming_destination( &self, ) -> DescribeKinesisStreamingDestinationFluentBuilder
Constructs a fluent builder for the DescribeKinesisStreamingDestination operation.
- The fluent builder is configurable:
table_name(impl Into<String>)/set_table_name(Option<String>):
required: trueThe name of the table being described. You can also provide the Amazon Resource Name (ARN) of the table in this parameter.
- On success, responds with
DescribeKinesisStreamingDestinationOutputwith field(s):table_name(Option<String>):The name of the table being described.
kinesis_data_stream_destinations(Option<Vec::<KinesisDataStreamDestination>>):The list of replica structures for the table being described.
- On failure, responds with
SdkError<DescribeKinesisStreamingDestinationError>
source§impl Client
impl Client
sourcepub fn describe_limits(&self) -> DescribeLimitsFluentBuilder
pub fn describe_limits(&self) -> DescribeLimitsFluentBuilder
Constructs a fluent builder for the DescribeLimits operation.
- The fluent builder takes no input, just
sendit. - On success, responds with
DescribeLimitsOutputwith field(s):account_max_read_capacity_units(Option<i64>):The maximum total read capacity units that your account allows you to provision across all of your tables in this Region.
account_max_write_capacity_units(Option<i64>):The maximum total write capacity units that your account allows you to provision across all of your tables in this Region.
table_max_read_capacity_units(Option<i64>):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).
table_max_write_capacity_units(Option<i64>):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).
- On failure, responds with
SdkError<DescribeLimitsError>
source§impl Client
impl Client
sourcepub fn describe_table(&self) -> DescribeTableFluentBuilder
pub fn describe_table(&self) -> DescribeTableFluentBuilder
Constructs a fluent builder for the DescribeTable operation.
- The fluent builder is configurable:
table_name(impl Into<String>)/set_table_name(Option<String>):
required: trueThe name of the table to describe. You can also provide the Amazon Resource Name (ARN) of the table in this parameter.
- On success, responds with
DescribeTableOutputwith field(s):table(Option<TableDescription>):The properties of the table.
- On failure, responds with
SdkError<DescribeTableError>
source§impl Client
impl Client
sourcepub fn describe_table_replica_auto_scaling(
&self,
) -> DescribeTableReplicaAutoScalingFluentBuilder
pub fn describe_table_replica_auto_scaling( &self, ) -> DescribeTableReplicaAutoScalingFluentBuilder
Constructs a fluent builder for the DescribeTableReplicaAutoScaling operation.
- The fluent builder is configurable:
table_name(impl Into<String>)/set_table_name(Option<String>):
required: trueThe name of the table. You can also provide the Amazon Resource Name (ARN) of the table in this parameter.
- On success, responds with
DescribeTableReplicaAutoScalingOutputwith field(s):table_auto_scaling_description(Option<TableAutoScalingDescription>):Represents the auto scaling properties of the table.
- On failure, responds with
SdkError<DescribeTableReplicaAutoScalingError>
source§impl Client
impl Client
sourcepub fn describe_time_to_live(&self) -> DescribeTimeToLiveFluentBuilder
pub fn describe_time_to_live(&self) -> DescribeTimeToLiveFluentBuilder
Constructs a fluent builder for the DescribeTimeToLive operation.
- The fluent builder is configurable:
table_name(impl Into<String>)/set_table_name(Option<String>):
required: trueThe name of the table to be described. You can also provide the Amazon Resource Name (ARN) of the table in this parameter.
- On success, responds with
DescribeTimeToLiveOutputwith field(s): - On failure, responds with
SdkError<DescribeTimeToLiveError>
source§impl Client
impl Client
sourcepub fn disable_kinesis_streaming_destination(
&self,
) -> DisableKinesisStreamingDestinationFluentBuilder
pub fn disable_kinesis_streaming_destination( &self, ) -> DisableKinesisStreamingDestinationFluentBuilder
Constructs a fluent builder for the DisableKinesisStreamingDestination operation.
- The fluent builder is configurable:
table_name(impl Into<String>)/set_table_name(Option<String>):
required: trueThe name of the DynamoDB table. You can also provide the Amazon Resource Name (ARN) of the table in this parameter.
stream_arn(impl Into<String>)/set_stream_arn(Option<String>):
required: trueThe ARN for a Kinesis data stream.
enable_kinesis_streaming_configuration(EnableKinesisStreamingConfiguration)/set_enable_kinesis_streaming_configuration(Option<EnableKinesisStreamingConfiguration>):
required: falseThe source for the Kinesis streaming information that is being enabled.
- On success, responds with
DisableKinesisStreamingDestinationOutputwith field(s):table_name(Option<String>):The name of the table being modified.
stream_arn(Option<String>):The ARN for the specific Kinesis data stream.
destination_status(Option<DestinationStatus>):The current status of the replication.
enable_kinesis_streaming_configuration(Option<EnableKinesisStreamingConfiguration>):The destination for the Kinesis streaming information that is being enabled.
- On failure, responds with
SdkError<DisableKinesisStreamingDestinationError>
source§impl Client
impl Client
sourcepub fn enable_kinesis_streaming_destination(
&self,
) -> EnableKinesisStreamingDestinationFluentBuilder
pub fn enable_kinesis_streaming_destination( &self, ) -> EnableKinesisStreamingDestinationFluentBuilder
Constructs a fluent builder for the EnableKinesisStreamingDestination operation.
- The fluent builder is configurable:
table_name(impl Into<String>)/set_table_name(Option<String>):
required: trueThe name of the DynamoDB table. You can also provide the Amazon Resource Name (ARN) of the table in this parameter.
stream_arn(impl Into<String>)/set_stream_arn(Option<String>):
required: trueThe ARN for a Kinesis data stream.
enable_kinesis_streaming_configuration(EnableKinesisStreamingConfiguration)/set_enable_kinesis_streaming_configuration(Option<EnableKinesisStreamingConfiguration>):
required: falseThe source for the Kinesis streaming information that is being enabled.
- On success, responds with
EnableKinesisStreamingDestinationOutputwith field(s):table_name(Option<String>):The name of the table being modified.
stream_arn(Option<String>):The ARN for the specific Kinesis data stream.
destination_status(Option<DestinationStatus>):The current status of the replication.
enable_kinesis_streaming_configuration(Option<EnableKinesisStreamingConfiguration>):The destination for the Kinesis streaming information that is being enabled.
- On failure, responds with
SdkError<EnableKinesisStreamingDestinationError>
source§impl Client
impl Client
sourcepub fn execute_statement(&self) -> ExecuteStatementFluentBuilder
pub fn execute_statement(&self) -> ExecuteStatementFluentBuilder
Constructs a fluent builder for the ExecuteStatement operation.
- The fluent builder is configurable:
statement(impl Into<String>)/set_statement(Option<String>):
required: trueThe PartiQL statement representing the operation to run.
parameters(AttributeValue)/set_parameters(Option<Vec::<AttributeValue>>):
required: falseThe parameters for the PartiQL statement, if any.
consistent_read(bool)/set_consistent_read(Option<bool>):
required: falseThe consistency of a read operation. If set to
true, then a strongly consistent read is used; otherwise, an eventually consistent read is used.next_token(impl Into<String>)/set_next_token(Option<String>):
required: falseSet this value to get remaining results, if
NextTokenwas returned in the statement response.return_consumed_capacity(ReturnConsumedCapacity)/set_return_consumed_capacity(Option<ReturnConsumedCapacity>):
required: falseDetermines the level of detail about either provisioned or on-demand throughput consumption that is returned in the response:
-
INDEXES- The response includes the aggregateConsumedCapacityfor the operation, together withConsumedCapacityfor each table and secondary index that was accessed.Note that some operations, such as
GetItemandBatchGetItem, do not access any indexes at all. In these cases, specifyingINDEXESwill only returnConsumedCapacityinformation for table(s). -
TOTAL- The response includes only the aggregateConsumedCapacityfor the operation. -
NONE- NoConsumedCapacitydetails are included in the response.
-
limit(i32)/set_limit(Option<i32>):
required: falseThe 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, along with a key in
LastEvaluatedKeyto apply in a subsequent operation so 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 inLastEvaluatedKeyto apply in a subsequent operation to continue the operation.return_values_on_condition_check_failure(ReturnValuesOnConditionCheckFailure)/set_return_values_on_condition_check_failure(Option<ReturnValuesOnConditionCheckFailure>):
required: falseAn optional parameter that returns the item attributes for an
ExecuteStatementoperation that failed a condition check.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.
- On success, responds with
ExecuteStatementOutputwith field(s):items(Option<Vec::<HashMap::<String, AttributeValue>>>):If a read operation was used, this property will contain the result of the read operation; a map of attribute names and their values. For the write operations this value will be empty.
next_token(Option<String>):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.
consumed_capacity(Option<ConsumedCapacity>):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.
ConsumedCapacityis only returned if the request asked for it. For more information, see Provisioned capacity mode in the Amazon DynamoDB Developer Guide.last_evaluated_key(Option<HashMap::<String, AttributeValue>>):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. If
LastEvaluatedKeyis empty, then the “last page” of results has been processed and there is no more data to be retrieved. IfLastEvaluatedKeyis 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 whenLastEvaluatedKeyis empty.
- On failure, responds with
SdkError<ExecuteStatementError>
source§impl Client
impl Client
sourcepub fn execute_transaction(&self) -> ExecuteTransactionFluentBuilder
pub fn execute_transaction(&self) -> ExecuteTransactionFluentBuilder
Constructs a fluent builder for the ExecuteTransaction operation.
- The fluent builder is configurable:
transact_statements(ParameterizedStatement)/set_transact_statements(Option<Vec::<ParameterizedStatement>>):
required: trueThe list of PartiQL statements representing the transaction to run.
client_request_token(impl Into<String>)/set_client_request_token(Option<String>):
required: falseSet this value to get remaining results, if
NextTokenwas returned in the statement response.return_consumed_capacity(ReturnConsumedCapacity)/set_return_consumed_capacity(Option<ReturnConsumedCapacity>):
required: falseDetermines the level of detail about either provisioned or on-demand throughput consumption that is returned in the response. For more information, see TransactGetItems and TransactWriteItems.
- On success, responds with
ExecuteTransactionOutputwith field(s):responses(Option<Vec::<ItemResponse>>):The response to a PartiQL transaction.
consumed_capacity(Option<Vec::<ConsumedCapacity>>):The capacity units consumed by the entire operation. The values of the list are ordered according to the ordering of the statements.
- On failure, responds with
SdkError<ExecuteTransactionError>
source§impl Client
impl Client
sourcepub fn export_table_to_point_in_time(
&self,
) -> ExportTableToPointInTimeFluentBuilder
pub fn export_table_to_point_in_time( &self, ) -> ExportTableToPointInTimeFluentBuilder
Constructs a fluent builder for the ExportTableToPointInTime operation.
- The fluent builder is configurable:
table_arn(impl Into<String>)/set_table_arn(Option<String>):
required: trueThe Amazon Resource Name (ARN) associated with the table to export.
export_time(DateTime)/set_export_time(Option<DateTime>):
required: falseTime in the past from which to export table data, counted in seconds from the start of the Unix epoch. The table export will be a snapshot of the table’s state at this point in time.
client_token(impl Into<String>)/set_client_token(Option<String>):
required: falseProviding a
ClientTokenmakes the call toExportTableToPointInTimeInputidempotent, meaning that multiple identical calls have the same effect as one single call.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.
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
ImportConflictException.s3_bucket(impl Into<String>)/set_s3_bucket(Option<String>):
required: trueThe name of the Amazon S3 bucket to export the snapshot to.
s3_bucket_owner(impl Into<String>)/set_s3_bucket_owner(Option<String>):
required: falseThe ID of the Amazon Web Services account that owns the bucket the export will be stored in.
S3BucketOwner is a required parameter when exporting to a S3 bucket in another account.
s3_prefix(impl Into<String>)/set_s3_prefix(Option<String>):
required: falseThe Amazon S3 bucket prefix to use as the file name and path of the exported snapshot.
s3_sse_algorithm(S3SseAlgorithm)/set_s3_sse_algorithm(Option<S3SseAlgorithm>):
required: falseType of encryption used on the bucket where export data will be stored. Valid values for
S3SseAlgorithmare:-
AES256- server-side encryption with Amazon S3 managed keys -
KMS- server-side encryption with KMS managed keys
-
s3_sse_kms_key_id(impl Into<String>)/set_s3_sse_kms_key_id(Option<String>):
required: falseThe ID of the KMS managed key used to encrypt the S3 bucket where export data will be stored (if applicable).
export_format(ExportFormat)/set_export_format(Option<ExportFormat>):
required: falseThe format for the exported data. Valid values for
ExportFormatareDYNAMODB_JSONorION.export_type(ExportType)/set_export_type(Option<ExportType>):
required: falseChoice of whether to execute as a full export or incremental export. Valid values are FULL_EXPORT or INCREMENTAL_EXPORT. The default value is FULL_EXPORT. If INCREMENTAL_EXPORT is provided, the IncrementalExportSpecification must also be used.
incremental_export_specification(IncrementalExportSpecification)/set_incremental_export_specification(Option<IncrementalExportSpecification>):
required: falseOptional object containing the parameters specific to an incremental export.
- On success, responds with
ExportTableToPointInTimeOutputwith field(s):export_description(Option<ExportDescription>):Contains a description of the table export.
- On failure, responds with
SdkError<ExportTableToPointInTimeError>
source§impl Client
impl Client
sourcepub fn get_item(&self) -> GetItemFluentBuilder
pub fn get_item(&self) -> GetItemFluentBuilder
Constructs a fluent builder for the GetItem operation.
- The fluent builder is configurable:
table_name(impl Into<String>)/set_table_name(Option<String>):
required: trueThe name of the table containing the requested item. You can also provide the Amazon Resource Name (ARN) of the table in this parameter.
key(impl Into<String>, AttributeValue)/set_key(Option<HashMap::<String, AttributeValue>>):
required: trueA map of attribute names to
AttributeValueobjects, representing the primary key of the item to retrieve.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.
attributes_to_get(impl Into<String>)/set_attributes_to_get(Option<Vec::<String>>):
required: falseThis is a legacy parameter. Use
ProjectionExpressioninstead. For more information, see AttributesToGet in the Amazon DynamoDB Developer Guide.consistent_read(bool)/set_consistent_read(Option<bool>):
required: falseDetermines the read consistency model: If set to
true, then the operation uses strongly consistent reads; otherwise, the operation uses eventually consistent reads.return_consumed_capacity(ReturnConsumedCapacity)/set_return_consumed_capacity(Option<ReturnConsumedCapacity>):
required: falseDetermines the level of detail about either provisioned or on-demand throughput consumption that is returned in the response:
-
INDEXES- The response includes the aggregateConsumedCapacityfor the operation, together withConsumedCapacityfor each table and secondary index that was accessed.Note that some operations, such as
GetItemandBatchGetItem, do not access any indexes at all. In these cases, specifyingINDEXESwill only returnConsumedCapacityinformation for table(s). -
TOTAL- The response includes only the aggregateConsumedCapacityfor the operation. -
NONE- NoConsumedCapacitydetails are included in the response.
-
projection_expression(impl Into<String>)/set_projection_expression(Option<String>):
required: falseA 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.
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.
For more information, see Specifying Item Attributes in the Amazon DynamoDB Developer Guide.
expression_attribute_names(impl Into<String>, impl Into<String>)/set_expression_attribute_names(Option<HashMap::<String, String>>):
required: falseOne or more substitution tokens for attribute names in an expression. The following are some use cases for using
ExpressionAttributeNames:-
To access an attribute whose name conflicts with a DynamoDB reserved word.
-
To create a placeholder for repeating occurrences of an attribute name in an expression.
-
To prevent special characters in an attribute name from being misinterpreted in an expression.
Use the # character in an expression to dereference an attribute name. For example, consider the following attribute name:
-
Percentile
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 Reserved Words in the Amazon DynamoDB Developer Guide). To work around this, you could specify the following for
ExpressionAttributeNames:-
{“#P”:“Percentile”}
You could then use this substitution in an expression, as in this example:
-
#P = :val
Tokens that begin with the : character are expression attribute values, which are placeholders for the actual value at runtime.
For more information on expression attribute names, see Specifying Item Attributes in the Amazon DynamoDB Developer Guide.
-
- On success, responds with
GetItemOutputwith field(s):item(Option<HashMap::<String, AttributeValue>>):A map of attribute names to
AttributeValueobjects, as specified byProjectionExpression.consumed_capacity(Option<ConsumedCapacity>):The capacity units consumed by the
GetItemoperation. The data returned includes the total provisioned throughput consumed, along with statistics for the table and any indexes involved in the operation.ConsumedCapacityis only returned if theReturnConsumedCapacityparameter was specified. For more information, see Capacity unit consumption for read operations in the Amazon DynamoDB Developer Guide.
- On failure, responds with
SdkError<GetItemError>
source§impl Client
impl Client
sourcepub fn get_resource_policy(&self) -> GetResourcePolicyFluentBuilder
pub fn get_resource_policy(&self) -> GetResourcePolicyFluentBuilder
Constructs a fluent builder for the GetResourcePolicy operation.
- The fluent builder is configurable:
resource_arn(impl Into<String>)/set_resource_arn(Option<String>):
required: trueThe Amazon Resource Name (ARN) of the DynamoDB resource to which the policy is attached. The resources you can specify include tables and streams.
- On success, responds with
GetResourcePolicyOutputwith field(s):policy(Option<String>):The resource-based policy document attached to the resource, which can be a table or stream, in JSON format.
revision_id(Option<String>):A unique string that represents the revision ID of the policy. If you’re comparing revision IDs, make sure to always use string comparison logic.
- On failure, responds with
SdkError<GetResourcePolicyError>
source§impl Client
impl Client
sourcepub fn import_table(&self) -> ImportTableFluentBuilder
pub fn import_table(&self) -> ImportTableFluentBuilder
Constructs a fluent builder for the ImportTable operation.
- The fluent builder is configurable:
client_token(impl Into<String>)/set_client_token(Option<String>):
required: falseProviding a
ClientTokenmakes the call toImportTableInputidempotent, meaning that multiple identical calls have the same effect as one single call.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.
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
IdempotentParameterMismatchexception.s3_bucket_source(S3BucketSource)/set_s3_bucket_source(Option<S3BucketSource>):
required: trueThe S3 bucket that provides the source for the import.
input_format(InputFormat)/set_input_format(Option<InputFormat>):
required: trueThe format of the source data. Valid values for
ImportFormatareCSV,DYNAMODB_JSONorION.input_format_options(InputFormatOptions)/set_input_format_options(Option<InputFormatOptions>):
required: falseAdditional properties that specify how the input is formatted,
input_compression_type(InputCompressionType)/set_input_compression_type(Option<InputCompressionType>):
required: falseType of compression to be used on the input coming from the imported table.
table_creation_parameters(TableCreationParameters)/set_table_creation_parameters(Option<TableCreationParameters>):
required: trueParameters for the table to import the data into.
- On success, responds with
ImportTableOutputwith field(s):import_table_description(Option<ImportTableDescription>):Represents the properties of the table created for the import, and parameters of the import. The import parameters include import status, how many items were processed, and how many errors were encountered.
- On failure, responds with
SdkError<ImportTableError>
source§impl Client
impl Client
sourcepub fn list_backups(&self) -> ListBackupsFluentBuilder
pub fn list_backups(&self) -> ListBackupsFluentBuilder
Constructs a fluent builder for the ListBackups operation.
- The fluent builder is configurable:
table_name(impl Into<String>)/set_table_name(Option<String>):
required: falseLists the backups from the table specified in
TableName. You can also provide the Amazon Resource Name (ARN) of the table in this parameter.limit(i32)/set_limit(Option<i32>):
required: falseMaximum number of backups to return at once.
time_range_lower_bound(DateTime)/set_time_range_lower_bound(Option<DateTime>):
required: falseOnly backups created after this time are listed.
TimeRangeLowerBoundis inclusive.time_range_upper_bound(DateTime)/set_time_range_upper_bound(Option<DateTime>):
required: falseOnly backups created before this time are listed.
TimeRangeUpperBoundis exclusive.exclusive_start_backup_arn(impl Into<String>)/set_exclusive_start_backup_arn(Option<String>):
required: falseLastEvaluatedBackupArnis 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 theExclusiveStartBackupArnof a newListBackupsoperation in order to fetch the next page of results.backup_type(BackupTypeFilter)/set_backup_type(Option<BackupTypeFilter>):
required: falseThe backups from the table specified by
BackupTypeare listed.Where
BackupTypecan be:-
USER- On-demand backup created by you. (The default setting if no other backup types are specified.) -
SYSTEM- On-demand backup automatically created by DynamoDB. -
ALL- All types of on-demand backups (USER and SYSTEM).
-
- On success, responds with
ListBackupsOutputwith field(s):backup_summaries(Option<Vec::<BackupSummary>>):List of
BackupSummaryobjects.last_evaluated_backup_arn(Option<String>):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
ExclusiveStartBackupArnof a newListBackupsoperation in order to fetch the next page of results.If
LastEvaluatedBackupArnis empty, then the last page of results has been processed and there are no more results to be retrieved.If
LastEvaluatedBackupArnis 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 forLastEvaluatedBackupArnis returned.
- On failure, responds with
SdkError<ListBackupsError>
source§impl Client
impl Client
sourcepub fn list_contributor_insights(&self) -> ListContributorInsightsFluentBuilder
pub fn list_contributor_insights(&self) -> ListContributorInsightsFluentBuilder
Constructs a fluent builder for the ListContributorInsights operation.
This operation supports pagination; See into_paginator().
- The fluent builder is configurable:
table_name(impl Into<String>)/set_table_name(Option<String>):
required: falseThe name of the table. You can also provide the Amazon Resource Name (ARN) of the table in this parameter.
next_token(impl Into<String>)/set_next_token(Option<String>):
required: falseA token to for the desired page, if there is one.
max_results(i32)/set_max_results(Option<i32>):
required: falseMaximum number of results to return per page.
- On success, responds with
ListContributorInsightsOutputwith field(s):contributor_insights_summaries(Option<Vec::<ContributorInsightsSummary>>):A list of ContributorInsightsSummary.
next_token(Option<String>):A token to go to the next page if there is one.
- On failure, responds with
SdkError<ListContributorInsightsError>
source§impl Client
impl Client
sourcepub fn list_exports(&self) -> ListExportsFluentBuilder
pub fn list_exports(&self) -> ListExportsFluentBuilder
Constructs a fluent builder for the ListExports operation.
This operation supports pagination; See into_paginator().
- The fluent builder is configurable:
table_arn(impl Into<String>)/set_table_arn(Option<String>):
required: falseThe Amazon Resource Name (ARN) associated with the exported table.
max_results(i32)/set_max_results(Option<i32>):
required: falseMaximum number of results to return per page.
next_token(impl Into<String>)/set_next_token(Option<String>):
required: falseAn optional string that, if supplied, must be copied from the output of a previous call to
ListExports. When provided in this manner, the API fetches the next page of results.
- On success, responds with
ListExportsOutputwith field(s):export_summaries(Option<Vec::<ExportSummary>>):A list of
ExportSummaryobjects.next_token(Option<String>):If this value is returned, there are additional results to be displayed. To retrieve them, call
ListExportsagain, withNextTokenset to this value.
- On failure, responds with
SdkError<ListExportsError>
source§impl Client
impl Client
sourcepub fn list_global_tables(&self) -> ListGlobalTablesFluentBuilder
pub fn list_global_tables(&self) -> ListGlobalTablesFluentBuilder
Constructs a fluent builder for the ListGlobalTables operation.
- The fluent builder is configurable:
exclusive_start_global_table_name(impl Into<String>)/set_exclusive_start_global_table_name(Option<String>):
required: falseThe first global table name that this operation will evaluate.
limit(i32)/set_limit(Option<i32>):
required: falseThe maximum number of table names to return, if the parameter is not specified DynamoDB defaults to 100.
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
LastEvaluatedGlobalTableNameto apply in a subsequent operation to theExclusiveStartGlobalTableNameparameter.region_name(impl Into<String>)/set_region_name(Option<String>):
required: falseLists the global tables in a specific Region.
- On success, responds with
ListGlobalTablesOutputwith field(s):global_tables(Option<Vec::<GlobalTable>>):List of global table names.
last_evaluated_global_table_name(Option<String>):Last evaluated global table name.
- On failure, responds with
SdkError<ListGlobalTablesError>
source§impl Client
impl Client
sourcepub fn list_imports(&self) -> ListImportsFluentBuilder
pub fn list_imports(&self) -> ListImportsFluentBuilder
Constructs a fluent builder for the ListImports operation.
This operation supports pagination; See into_paginator().
- The fluent builder is configurable:
table_arn(impl Into<String>)/set_table_arn(Option<String>):
required: falseThe Amazon Resource Name (ARN) associated with the table that was imported to.
page_size(i32)/set_page_size(Option<i32>):
required: falseThe number of
ImportSummaryobjects returned in a single page.next_token(impl Into<String>)/set_next_token(Option<String>):
required: falseAn optional string that, if supplied, must be copied from the output of a previous call to
ListImports. When provided in this manner, the API fetches the next page of results.
- On success, responds with
ListImportsOutputwith field(s):import_summary_list(Option<Vec::<ImportSummary>>):A list of
ImportSummaryobjects.next_token(Option<String>):If this value is returned, there are additional results to be displayed. To retrieve them, call
ListImportsagain, withNextTokenset to this value.
- On failure, responds with
SdkError<ListImportsError>
source§impl Client
impl Client
sourcepub fn list_tables(&self) -> ListTablesFluentBuilder
pub fn list_tables(&self) -> ListTablesFluentBuilder
Constructs a fluent builder for the ListTables operation.
This operation supports pagination; See into_paginator().
- The fluent builder is configurable:
exclusive_start_table_name(impl Into<String>)/set_exclusive_start_table_name(Option<String>):
required: falseThe first table name that this operation will evaluate. Use the value that was returned for
LastEvaluatedTableNamein a previous operation, so that you can obtain the next page of results.limit(i32)/set_limit(Option<i32>):
required: falseA maximum number of table names to return. If this parameter is not specified, the limit is 100.
- On success, responds with
ListTablesOutputwith field(s):table_names(Option<Vec::<String>>):The names of the tables associated with the current account at the current endpoint. The maximum size of this array is 100.
If
LastEvaluatedTableNamealso appears in the output, you can use this value as theExclusiveStartTableNameparameter in a subsequentListTablesrequest and obtain the next page of results.last_evaluated_table_name(Option<String>):The name of the last table in the current page of results. Use this value as the
ExclusiveStartTableNamein a new request to obtain the next page of results, until all the table names are returned.If you do not receive a
LastEvaluatedTableNamevalue in the response, this means that there are no more table names to be retrieved.
- On failure, responds with
SdkError<ListTablesError>
source§impl Client
impl Client
Constructs a fluent builder for the ListTagsOfResource operation.
- The fluent builder is configurable:
resource_arn(impl Into<String>)/set_resource_arn(Option<String>):
required: trueThe Amazon DynamoDB resource with tags to be listed. This value is an Amazon Resource Name (ARN).
next_token(impl Into<String>)/set_next_token(Option<String>):
required: falseAn 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.
- On success, responds with
ListTagsOfResourceOutputwith field(s):tags(Option<Vec::<Tag>>):The tags currently associated with the Amazon DynamoDB resource.
next_token(Option<String>):If this value is returned, there are additional results to be displayed. To retrieve them, call ListTagsOfResource again, with NextToken set to this value.
- On failure, responds with
SdkError<ListTagsOfResourceError>
source§impl Client
impl Client
sourcepub fn put_item(&self) -> PutItemFluentBuilder
pub fn put_item(&self) -> PutItemFluentBuilder
Constructs a fluent builder for the PutItem operation.
- The fluent builder is configurable:
table_name(impl Into<String>)/set_table_name(Option<String>):
required: trueThe name of the table to contain the item. You can also provide the Amazon Resource Name (ARN) of the table in this parameter.
item(impl Into<String>, AttributeValue)/set_item(Option<HashMap::<String, AttributeValue>>):
required: trueA 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.
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.
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.
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.
For more information about primary keys, see Primary Key in the Amazon DynamoDB Developer Guide.
Each element in the
Itemmap is anAttributeValueobject.expected(impl Into<String>, ExpectedAttributeValue)/set_expected(Option<HashMap::<String, ExpectedAttributeValue>>):
required: falseThis is a legacy parameter. Use
ConditionExpressioninstead. For more information, see Expected in the Amazon DynamoDB Developer Guide.return_values(ReturnValue)/set_return_values(Option<ReturnValue>):
required: falseUse
ReturnValuesif you want to get the item attributes as they appeared before they were updated with thePutItemrequest. ForPutItem, the valid values are:-
NONE- IfReturnValuesis not specified, or if its value isNONE, then nothing is returned. (This setting is the default forReturnValues.) -
ALL_OLD- IfPutItemoverwrote an attribute name-value pair, then the content of the old item is returned.
The values returned are strongly consistent.
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.
The
ReturnValuesparameter is used by several DynamoDB operations; however,PutItemdoes not recognize any values other thanNONEorALL_OLD.-
return_consumed_capacity(ReturnConsumedCapacity)/set_return_consumed_capacity(Option<ReturnConsumedCapacity>):
required: falseDetermines the level of detail about either provisioned or on-demand throughput consumption that is returned in the response:
-
INDEXES- The response includes the aggregateConsumedCapacityfor the operation, together withConsumedCapacityfor each table and secondary index that was accessed.Note that some operations, such as
GetItemandBatchGetItem, do not access any indexes at all. In these cases, specifyingINDEXESwill only returnConsumedCapacityinformation for table(s). -
TOTAL- The response includes only the aggregateConsumedCapacityfor the operation. -
NONE- NoConsumedCapacitydetails are included in the response.
-
return_item_collection_metrics(ReturnItemCollectionMetrics)/set_return_item_collection_metrics(Option<ReturnItemCollectionMetrics>):
required: falseDetermines whether item collection metrics are returned. If set to
SIZE, the response includes statistics about item collections, if any, that were modified during the operation are returned in the response. If set toNONE(the default), no statistics are returned.conditional_operator(ConditionalOperator)/set_conditional_operator(Option<ConditionalOperator>):
required: falseThis is a legacy parameter. Use
ConditionExpressioninstead. For more information, see ConditionalOperator in the Amazon DynamoDB Developer Guide.condition_expression(impl Into<String>)/set_condition_expression(Option<String>):
required: falseA condition that must be satisfied in order for a conditional
PutItemoperation to succeed.An expression can contain any of the following:
-
Functions:
attribute_exists | attribute_not_exists | attribute_type | contains | begins_with | sizeThese function names are case-sensitive.
-
Comparison operators:
= | <> | < | > | <= | >= | BETWEEN | IN -
Logical operators:
AND | OR | NOT
For more information on condition expressions, see Condition Expressions in the Amazon DynamoDB Developer Guide.
-
expression_attribute_names(impl Into<String>, impl Into<String>)/set_expression_attribute_names(Option<HashMap::<String, String>>):
required: falseOne or more substitution tokens for attribute names in an expression. The following are some use cases for using
ExpressionAttributeNames:-
To access an attribute whose name conflicts with a DynamoDB reserved word.
-
To create a placeholder for repeating occurrences of an attribute name in an expression.
-
To prevent special characters in an attribute name from being misinterpreted in an expression.
Use the # character in an expression to dereference an attribute name. For example, consider the following attribute name:
-
Percentile
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 Reserved Words in the Amazon DynamoDB Developer Guide). To work around this, you could specify the following for
ExpressionAttributeNames:-
{“#P”:“Percentile”}
You could then use this substitution in an expression, as in this example:
-
#P = :val
Tokens that begin with the : character are expression attribute values, which are placeholders for the actual value at runtime.
For more information on expression attribute names, see Specifying Item Attributes in the Amazon DynamoDB Developer Guide.
-
expression_attribute_values(impl Into<String>, AttributeValue)/set_expression_attribute_values(Option<HashMap::<String, AttributeValue>>):
required: falseOne or more values that can be substituted in an expression.
Use the : (colon) character in an expression to dereference an attribute value. For example, suppose that you wanted to check whether the value of the ProductStatus attribute was one of the following:
Available | Backordered | DiscontinuedYou would first need to specify
ExpressionAttributeValuesas follows:{ “:avail”:{“S”:“Available”}, “:back”:{“S”:“Backordered”}, “:disc”:{“S”:“Discontinued”} }You could then use these values in an expression, such as this:
ProductStatus IN (:avail, :back, :disc)For more information on expression attribute values, see Condition Expressions in the Amazon DynamoDB Developer Guide.
return_values_on_condition_check_failure(ReturnValuesOnConditionCheckFailure)/set_return_values_on_condition_check_failure(Option<ReturnValuesOnConditionCheckFailure>):
required: falseAn optional parameter that returns the item attributes for a
PutItemoperation that failed a condition check.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.
- On success, responds with
PutItemOutputwith field(s):attributes(Option<HashMap::<String, AttributeValue>>):The attribute values as they appeared before the
PutItemoperation, but only ifReturnValuesis specified asALL_OLDin the request. Each element consists of an attribute name and an attribute value.consumed_capacity(Option<ConsumedCapacity>):The capacity units consumed by the
PutItemoperation. The data returned includes the total provisioned throughput consumed, along with statistics for the table and any indexes involved in the operation.ConsumedCapacityis only returned if theReturnConsumedCapacityparameter was specified. For more information, see Capacity unity consumption for write operations in the Amazon DynamoDB Developer Guide.item_collection_metrics(Option<ItemCollectionMetrics>):Information about item collections, if any, that were affected by the
PutItemoperation.ItemCollectionMetricsis only returned if theReturnItemCollectionMetricsparameter was specified. If the table does not have any local secondary indexes, this information is not returned in the response.Each
ItemCollectionMetricselement consists of:-
ItemCollectionKey- The partition key value of the item collection. This is the same as the partition key value of the item itself. -
SizeEstimateRangeGB- 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.The estimate is subject to change over time; therefore, do not rely on the precision or accuracy of the estimate.
-
- On failure, responds with
SdkError<PutItemError>
source§impl Client
impl Client
sourcepub fn put_resource_policy(&self) -> PutResourcePolicyFluentBuilder
pub fn put_resource_policy(&self) -> PutResourcePolicyFluentBuilder
Constructs a fluent builder for the PutResourcePolicy operation.
- The fluent builder is configurable:
resource_arn(impl Into<String>)/set_resource_arn(Option<String>):
required: trueThe Amazon Resource Name (ARN) of the DynamoDB resource to which the policy will be attached. The resources you can specify include tables and streams.
You can control index permissions using the base table’s policy. To specify the same permission level for your table and its indexes, you can provide both the table and index Amazon Resource Name (ARN)s in the
Resourcefield of a givenStatementin your policy document. Alternatively, to specify different permissions for your table, indexes, or both, you can define multipleStatementfields in your policy document.policy(impl Into<String>)/set_policy(Option<String>):
required: trueAn Amazon Web Services resource-based policy document in JSON format.
-
The maximum size supported for a resource-based policy document is 20 KB. DynamoDB counts whitespaces when calculating the size of a policy against this limit.
-
Within a resource-based policy, if the action for a DynamoDB service-linked role (SLR) to replicate data for a global table is denied, adding or deleting a replica will fail with an error.
For a full list of all considerations that apply while attaching a resource-based policy, see Resource-based policy considerations.
-
expected_revision_id(impl Into<String>)/set_expected_revision_id(Option<String>):
required: falseA string value that you can use to conditionally update your policy. You can provide the revision ID of your existing policy to make mutating requests against that policy.
When you provide an expected revision ID, if the revision ID of the existing policy on the resource doesn’t match or if there’s no policy attached to the resource, your request will be rejected with a
PolicyNotFoundException.To conditionally attach a policy when no policy exists for the resource, specify
NO_POLICYfor the revision ID.confirm_remove_self_resource_access(bool)/set_confirm_remove_self_resource_access(Option<bool>):
required: falseSet this parameter to
trueto confirm that you want to remove your permissions to change the policy of this resource in the future.
- On success, responds with
PutResourcePolicyOutputwith field(s):revision_id(Option<String>):A unique string that represents the revision ID of the policy. If you’re comparing revision IDs, make sure to always use string comparison logic.
- On failure, responds with
SdkError<PutResourcePolicyError>
source§impl Client
impl Client
sourcepub fn query(&self) -> QueryFluentBuilder
pub fn query(&self) -> QueryFluentBuilder
Constructs a fluent builder for the Query operation.
This operation supports pagination; See into_paginator().
- The fluent builder is configurable:
table_name(impl Into<String>)/set_table_name(Option<String>):
required: trueThe name of the table containing the requested items. You can also provide the Amazon Resource Name (ARN) of the table in this parameter.
index_name(impl Into<String>)/set_index_name(Option<String>):
required: falseThe 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
IndexNameparameter, you must also provideTableName.select(Select)/set_select(Option<Select>):
required: falseThe 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.
-
ALL_ATTRIBUTES- 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. -
ALL_PROJECTED_ATTRIBUTES- 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 specifyingALL_ATTRIBUTES. -
COUNT- Returns the number of matching items, rather than the matching items themselves. Note that this uses the same quantity of read capacity units as getting the items, and is subject to the same item size calculations. -
SPECIFIC_ATTRIBUTES- Returns only the attributes listed inProjectionExpression. This return value is equivalent to specifyingProjectionExpressionwithout specifying any value forSelect.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.
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.
If neither
SelectnorProjectionExpressionare specified, DynamoDB defaults toALL_ATTRIBUTESwhen accessing a table, andALL_PROJECTED_ATTRIBUTESwhen accessing an index. You cannot use bothSelectandProjectionExpressiontogether in a single request, unless the value forSelectisSPECIFIC_ATTRIBUTES. (This usage is equivalent to specifyingProjectionExpressionwithout any value forSelect.)If you use the
ProjectionExpressionparameter, then the value forSelectcan only beSPECIFIC_ATTRIBUTES. Any other value forSelectwill return an error.-
attributes_to_get(impl Into<String>)/set_attributes_to_get(Option<Vec::<String>>):
required: falseThis is a legacy parameter. Use
ProjectionExpressioninstead. For more information, see AttributesToGet in the Amazon DynamoDB Developer Guide.limit(i32)/set_limit(Option<i32>):
required: falseThe 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
LastEvaluatedKeyto 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 inLastEvaluatedKeyto apply in a subsequent operation to continue the operation. For more information, see Query and Scan in the Amazon DynamoDB Developer Guide.consistent_read(bool)/set_consistent_read(Option<bool>):
required: falseDetermines the read consistency model: If set to
true, then the operation uses strongly consistent reads; otherwise, the operation uses eventually consistent reads.Strongly consistent reads are not supported on global secondary indexes. If you query a global secondary index with
ConsistentReadset totrue, you will receive aValidationException.key_conditions(impl Into<String>, Condition)/set_key_conditions(Option<HashMap::<String, Condition>>):
required: falseThis is a legacy parameter. Use
KeyConditionExpressioninstead. For more information, see KeyConditions in the Amazon DynamoDB Developer Guide.query_filter(impl Into<String>, Condition)/set_query_filter(Option<HashMap::<String, Condition>>):
required: falseThis is a legacy parameter. Use
FilterExpressioninstead. For more information, see QueryFilter in the Amazon DynamoDB Developer Guide.conditional_operator(ConditionalOperator)/set_conditional_operator(Option<ConditionalOperator>):
required: falseThis is a legacy parameter. Use
FilterExpressioninstead. For more information, see ConditionalOperator in the Amazon DynamoDB Developer Guide.scan_index_forward(bool)/set_scan_index_forward(Option<bool>):
required: falseSpecifies the order for index traversal: If
true(default), the traversal is performed in ascending order; iffalse, the traversal is performed in descending order.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.
If
ScanIndexForwardistrue, DynamoDB returns the results in the order in which they are stored (by sort key value). This is the default behavior. IfScanIndexForwardisfalse, DynamoDB reads the results in reverse order by sort key value, and then returns the results to the client.exclusive_start_key(impl Into<String>, AttributeValue)/set_exclusive_start_key(Option<HashMap::<String, AttributeValue>>):
required: falseThe primary key of the first item that this operation will evaluate. Use the value that was returned for
LastEvaluatedKeyin the previous operation.The data type for
ExclusiveStartKeymust be String, Number, or Binary. No set data types are allowed.return_consumed_capacity(ReturnConsumedCapacity)/set_return_consumed_capacity(Option<ReturnConsumedCapacity>):
required: falseDetermines the level of detail about either provisioned or on-demand throughput consumption that is returned in the response:
-
INDEXES- The response includes the aggregateConsumedCapacityfor the operation, together withConsumedCapacityfor each table and secondary index that was accessed.Note that some operations, such as
GetItemandBatchGetItem, do not access any indexes at all. In these cases, specifyingINDEXESwill only returnConsumedCapacityinformation for table(s). -
TOTAL- The response includes only the aggregateConsumedCapacityfor the operation. -
NONE- NoConsumedCapacitydetails are included in the response.
-
projection_expression(impl Into<String>)/set_projection_expression(Option<String>):
required: falseA 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.
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.
For more information, see Accessing Item Attributes in the Amazon DynamoDB Developer Guide.
filter_expression(impl Into<String>)/set_filter_expression(Option<String>):
required: falseA string that contains conditions that DynamoDB applies after the
Queryoperation, but before the data is returned to you. Items that do not satisfy theFilterExpressioncriteria are not returned.A
FilterExpressiondoes not allow key attributes. You cannot define a filter expression based on a partition key or a sort key.A
FilterExpressionis applied after the items have already been read; the process of filtering does not consume any additional read capacity units.For more information, see Filter Expressions in the Amazon DynamoDB Developer Guide.
key_condition_expression(impl Into<String>)/set_key_condition_expression(Option<String>):
required: falseThe condition that specifies the key values for items to be retrieved by the
Queryaction.The condition must perform an equality test on a single partition key value.
The condition can optionally perform one of several comparison tests on a single sort key value. This allows
Queryto 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.The partition key equality test is required, and must be specified in the following format:
partitionKeyName=:partitionkeyvalIf you also want to provide a condition for the sort key, it must be combined using
ANDwith the condition for the sort key. Following is an example, using the = comparison operator for the sort key:partitionKeyName=:partitionkeyvalANDsortKeyName=:sortkeyvalValid comparisons for the sort key condition are as follows:
-
sortKeyName=:sortkeyval- true if the sort key value is equal to:sortkeyval. -
sortKeyName<:sortkeyval- true if the sort key value is less than:sortkeyval. -
sortKeyName<=:sortkeyval- true if the sort key value is less than or equal to:sortkeyval. -
sortKeyName>:sortkeyval- true if the sort key value is greater than:sortkeyval. -
sortKeyName>=:sortkeyval- true if the sort key value is greater than or equal to:sortkeyval. -
sortKeyNameBETWEEN:sortkeyval1AND:sortkeyval2- true if the sort key value is greater than or equal to:sortkeyval1, and less than or equal to:sortkeyval2. -
begins_with (sortKeyName,:sortkeyval)- 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 namebegins_withis case-sensitive.
Use the
ExpressionAttributeValuesparameter to replace tokens such as:partitionvaland:sortvalwith actual values at runtime.You can optionally use the
ExpressionAttributeNamesparameter 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 followingKeyConditionExpressionparameter causes an error because Size is a reserved word:-
Size = :myval
To work around this, define a placeholder (such a
#S) to represent the attribute name Size.KeyConditionExpressionthen is as follows:-
#S = :myval
For a list of reserved words, see Reserved Words in the Amazon DynamoDB Developer Guide.
For more information on
ExpressionAttributeNamesandExpressionAttributeValues, see Using Placeholders for Attribute Names and Values in the Amazon DynamoDB Developer Guide.-
expression_attribute_names(impl Into<String>, impl Into<String>)/set_expression_attribute_names(Option<HashMap::<String, String>>):
required: falseOne or more substitution tokens for attribute names in an expression. The following are some use cases for using
ExpressionAttributeNames:-
To access an attribute whose name conflicts with a DynamoDB reserved word.
-
To create a placeholder for repeating occurrences of an attribute name in an expression.
-
To prevent special characters in an attribute name from being misinterpreted in an expression.
Use the # character in an expression to dereference an attribute name. For example, consider the following attribute name:
-
Percentile
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 Reserved Words in the Amazon DynamoDB Developer Guide). To work around this, you could specify the following for
ExpressionAttributeNames:-
{“#P”:“Percentile”}
You could then use this substitution in an expression, as in this example:
-
#P = :val
Tokens that begin with the : character are expression attribute values, which are placeholders for the actual value at runtime.
For more information on expression attribute names, see Specifying Item Attributes in the Amazon DynamoDB Developer Guide.
-
expression_attribute_values(impl Into<String>, AttributeValue)/set_expression_attribute_values(Option<HashMap::<String, AttributeValue>>):
required: falseOne or more values that can be substituted in an expression.
Use the : (colon) character in an expression to dereference an attribute value. For example, suppose that you wanted to check whether the value of the ProductStatus attribute was one of the following:
Available | Backordered | DiscontinuedYou would first need to specify
ExpressionAttributeValuesas follows:{ “:avail”:{“S”:“Available”}, “:back”:{“S”:“Backordered”}, “:disc”:{“S”:“Discontinued”} }You could then use these values in an expression, such as this:
ProductStatus IN (:avail, :back, :disc)For more information on expression attribute values, see Specifying Conditions in the Amazon DynamoDB Developer Guide.
- On success, responds with
QueryOutputwith field(s):items(Option<Vec::<HashMap::<String, AttributeValue>>>):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.
count(i32):The number of items in the response.
If you used a
QueryFilterin the request, thenCountis the number of items returned after the filter was applied, andScannedCountis the number of matching items before the filter was applied.If you did not use a filter in the request, then
CountandScannedCountare the same.scanned_count(i32):The number of items evaluated, before any
QueryFilteris applied. A highScannedCountvalue with few, or no,Countresults indicates an inefficientQueryoperation. For more information, see Count and ScannedCount in the Amazon DynamoDB Developer Guide.If you did not use a filter in the request, then
ScannedCountis the same asCount.last_evaluated_key(Option<HashMap::<String, AttributeValue>>):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.
If
LastEvaluatedKeyis empty, then the “last page” of results has been processed and there is no more data to be retrieved.If
LastEvaluatedKeyis 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 whenLastEvaluatedKeyis empty.consumed_capacity(Option<ConsumedCapacity>):The capacity units consumed by the
Queryoperation. The data returned includes the total provisioned throughput consumed, along with statistics for the table and any indexes involved in the operation.ConsumedCapacityis only returned if theReturnConsumedCapacityparameter was specified. For more information, see Capacity unit consumption for read operations in the Amazon DynamoDB Developer Guide.
- On failure, responds with
SdkError<QueryError>
source§impl Client
impl Client
sourcepub fn restore_table_from_backup(&self) -> RestoreTableFromBackupFluentBuilder
pub fn restore_table_from_backup(&self) -> RestoreTableFromBackupFluentBuilder
Constructs a fluent builder for the RestoreTableFromBackup operation.
- The fluent builder is configurable:
target_table_name(impl Into<String>)/set_target_table_name(Option<String>):
required: trueThe name of the new table to which the backup must be restored.
backup_arn(impl Into<String>)/set_backup_arn(Option<String>):
required: trueThe Amazon Resource Name (ARN) associated with the backup.
billing_mode_override(BillingMode)/set_billing_mode_override(Option<BillingMode>):
required: falseThe billing mode of the restored table.
global_secondary_index_override(GlobalSecondaryIndex)/set_global_secondary_index_override(Option<Vec::<GlobalSecondaryIndex>>):
required: falseList 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.
local_secondary_index_override(LocalSecondaryIndex)/set_local_secondary_index_override(Option<Vec::<LocalSecondaryIndex>>):
required: falseList 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.
provisioned_throughput_override(ProvisionedThroughput)/set_provisioned_throughput_override(Option<ProvisionedThroughput>):
required: falseProvisioned throughput settings for the restored table.
on_demand_throughput_override(OnDemandThroughput)/set_on_demand_throughput_override(Option<OnDemandThroughput>):
required: falseSets the maximum number of read and write units for the specified on-demand table. If you use this parameter, you must specify
MaxReadRequestUnits,MaxWriteRequestUnits, or both.sse_specification_override(SseSpecification)/set_sse_specification_override(Option<SseSpecification>):
required: falseThe new server-side encryption settings for the restored table.
- On success, responds with
RestoreTableFromBackupOutputwith field(s):table_description(Option<TableDescription>):The description of the table created from an existing backup.
- On failure, responds with
SdkError<RestoreTableFromBackupError>
source§impl Client
impl Client
sourcepub fn restore_table_to_point_in_time(
&self,
) -> RestoreTableToPointInTimeFluentBuilder
pub fn restore_table_to_point_in_time( &self, ) -> RestoreTableToPointInTimeFluentBuilder
Constructs a fluent builder for the RestoreTableToPointInTime operation.
- The fluent builder is configurable:
source_table_arn(impl Into<String>)/set_source_table_arn(Option<String>):
required: falseThe DynamoDB table that will be restored. This value is an Amazon Resource Name (ARN).
source_table_name(impl Into<String>)/set_source_table_name(Option<String>):
required: falseName of the source table that is being restored.
target_table_name(impl Into<String>)/set_target_table_name(Option<String>):
required: trueThe name of the new table to which it must be restored to.
use_latest_restorable_time(bool)/set_use_latest_restorable_time(Option<bool>):
required: falseRestore the table to the latest possible time.
LatestRestorableDateTimeis typically 5 minutes before the current time.restore_date_time(DateTime)/set_restore_date_time(Option<DateTime>):
required: falseTime in the past to restore the table to.
billing_mode_override(BillingMode)/set_billing_mode_override(Option<BillingMode>):
required: falseThe billing mode of the restored table.
global_secondary_index_override(GlobalSecondaryIndex)/set_global_secondary_index_override(Option<Vec::<GlobalSecondaryIndex>>):
required: falseList 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.
local_secondary_index_override(LocalSecondaryIndex)/set_local_secondary_index_override(Option<Vec::<LocalSecondaryIndex>>):
required: falseList 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.
provisioned_throughput_override(ProvisionedThroughput)/set_provisioned_throughput_override(Option<ProvisionedThroughput>):
required: falseProvisioned throughput settings for the restored table.
on_demand_throughput_override(OnDemandThroughput)/set_on_demand_throughput_override(Option<OnDemandThroughput>):
required: falseSets the maximum number of read and write units for the specified on-demand table. If you use this parameter, you must specify
MaxReadRequestUnits,MaxWriteRequestUnits, or both.sse_specification_override(SseSpecification)/set_sse_specification_override(Option<SseSpecification>):
required: falseThe new server-side encryption settings for the restored table.
- On success, responds with
RestoreTableToPointInTimeOutputwith field(s):table_description(Option<TableDescription>):Represents the properties of a table.
- On failure, responds with
SdkError<RestoreTableToPointInTimeError>
source§impl Client
impl Client
sourcepub fn scan(&self) -> ScanFluentBuilder
pub fn scan(&self) -> ScanFluentBuilder
Constructs a fluent builder for the Scan operation.
This operation supports pagination; See into_paginator().
- The fluent builder is configurable:
table_name(impl Into<String>)/set_table_name(Option<String>):
required: trueThe name of the table containing the requested items or if you provide
IndexName, the name of the table to which that index belongs.You can also provide the Amazon Resource Name (ARN) of the table in this parameter.
index_name(impl Into<String>)/set_index_name(Option<String>):
required: falseThe 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
IndexNameparameter, you must also provideTableName.attributes_to_get(impl Into<String>)/set_attributes_to_get(Option<Vec::<String>>):
required: falseThis is a legacy parameter. Use
ProjectionExpressioninstead. For more information, see AttributesToGet in the Amazon DynamoDB Developer Guide.limit(i32)/set_limit(Option<i32>):
required: falseThe 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
LastEvaluatedKeyto 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 inLastEvaluatedKeyto apply in a subsequent operation to continue the operation. For more information, see Working with Queries in the Amazon DynamoDB Developer Guide.select(Select)/set_select(Option<Select>):
required: falseThe 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.
-
ALL_ATTRIBUTES- 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. -
ALL_PROJECTED_ATTRIBUTES- 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 specifyingALL_ATTRIBUTES. -
COUNT- Returns the number of matching items, rather than the matching items themselves. Note that this uses the same quantity of read capacity units as getting the items, and is subject to the same item size calculations. -
SPECIFIC_ATTRIBUTES- Returns only the attributes listed inProjectionExpression. This return value is equivalent to specifyingProjectionExpressionwithout specifying any value forSelect.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.
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.
If neither
SelectnorProjectionExpressionare specified, DynamoDB defaults toALL_ATTRIBUTESwhen accessing a table, andALL_PROJECTED_ATTRIBUTESwhen accessing an index. You cannot use bothSelectandProjectionExpressiontogether in a single request, unless the value forSelectisSPECIFIC_ATTRIBUTES. (This usage is equivalent to specifyingProjectionExpressionwithout any value forSelect.)If you use the
ProjectionExpressionparameter, then the value forSelectcan only beSPECIFIC_ATTRIBUTES. Any other value forSelectwill return an error.-
scan_filter(impl Into<String>, Condition)/set_scan_filter(Option<HashMap::<String, Condition>>):
required: falseThis is a legacy parameter. Use
FilterExpressioninstead. For more information, see ScanFilter in the Amazon DynamoDB Developer Guide.conditional_operator(ConditionalOperator)/set_conditional_operator(Option<ConditionalOperator>):
required: falseThis is a legacy parameter. Use
FilterExpressioninstead. For more information, see ConditionalOperator in the Amazon DynamoDB Developer Guide.exclusive_start_key(impl Into<String>, AttributeValue)/set_exclusive_start_key(Option<HashMap::<String, AttributeValue>>):
required: falseThe primary key of the first item that this operation will evaluate. Use the value that was returned for
LastEvaluatedKeyin the previous operation.The data type for
ExclusiveStartKeymust be String, Number or Binary. No set data types are allowed.In a parallel scan, a
Scanrequest that includesExclusiveStartKeymust specify the same segment whose previousScanreturned the corresponding value ofLastEvaluatedKey.return_consumed_capacity(ReturnConsumedCapacity)/set_return_consumed_capacity(Option<ReturnConsumedCapacity>):
required: falseDetermines the level of detail about either provisioned or on-demand throughput consumption that is returned in the response:
-
INDEXES- The response includes the aggregateConsumedCapacityfor the operation, together withConsumedCapacityfor each table and secondary index that was accessed.Note that some operations, such as
GetItemandBatchGetItem, do not access any indexes at all. In these cases, specifyingINDEXESwill only returnConsumedCapacityinformation for table(s). -
TOTAL- The response includes only the aggregateConsumedCapacityfor the operation. -
NONE- NoConsumedCapacitydetails are included in the response.
-
total_segments(i32)/set_total_segments(Option<i32>):
required: falseFor a parallel
Scanrequest,TotalSegmentsrepresents the total number of segments into which theScanoperation will be divided. The value ofTotalSegmentscorresponds 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 aTotalSegmentsvalue of 4.The value for
TotalSegmentsmust be greater than or equal to 1, and less than or equal to 1000000. If you specify aTotalSegmentsvalue of 1, theScanoperation will be sequential rather than parallel.If you specify
TotalSegments, you must also specifySegment.segment(i32)/set_segment(Option<i32>):
required: falseFor a parallel
Scanrequest,Segmentidentifies an individual segment to be scanned by an application worker.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
Segmentvalue of 0, the second thread specifies 1, and so on.The value of
LastEvaluatedKeyreturned from a parallelScanrequest must be used asExclusiveStartKeywith the same segment ID in a subsequentScanoperation.The value for
Segmentmust be greater than or equal to 0, and less than the value provided forTotalSegments.If you provide
Segment, you must also provideTotalSegments.projection_expression(impl Into<String>)/set_projection_expression(Option<String>):
required: falseA 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.
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.
For more information, see Specifying Item Attributes in the Amazon DynamoDB Developer Guide.
filter_expression(impl Into<String>)/set_filter_expression(Option<String>):
required: falseA string that contains conditions that DynamoDB applies after the
Scanoperation, but before the data is returned to you. Items that do not satisfy theFilterExpressioncriteria are not returned.A
FilterExpressionis applied after the items have already been read; the process of filtering does not consume any additional read capacity units.For more information, see Filter Expressions in the Amazon DynamoDB Developer Guide.
expression_attribute_names(impl Into<String>, impl Into<String>)/set_expression_attribute_names(Option<HashMap::<String, String>>):
required: falseOne or more substitution tokens for attribute names in an expression. The following are some use cases for using
ExpressionAttributeNames:-
To access an attribute whose name conflicts with a DynamoDB reserved word.
-
To create a placeholder for repeating occurrences of an attribute name in an expression.
-
To prevent special characters in an attribute name from being misinterpreted in an expression.
Use the # character in an expression to dereference an attribute name. For example, consider the following attribute name:
-
Percentile
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 Reserved Words in the Amazon DynamoDB Developer Guide). To work around this, you could specify the following for
ExpressionAttributeNames:-
{“#P”:“Percentile”}
You could then use this substitution in an expression, as in this example:
-
#P = :val
Tokens that begin with the : character are expression attribute values, which are placeholders for the actual value at runtime.
For more information on expression attribute names, see Specifying Item Attributes in the Amazon DynamoDB Developer Guide.
-
expression_attribute_values(impl Into<String>, AttributeValue)/set_expression_attribute_values(Option<HashMap::<String, AttributeValue>>):
required: falseOne or more values that can be substituted in an expression.
Use the : (colon) character in an expression to dereference an attribute value. For example, suppose that you wanted to check whether the value of the
ProductStatusattribute was one of the following:Available | Backordered | DiscontinuedYou would first need to specify
ExpressionAttributeValuesas follows:{ “:avail”:{“S”:“Available”}, “:back”:{“S”:“Backordered”}, “:disc”:{“S”:“Discontinued”} }You could then use these values in an expression, such as this:
ProductStatus IN (:avail, :back, :disc)For more information on expression attribute values, see Condition Expressions in the Amazon DynamoDB Developer Guide.
consistent_read(bool)/set_consistent_read(Option<bool>):
required: falseA Boolean value that determines the read consistency model during the scan:
-
If
ConsistentReadisfalse, then the data returned fromScanmight not contain the results from other recently completed write operations (PutItem,UpdateItem, orDeleteItem). -
If
ConsistentReadistrue, then all of the write operations that completed before theScanbegan are guaranteed to be contained in theScanresponse.
The default setting for
ConsistentReadisfalse.The
ConsistentReadparameter is not supported on global secondary indexes. If you scan a global secondary index withConsistentReadset to true, you will receive aValidationException.-
- On success, responds with
ScanOutputwith field(s):items(Option<Vec::<HashMap::<String, AttributeValue>>>):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.
count(i32):The number of items in the response.
If you set
ScanFilterin the request, thenCountis the number of items returned after the filter was applied, andScannedCountis the number of matching items before the filter was applied.If you did not use a filter in the request, then
Countis the same asScannedCount.scanned_count(i32):The number of items evaluated, before any
ScanFilteris applied. A highScannedCountvalue with few, or no,Countresults indicates an inefficientScanoperation. For more information, see Count and ScannedCount in the Amazon DynamoDB Developer Guide.If you did not use a filter in the request, then
ScannedCountis the same asCount.last_evaluated_key(Option<HashMap::<String, AttributeValue>>):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.
If
LastEvaluatedKeyis empty, then the “last page” of results has been processed and there is no more data to be retrieved.If
LastEvaluatedKeyis 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 whenLastEvaluatedKeyis empty.consumed_capacity(Option<ConsumedCapacity>):The capacity units consumed by the
Scanoperation. The data returned includes the total provisioned throughput consumed, along with statistics for the table and any indexes involved in the operation.ConsumedCapacityis only returned if theReturnConsumedCapacityparameter was specified. For more information, see Capacity unit consumption for read operations in the Amazon DynamoDB Developer Guide.
- On failure, responds with
SdkError<ScanError>
source§impl Client
impl Client
sourcepub fn tag_resource(&self) -> TagResourceFluentBuilder
pub fn tag_resource(&self) -> TagResourceFluentBuilder
Constructs a fluent builder for the TagResource operation.
- The fluent builder is configurable:
resource_arn(impl Into<String>)/set_resource_arn(Option<String>):
required: trueIdentifies the Amazon DynamoDB resource to which tags should be added. This value is an Amazon Resource Name (ARN).
tags(Tag)/set_tags(Option<Vec::<Tag>>):
required: trueThe tags to be assigned to the Amazon DynamoDB resource.
- On success, responds with
TagResourceOutput - On failure, responds with
SdkError<TagResourceError>
source§impl Client
impl Client
sourcepub fn transact_get_items(&self) -> TransactGetItemsFluentBuilder
pub fn transact_get_items(&self) -> TransactGetItemsFluentBuilder
Constructs a fluent builder for the TransactGetItems operation.
- The fluent builder is configurable:
transact_items(TransactGetItem)/set_transact_items(Option<Vec::<TransactGetItem>>):
required: trueAn ordered array of up to 100
TransactGetItemobjects, each of which contains aGetstructure.return_consumed_capacity(ReturnConsumedCapacity)/set_return_consumed_capacity(Option<ReturnConsumedCapacity>):
required: falseA value of
TOTALcauses consumed capacity information to be returned, and a value ofNONEprevents that information from being returned. No other value is valid.
- On success, responds with
TransactGetItemsOutputwith field(s):consumed_capacity(Option<Vec::<ConsumedCapacity>>):If the ReturnConsumedCapacity value was
TOTAL, this is an array ofConsumedCapacityobjects, one for each table addressed byTransactGetItemobjects in the TransactItems parameter. TheseConsumedCapacityobjects report the read-capacity units consumed by theTransactGetItemscall in that table.responses(Option<Vec::<ItemResponse>>):An ordered array of up to 100
ItemResponseobjects, each of which corresponds to theTransactGetItemobject in the same position in the TransactItems array. EachItemResponseobject contains a Map of the name-value pairs that are the projected attributes of the requested item.If a requested item could not be retrieved, the corresponding
ItemResponseobject is Null, or if the requested item has no projected attributes, the correspondingItemResponseobject is an empty Map.
- On failure, responds with
SdkError<TransactGetItemsError>
source§impl Client
impl Client
sourcepub fn transact_write_items(&self) -> TransactWriteItemsFluentBuilder
pub fn transact_write_items(&self) -> TransactWriteItemsFluentBuilder
Constructs a fluent builder for the TransactWriteItems operation.
- The fluent builder is configurable:
transact_items(TransactWriteItem)/set_transact_items(Option<Vec::<TransactWriteItem>>):
required: trueAn ordered array of up to 100
TransactWriteItemobjects, each of which contains aConditionCheck,Put,Update, orDeleteobject. These can operate on items in different tables, but the tables must reside in the same Amazon Web Services account and Region, and no two of them can operate on the same item.return_consumed_capacity(ReturnConsumedCapacity)/set_return_consumed_capacity(Option<ReturnConsumedCapacity>):
required: falseDetermines the level of detail about either provisioned or on-demand throughput consumption that is returned in the response:
-
INDEXES- The response includes the aggregateConsumedCapacityfor the operation, together withConsumedCapacityfor each table and secondary index that was accessed.Note that some operations, such as
GetItemandBatchGetItem, do not access any indexes at all. In these cases, specifyingINDEXESwill only returnConsumedCapacityinformation for table(s). -
TOTAL- The response includes only the aggregateConsumedCapacityfor the operation. -
NONE- NoConsumedCapacitydetails are included in the response.
-
return_item_collection_metrics(ReturnItemCollectionMetrics)/set_return_item_collection_metrics(Option<ReturnItemCollectionMetrics>):
required: falseDetermines whether item collection metrics are returned. If set to
SIZE, the response includes statistics about item collections (if any), that were modified during the operation and are returned in the response. If set toNONE(the default), no statistics are returned.client_request_token(impl Into<String>)/set_client_request_token(Option<String>):
required: falseProviding a
ClientRequestTokenmakes the call toTransactWriteItemsidempotent, meaning that multiple identical calls have the same effect as one single call.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
ReturnConsumedCapacityparameter is set, then the initialTransactWriteItemscall returns the amount of write capacity units consumed in making the changes. SubsequentTransactWriteItemscalls with the same client token return the number of read capacity units consumed in reading the item.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.
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
IdempotentParameterMismatchexception.
- On success, responds with
TransactWriteItemsOutputwith field(s):consumed_capacity(Option<Vec::<ConsumedCapacity>>):The capacity units consumed by the entire
TransactWriteItemsoperation. The values of the list are ordered according to the ordering of theTransactItemsrequest parameter.item_collection_metrics(Option<HashMap::<String, Vec::<ItemCollectionMetrics>>>):A list of tables that were processed by
TransactWriteItemsand, for each table, information about any item collections that were affected by individualUpdateItem,PutItem, orDeleteItemoperations.
- On failure, responds with
SdkError<TransactWriteItemsError>
source§impl Client
impl Client
sourcepub fn untag_resource(&self) -> UntagResourceFluentBuilder
pub fn untag_resource(&self) -> UntagResourceFluentBuilder
Constructs a fluent builder for the UntagResource operation.
- The fluent builder is configurable:
resource_arn(impl Into<String>)/set_resource_arn(Option<String>):
required: trueThe DynamoDB resource that the tags will be removed from. This value is an Amazon Resource Name (ARN).
tag_keys(impl Into<String>)/set_tag_keys(Option<Vec::<String>>):
required: trueA list of tag keys. Existing tags of the resource whose keys are members of this list will be removed from the DynamoDB resource.
- On success, responds with
UntagResourceOutput - On failure, responds with
SdkError<UntagResourceError>
source§impl Client
impl Client
sourcepub fn update_continuous_backups(&self) -> UpdateContinuousBackupsFluentBuilder
pub fn update_continuous_backups(&self) -> UpdateContinuousBackupsFluentBuilder
Constructs a fluent builder for the UpdateContinuousBackups operation.
- The fluent builder is configurable:
table_name(impl Into<String>)/set_table_name(Option<String>):
required: trueThe name of the table. You can also provide the Amazon Resource Name (ARN) of the table in this parameter.
point_in_time_recovery_specification(PointInTimeRecoverySpecification)/set_point_in_time_recovery_specification(Option<PointInTimeRecoverySpecification>):
required: trueRepresents the settings used to enable point in time recovery.
- On success, responds with
UpdateContinuousBackupsOutputwith field(s):continuous_backups_description(Option<ContinuousBackupsDescription>):Represents the continuous backups and point in time recovery settings on the table.
- On failure, responds with
SdkError<UpdateContinuousBackupsError>
source§impl Client
impl Client
sourcepub fn update_contributor_insights(
&self,
) -> UpdateContributorInsightsFluentBuilder
pub fn update_contributor_insights( &self, ) -> UpdateContributorInsightsFluentBuilder
Constructs a fluent builder for the UpdateContributorInsights operation.
- The fluent builder is configurable:
table_name(impl Into<String>)/set_table_name(Option<String>):
required: trueThe name of the table. You can also provide the Amazon Resource Name (ARN) of the table in this parameter.
index_name(impl Into<String>)/set_index_name(Option<String>):
required: falseThe global secondary index name, if applicable.
contributor_insights_action(ContributorInsightsAction)/set_contributor_insights_action(Option<ContributorInsightsAction>):
required: trueRepresents the contributor insights action.
- On success, responds with
UpdateContributorInsightsOutputwith field(s):table_name(Option<String>):The name of the table.
index_name(Option<String>):The name of the global secondary index, if applicable.
contributor_insights_status(Option<ContributorInsightsStatus>):The status of contributor insights
- On failure, responds with
SdkError<UpdateContributorInsightsError>
source§impl Client
impl Client
sourcepub fn update_global_table(&self) -> UpdateGlobalTableFluentBuilder
pub fn update_global_table(&self) -> UpdateGlobalTableFluentBuilder
Constructs a fluent builder for the UpdateGlobalTable operation.
- The fluent builder is configurable:
global_table_name(impl Into<String>)/set_global_table_name(Option<String>):
required: trueThe global table name.
replica_updates(ReplicaUpdate)/set_replica_updates(Option<Vec::<ReplicaUpdate>>):
required: trueA list of Regions that should be added or removed from the global table.
- On success, responds with
UpdateGlobalTableOutputwith field(s):global_table_description(Option<GlobalTableDescription>):Contains the details of the global table.
- On failure, responds with
SdkError<UpdateGlobalTableError>
source§impl Client
impl Client
sourcepub fn update_global_table_settings(
&self,
) -> UpdateGlobalTableSettingsFluentBuilder
pub fn update_global_table_settings( &self, ) -> UpdateGlobalTableSettingsFluentBuilder
Constructs a fluent builder for the UpdateGlobalTableSettings operation.
- The fluent builder is configurable:
global_table_name(impl Into<String>)/set_global_table_name(Option<String>):
required: trueThe name of the global table
global_table_billing_mode(BillingMode)/set_global_table_billing_mode(Option<BillingMode>):
required: falseThe billing mode of the global table. If
GlobalTableBillingModeis not specified, the global table defaults toPROVISIONEDcapacity billing mode.-
PROVISIONED- We recommend usingPROVISIONEDfor predictable workloads.PROVISIONEDsets the billing mode to Provisioned capacity mode. -
PAY_PER_REQUEST- We recommend usingPAY_PER_REQUESTfor unpredictable workloads.PAY_PER_REQUESTsets the billing mode to On-demand capacity mode.
-
global_table_provisioned_write_capacity_units(i64)/set_global_table_provisioned_write_capacity_units(Option<i64>):
required: falseThe maximum number of writes consumed per second before DynamoDB returns a
ThrottlingException.global_table_provisioned_write_capacity_auto_scaling_settings_update(AutoScalingSettingsUpdate)/set_global_table_provisioned_write_capacity_auto_scaling_settings_update(Option<AutoScalingSettingsUpdate>):
required: falseAuto scaling settings for managing provisioned write capacity for the global table.
global_table_global_secondary_index_settings_update(GlobalTableGlobalSecondaryIndexSettingsUpdate)/set_global_table_global_secondary_index_settings_update(Option<Vec::<GlobalTableGlobalSecondaryIndexSettingsUpdate>>):
required: falseRepresents the settings of a global secondary index for a global table that will be modified.
replica_settings_update(ReplicaSettingsUpdate)/set_replica_settings_update(Option<Vec::<ReplicaSettingsUpdate>>):
required: falseRepresents the settings for a global table in a Region that will be modified.
- On success, responds with
UpdateGlobalTableSettingsOutputwith field(s):global_table_name(Option<String>):The name of the global table.
replica_settings(Option<Vec::<ReplicaSettingsDescription>>):The Region-specific settings for the global table.
- On failure, responds with
SdkError<UpdateGlobalTableSettingsError>
source§impl Client
impl Client
sourcepub fn update_item(&self) -> UpdateItemFluentBuilder
pub fn update_item(&self) -> UpdateItemFluentBuilder
Constructs a fluent builder for the UpdateItem operation.
- The fluent builder is configurable:
table_name(impl Into<String>)/set_table_name(Option<String>):
required: trueThe name of the table containing the item to update. You can also provide the Amazon Resource Name (ARN) of the table in this parameter.
key(impl Into<String>, AttributeValue)/set_key(Option<HashMap::<String, AttributeValue>>):
required: trueThe primary key of the item to be updated. Each element consists of an attribute name and a value for that attribute.
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.
attribute_updates(impl Into<String>, AttributeValueUpdate)/set_attribute_updates(Option<HashMap::<String, AttributeValueUpdate>>):
required: falseThis is a legacy parameter. Use
UpdateExpressioninstead. For more information, see AttributeUpdates in the Amazon DynamoDB Developer Guide.expected(impl Into<String>, ExpectedAttributeValue)/set_expected(Option<HashMap::<String, ExpectedAttributeValue>>):
required: falseThis is a legacy parameter. Use
ConditionExpressioninstead. For more information, see Expected in the Amazon DynamoDB Developer Guide.conditional_operator(ConditionalOperator)/set_conditional_operator(Option<ConditionalOperator>):
required: falseThis is a legacy parameter. Use
ConditionExpressioninstead. For more information, see ConditionalOperator in the Amazon DynamoDB Developer Guide.return_values(ReturnValue)/set_return_values(Option<ReturnValue>):
required: falseUse
ReturnValuesif you want to get the item attributes as they appear before or after they are successfully updated. ForUpdateItem, the valid values are:-
NONE- IfReturnValuesis not specified, or if its value isNONE, then nothing is returned. (This setting is the default forReturnValues.) -
ALL_OLD- Returns all of the attributes of the item, as they appeared before the UpdateItem operation. -
UPDATED_OLD- Returns only the updated attributes, as they appeared before the UpdateItem operation. -
ALL_NEW- Returns all of the attributes of the item, as they appear after the UpdateItem operation. -
UPDATED_NEW- Returns only the updated attributes, as they appear after the UpdateItem operation.
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.
The values returned are strongly consistent.
-
return_consumed_capacity(ReturnConsumedCapacity)/set_return_consumed_capacity(Option<ReturnConsumedCapacity>):
required: falseDetermines the level of detail about either provisioned or on-demand throughput consumption that is returned in the response:
-
INDEXES- The response includes the aggregateConsumedCapacityfor the operation, together withConsumedCapacityfor each table and secondary index that was accessed.Note that some operations, such as
GetItemandBatchGetItem, do not access any indexes at all. In these cases, specifyingINDEXESwill only returnConsumedCapacityinformation for table(s). -
TOTAL- The response includes only the aggregateConsumedCapacityfor the operation. -
NONE- NoConsumedCapacitydetails are included in the response.
-
return_item_collection_metrics(ReturnItemCollectionMetrics)/set_return_item_collection_metrics(Option<ReturnItemCollectionMetrics>):
required: falseDetermines whether item collection metrics are returned. If set to
SIZE, the response includes statistics about item collections, if any, that were modified during the operation are returned in the response. If set toNONE(the default), no statistics are returned.update_expression(impl Into<String>)/set_update_expression(Option<String>):
required: falseAn expression that defines one or more attributes to be updated, the action to be performed on them, and new values for them.
The following action values are available for
UpdateExpression.-
SET- 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 useSETto add or subtract from an attribute that is of type Number. For example:SET myNum = myNum + :valSETsupports the following functions:-
if_not_exists (path, operand)- if the item does not contain an attribute at the specified path, thenif_not_existsevaluates 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. -
list_append (operand, operand)- 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.
These function names are case-sensitive.
-
-
REMOVE- Removes one or more attributes from an item. -
ADD- Adds the specified value to the item, if the attribute does not already exist. If the attribute does exist, then the behavior ofADDdepends on the data type of the attribute:-
If the existing attribute is a number, and if
Valueis also a number, thenValueis mathematically added to the existing attribute. IfValueis a negative number, then it is subtracted from the existing attribute.If you use
ADDto increment or decrement a number value for an item that doesn’t exist before the update, DynamoDB uses0as the initial value.Similarly, if you use
ADDfor an existing item to increment or decrement an attribute value that doesn’t exist before the update, DynamoDB uses0as the initial value. For example, suppose that the item you want to update doesn’t have an attribute nameditemcount, but you decide toADDthe number3to this attribute anyway. DynamoDB will create theitemcountattribute, set its initial value to0, and finally add3to it. The result will be a newitemcountattribute in the item, with a value of3. -
If the existing data type is a set and if
Valueis also a set, thenValueis added to the existing set. For example, if the attribute value is the set[1,2], and theADDaction specified[3], then the final attribute value is[1,2,3]. An error occurs if anADDaction is specified for a set attribute and the attribute type specified does not match the existing set type.Both sets must have the same primitive data type. For example, if the existing data type is a set of strings, the
Valuemust also be a set of strings.
The
ADDaction only supports Number and set data types. In addition,ADDcan only be used on top-level attributes, not nested attributes. -
-
DELETE- Deletes an element from a set.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
[a,b,c]and theDELETEaction specifies[a,c], then the final attribute value is[b]. Specifying an empty set is an error.The
DELETEaction only supports set data types. In addition,DELETEcan only be used on top-level attributes, not nested attributes.
You can have many actions in a single expression, such as the following:
SET a=:value1, b=:value2 DELETE :value3, :value4, :value5For more information on update expressions, see Modifying Items and Attributes in the Amazon DynamoDB Developer Guide.
-
condition_expression(impl Into<String>)/set_condition_expression(Option<String>):
required: falseA condition that must be satisfied in order for a conditional update to succeed.
An expression can contain any of the following:
-
Functions:
attribute_exists | attribute_not_exists | attribute_type | contains | begins_with | sizeThese function names are case-sensitive.
-
Comparison operators:
= | <> | < | > | <= | >= | BETWEEN | IN -
Logical operators:
AND | OR | NOT
For more information about condition expressions, see Specifying Conditions in the Amazon DynamoDB Developer Guide.
-
expression_attribute_names(impl Into<String>, impl Into<String>)/set_expression_attribute_names(Option<HashMap::<String, String>>):
required: falseOne or more substitution tokens for attribute names in an expression. The following are some use cases for using
ExpressionAttributeNames:-
To access an attribute whose name conflicts with a DynamoDB reserved word.
-
To create a placeholder for repeating occurrences of an attribute name in an expression.
-
To prevent special characters in an attribute name from being misinterpreted in an expression.
Use the # character in an expression to dereference an attribute name. For example, consider the following attribute name:
-
Percentile
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 Reserved Words in the Amazon DynamoDB Developer Guide.) To work around this, you could specify the following for
ExpressionAttributeNames:-
{“#P”:“Percentile”}
You could then use this substitution in an expression, as in this example:
-
#P = :val
Tokens that begin with the : character are expression attribute values, which are placeholders for the actual value at runtime.
For more information about expression attribute names, see Specifying Item Attributes in the Amazon DynamoDB Developer Guide.
-
expression_attribute_values(impl Into<String>, AttributeValue)/set_expression_attribute_values(Option<HashMap::<String, AttributeValue>>):
required: falseOne or more values that can be substituted in an expression.
Use the : (colon) character in an expression to dereference an attribute value. For example, suppose that you wanted to check whether the value of the
ProductStatusattribute was one of the following:Available | Backordered | DiscontinuedYou would first need to specify
ExpressionAttributeValuesas follows:{ “:avail”:{“S”:“Available”}, “:back”:{“S”:“Backordered”}, “:disc”:{“S”:“Discontinued”} }You could then use these values in an expression, such as this:
ProductStatus IN (:avail, :back, :disc)For more information on expression attribute values, see Condition Expressions in the Amazon DynamoDB Developer Guide.
return_values_on_condition_check_failure(ReturnValuesOnConditionCheckFailure)/set_return_values_on_condition_check_failure(Option<ReturnValuesOnConditionCheckFailure>):
required: falseAn optional parameter that returns the item attributes for an
UpdateItemoperation that failed a condition check.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.
- On success, responds with
UpdateItemOutputwith field(s):attributes(Option<HashMap::<String, AttributeValue>>):A map of attribute values as they appear before or after the
UpdateItemoperation, as determined by theReturnValuesparameter.The
Attributesmap is only present if the update was successful andReturnValueswas specified as something other thanNONEin the request. Each element represents one attribute.consumed_capacity(Option<ConsumedCapacity>):The capacity units consumed by the
UpdateItemoperation. The data returned includes the total provisioned throughput consumed, along with statistics for the table and any indexes involved in the operation.ConsumedCapacityis only returned if theReturnConsumedCapacityparameter was specified. For more information, see Capacity unity consumption for write operations in the Amazon DynamoDB Developer Guide.item_collection_metrics(Option<ItemCollectionMetrics>):Information about item collections, if any, that were affected by the
UpdateItemoperation.ItemCollectionMetricsis only returned if theReturnItemCollectionMetricsparameter was specified. If the table does not have any local secondary indexes, this information is not returned in the response.Each
ItemCollectionMetricselement consists of:-
ItemCollectionKey- The partition key value of the item collection. This is the same as the partition key value of the item itself. -
SizeEstimateRangeGB- 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.The estimate is subject to change over time; therefore, do not rely on the precision or accuracy of the estimate.
-
- On failure, responds with
SdkError<UpdateItemError>
source§impl Client
impl Client
sourcepub fn update_kinesis_streaming_destination(
&self,
) -> UpdateKinesisStreamingDestinationFluentBuilder
pub fn update_kinesis_streaming_destination( &self, ) -> UpdateKinesisStreamingDestinationFluentBuilder
Constructs a fluent builder for the UpdateKinesisStreamingDestination operation.
- The fluent builder is configurable:
table_name(impl Into<String>)/set_table_name(Option<String>):
required: trueThe table name for the Kinesis streaming destination input. You can also provide the ARN of the table in this parameter.
stream_arn(impl Into<String>)/set_stream_arn(Option<String>):
required: trueThe Amazon Resource Name (ARN) for the Kinesis stream input.
update_kinesis_streaming_configuration(UpdateKinesisStreamingConfiguration)/set_update_kinesis_streaming_configuration(Option<UpdateKinesisStreamingConfiguration>):
required: falseThe command to update the Kinesis stream configuration.
- On success, responds with
UpdateKinesisStreamingDestinationOutputwith field(s):table_name(Option<String>):The table name for the Kinesis streaming destination output.
stream_arn(Option<String>):The ARN for the Kinesis stream input.
destination_status(Option<DestinationStatus>):The status of the attempt to update the Kinesis streaming destination output.
update_kinesis_streaming_configuration(Option<UpdateKinesisStreamingConfiguration>):The command to update the Kinesis streaming destination configuration.
- On failure, responds with
SdkError<UpdateKinesisStreamingDestinationError>
source§impl Client
impl Client
sourcepub fn update_table(&self) -> UpdateTableFluentBuilder
pub fn update_table(&self) -> UpdateTableFluentBuilder
Constructs a fluent builder for the UpdateTable operation.
- The fluent builder is configurable:
attribute_definitions(AttributeDefinition)/set_attribute_definitions(Option<Vec::<AttributeDefinition>>):
required: falseAn 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,
AttributeDefinitionsmust include the key element(s) of the new index.table_name(impl Into<String>)/set_table_name(Option<String>):
required: trueThe name of the table to be updated. You can also provide the Amazon Resource Name (ARN) of the table in this parameter.
billing_mode(BillingMode)/set_billing_mode(Option<BillingMode>):
required: falseControls 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.
-
PROVISIONED- We recommend usingPROVISIONEDfor predictable workloads.PROVISIONEDsets the billing mode to Provisioned capacity mode. -
PAY_PER_REQUEST- We recommend usingPAY_PER_REQUESTfor unpredictable workloads.PAY_PER_REQUESTsets the billing mode to On-demand capacity mode.
-
provisioned_throughput(ProvisionedThroughput)/set_provisioned_throughput(Option<ProvisionedThroughput>):
required: falseThe new provisioned throughput settings for the specified table or index.
global_secondary_index_updates(GlobalSecondaryIndexUpdate)/set_global_secondary_index_updates(Option<Vec::<GlobalSecondaryIndexUpdate>>):
required: falseAn array of one or more global secondary indexes for the table. For each index in the array, you can request one action:
-
Create- add a new global secondary index to the table. -
Update- modify the provisioned throughput settings of an existing global secondary index. -
Delete- remove a global secondary index from the table.
You can create or delete only one global secondary index per
UpdateTableoperation.For more information, see Managing Global Secondary Indexes in the Amazon DynamoDB Developer Guide.
-
stream_specification(StreamSpecification)/set_stream_specification(Option<StreamSpecification>):
required: falseRepresents the DynamoDB Streams configuration for the table.
You receive a
ValidationExceptionif 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.sse_specification(SseSpecification)/set_sse_specification(Option<SseSpecification>):
required: falseThe new server-side encryption settings for the specified table.
replica_updates(ReplicationGroupUpdate)/set_replica_updates(Option<Vec::<ReplicationGroupUpdate>>):
required: falseA list of replica update actions (create, delete, or update) for the table.
For global tables, this property only applies to global tables using Version 2019.11.21 (Current version).
table_class(TableClass)/set_table_class(Option<TableClass>):
required: falseThe table class of the table to be updated. Valid values are
STANDARDandSTANDARD_INFREQUENT_ACCESS.deletion_protection_enabled(bool)/set_deletion_protection_enabled(Option<bool>):
required: falseIndicates whether deletion protection is to be enabled (true) or disabled (false) on the table.
on_demand_throughput(OnDemandThroughput)/set_on_demand_throughput(Option<OnDemandThroughput>):
required: falseUpdates the maximum number of read and write units for the specified table in on-demand capacity mode. If you use this parameter, you must specify
MaxReadRequestUnits,MaxWriteRequestUnits, or both.
- On success, responds with
UpdateTableOutputwith field(s):table_description(Option<TableDescription>):Represents the properties of the table.
- On failure, responds with
SdkError<UpdateTableError>
source§impl Client
impl Client
sourcepub fn update_table_replica_auto_scaling(
&self,
) -> UpdateTableReplicaAutoScalingFluentBuilder
pub fn update_table_replica_auto_scaling( &self, ) -> UpdateTableReplicaAutoScalingFluentBuilder
Constructs a fluent builder for the UpdateTableReplicaAutoScaling operation.
- The fluent builder is configurable:
global_secondary_index_updates(GlobalSecondaryIndexAutoScalingUpdate)/set_global_secondary_index_updates(Option<Vec::<GlobalSecondaryIndexAutoScalingUpdate>>):
required: falseRepresents the auto scaling settings of the global secondary indexes of the replica to be updated.
table_name(impl Into<String>)/set_table_name(Option<String>):
required: trueThe name of the global table to be updated. You can also provide the Amazon Resource Name (ARN) of the table in this parameter.
provisioned_write_capacity_auto_scaling_update(AutoScalingSettingsUpdate)/set_provisioned_write_capacity_auto_scaling_update(Option<AutoScalingSettingsUpdate>):
required: falseRepresents the auto scaling settings to be modified for a global table or global secondary index.
replica_updates(ReplicaAutoScalingUpdate)/set_replica_updates(Option<Vec::<ReplicaAutoScalingUpdate>>):
required: falseRepresents the auto scaling settings of replicas of the table that will be modified.
- On success, responds with
UpdateTableReplicaAutoScalingOutputwith field(s):table_auto_scaling_description(Option<TableAutoScalingDescription>):Returns information about the auto scaling settings of a table with replicas.
- On failure, responds with
SdkError<UpdateTableReplicaAutoScalingError>
source§impl Client
impl Client
sourcepub fn update_time_to_live(&self) -> UpdateTimeToLiveFluentBuilder
pub fn update_time_to_live(&self) -> UpdateTimeToLiveFluentBuilder
Constructs a fluent builder for the UpdateTimeToLive operation.
- The fluent builder is configurable:
table_name(impl Into<String>)/set_table_name(Option<String>):
required: trueThe name of the table to be configured. You can also provide the Amazon Resource Name (ARN) of the table in this parameter.
time_to_live_specification(TimeToLiveSpecification)/set_time_to_live_specification(Option<TimeToLiveSpecification>):
required: trueRepresents the settings used to enable or disable Time to Live for the specified table.
- On success, responds with
UpdateTimeToLiveOutputwith field(s):time_to_live_specification(Option<TimeToLiveSpecification>):Represents the output of an
UpdateTimeToLiveoperation.
- On failure, responds with
SdkError<UpdateTimeToLiveError>
source§impl Client
impl Client
sourcepub fn from_conf(conf: Config) -> Self
pub fn from_conf(conf: Config) -> Self
Creates a new client from the service Config.
§Panics
This method will panic in the following cases:
- Retries or timeouts are enabled without a
sleep_implconfigured. - Identity caching is enabled without a
sleep_implandtime_sourceconfigured. - No
behavior_versionis provided.
The panic message for each of these will have instructions on how to resolve them.
source§impl Client
impl Client
sourcepub fn new(sdk_config: &SdkConfig) -> Self
pub fn new(sdk_config: &SdkConfig) -> Self
Creates a new client from an SDK Config.
§Panics
- This method will panic if the
sdk_configis missing an async sleep implementation. If you experience this panic, set thesleep_implon the Config passed into this function to fix it. - This method will panic if the
sdk_configis missing an HTTP connector. If you experience this panic, set thehttp_connectoron the Config passed into this function to fix it. - This method will panic if no
BehaviorVersionis provided. If you experience this panic, setbehavior_versionon the Config or enable thebehavior-version-latestCargo feature.
Trait Implementations§
source§impl Waiters for Client
impl Waiters for Client
source§fn wait_until_table_exists(&self) -> TableExistsFluentBuilder
fn wait_until_table_exists(&self) -> TableExistsFluentBuilder
table_existssource§fn wait_until_table_not_exists(&self) -> TableNotExistsFluentBuilder
fn wait_until_table_not_exists(&self) -> TableNotExistsFluentBuilder
table_not_existsAuto Trait Implementations§
impl Freeze for Client
impl !RefUnwindSafe for Client
impl Send for Client
impl Sync for Client
impl Unpin for Client
impl !UnwindSafe for Client
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit)source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more