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.
Remove-DDBItem-Key <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.
Unless you specify conditions, the DeleteItem
is an idempotent operation; running it multiple times on the same item or attribute does not result in an error response.
Conditional deletes are useful for deleting items only if specific conditions are met. If those conditions are met, DynamoDB performs the delete. Otherwise, the item is not deleted. 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) |
DeleteItem
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) |
AttributeValue
objects, 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. 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 deleted. For DeleteItem
, 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
- The content of the old item is returned.ReturnValues
parameter is used by several DynamoDB operations; however, DeleteItem
does not recognize any values other than NONE
or ALL_OLD
. Required? | False |
Position? | Named |
Accept pipeline input? | True (ByPropertyName) |
Aliases | ReturnValues |
DeleteItem
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 |
$key = @{
SongTitle = 'Somewhere Down The Road'
Artist = 'No One You Know'
} | ConvertTo-DDBItem
Remove-DDBItem -TableName 'Music' -Key $key -Confirm:$false
Removes the DynamoDB item that matches the provided key.
AWS Tools for PowerShell: 2.x.y.z