AWS services or capabilities described in AWS Documentation may vary by region/location. Click Getting Started with Amazon AWS to see specific differences applicable to the China (Beijing) Region.
Set-DDBItem-Item <Hashtable>-ConditionalOperator <ConditionalOperator>-ConditionExpression <String>-Expected <Hashtable>-ExpressionAttributeName <Hashtable>-ExpressionAttributeValue <Hashtable>-ReturnConsumedCapacity <ReturnConsumedCapacity>-ReturnItemCollectionMetric <ReturnItemCollectionMetrics>-ReturnValue <ReturnValue>-ReturnValuesOnConditionCheckFailure <ReturnValuesOnConditionCheckFailure>-TableName <String>-Select <String>-PassThru <SwitchParameter>-Force <SwitchParameter>-ClientConfig <AmazonDynamoDBConfig>
ReturnValues
parameter.
When you add an item, the primary key attributes are the only required attributes.
Empty String and Binary attribute values are allowed. Attribute values of type String and Binary must have a length greater than zero if the attribute is used as a key attribute for a table or index. Set type attributes cannot be empty.
Invalid Requests with empty values will be rejected with a ValidationException
exception.
To prevent a new item from replacing an existing item, use a conditional expression that contains the attribute_not_exists
function with the name of the attribute being used as the partition key for the table. Since every record must contain that attribute, the attribute_not_exists
function will only succeed if no matching item exists.
For more information about PutItem
, see Working with Items in the Amazon DynamoDB Developer Guide. Required? | False |
Position? | Named |
Accept pipeline input? | True (ByPropertyName) |
ConditionExpression
instead. For more information, see ConditionalOperator in the Amazon DynamoDB Developer Guide. Required? | False |
Position? | Named |
Accept pipeline input? | True (ByPropertyName) |
PutItem
operation to succeed.An expression can contain any of the following:attribute_exists | attribute_not_exists | attribute_type | contains | begins_with | size
These function names are case-sensitive.= | <> | < | > | <= | >= | BETWEEN | IN
AND | OR | NOT
Required? | False |
Position? | Named |
Accept pipeline input? | True (ByPropertyName) |
ConditionExpression
instead. For more information, see Expected in the Amazon DynamoDB Developer Guide. Required? | False |
Position? | Named |
Accept pipeline input? | True (ByPropertyName) |
ExpressionAttributeNames
:Percentile
ExpressionAttributeNames
:{"#P":"Percentile"}
#P = :val
Required? | False |
Position? | Named |
Accept pipeline input? | True (ByPropertyName) |
Aliases | ExpressionAttributeNames |
Available | Backordered | Discontinued
You would first need to specify ExpressionAttributeValues
as 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. Required? | False |
Position? | Named |
Accept pipeline input? | True (ByPropertyName) |
Aliases | ExpressionAttributeValues |
Required? | False |
Position? | Named |
Accept pipeline input? | True (ByPropertyName) |
Item
map is an AttributeValue
object. Required? | True |
Position? | 1 |
Accept pipeline input? | True (ByValue, ByPropertyName) |
Required? | False |
Position? | Named |
Accept pipeline input? | True (ByPropertyName) |
Required? | False |
Position? | Named |
Accept pipeline input? | True (ByPropertyName) |
SIZE
, the response includes statistics about item collections, if any, that were modified during the operation are returned in the response. If set to NONE
(the default), no statistics are returned. Required? | False |
Position? | Named |
Accept pipeline input? | True (ByPropertyName) |
Aliases | ReturnItemCollectionMetrics |
ReturnValues
if you want to get the item attributes as they appeared before they were updated with the PutItem
request. For PutItem
, the valid values are:NONE
- If ReturnValues
is not specified, or if its value is NONE
, then nothing is returned. (This setting is the default for ReturnValues
.)ALL_OLD
- If PutItem
overwrote an attribute name-value pair, then the content of the old item is returned.ReturnValues
parameter is used by several DynamoDB operations; however, PutItem
does not recognize any values other than NONE
or ALL_OLD
. Required? | False |
Position? | Named |
Accept pipeline input? | True (ByPropertyName) |
Aliases | ReturnValues |
PutItem
operation 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. Required? | False |
Position? | Named |
Accept pipeline input? | True (ByPropertyName) |
Required? | False |
Position? | Named |
Accept pipeline input? | True (ByPropertyName) |
Required? | True |
Position? | Named |
Accept pipeline input? | True (ByPropertyName) |
Required? | False |
Position? | Named |
Accept pipeline input? | True (ByPropertyName) |
Aliases | AK |
Required? | False |
Position? | Named |
Accept pipeline input? | True (ByValue, ByPropertyName) |
Required? | False |
Position? | Named |
Accept pipeline input? | True (ByPropertyName) |
Required? | False |
Position? | Named |
Accept pipeline input? | True (ByValue, ByPropertyName) |
Required? | False |
Position? | Named |
Accept pipeline input? | True (ByPropertyName) |
Aliases | AWSProfilesLocation, ProfilesLocation |
Required? | False |
Position? | Named |
Accept pipeline input? | True (ByPropertyName) |
Aliases | StoredCredentials, AWSProfileName |
Required? | False |
Position? | Named |
Accept pipeline input? | True (ByPropertyName) |
Aliases | RegionToCall |
Required? | False |
Position? | Named |
Accept pipeline input? | True (ByPropertyName) |
Aliases | SK, SecretAccessKey |
Required? | False |
Position? | Named |
Accept pipeline input? | True (ByPropertyName) |
Aliases | ST |
$item = @{
SongTitle = 'Somewhere Down The Road'
Artist = 'No One You Know'
AlbumTitle = 'Somewhat Famous'
Price = 1.94
Genre = 'Country'
CriticRating = 9.0
} | ConvertTo-DDBItem
Set-DDBItem -TableName 'Music' -Item $item
Creates a new item, or replaces an existing item with a new item.
AWS Tools for PowerShell: 2.x.y.z