C# Class Amazon.DynamoDBv2.Model.DeleteItemRequest

Container for the parameters to the DeleteItem operation.

Deletes a single item in a table by primary key. You can perform a conditional delete operation that deletes the item if it exists, or if it has an expected attribute value.

In addition to deleting an item, you can also return the item's attribute values in the same operation, using the 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 only deleting items if specific conditions are met. If those conditions are met, Amazon DynamoDB performs the delete. Otherwise, the item is not deleted.

Inheritance: Amazon.Runtime.AmazonWebServiceRequest
ファイルを表示 Open project: aws/aws-sdk-net Class Usage Examples

Public Methods

Method Description
DeleteItemRequest ( ) : System

Empty constructor used to set properties independently even when a simple constructor is available

DeleteItemRequest ( string tableName, AttributeValue>.Dictionary key ) : System

Instantiates DeleteItemRequest with the parameterized properties

DeleteItemRequest ( string tableName, AttributeValue>.Dictionary key, ReturnValue returnValues ) : System

Instantiates DeleteItemRequest with the parameterized properties

Private Methods

Method Description
IsSetConditionExpression ( ) : bool
IsSetConditionalOperator ( ) : bool
IsSetExpected ( ) : bool
IsSetExpressionAttributeNames ( ) : bool
IsSetExpressionAttributeValues ( ) : bool
IsSetKey ( ) : bool
IsSetReturnConsumedCapacity ( ) : bool
IsSetReturnItemCollectionMetrics ( ) : bool
IsSetReturnValues ( ) : bool
IsSetTableName ( ) : bool

Method Details

DeleteItemRequest() public method

Empty constructor used to set properties independently even when a simple constructor is available
public DeleteItemRequest ( ) : System
return System

DeleteItemRequest() public method

Instantiates DeleteItemRequest with the parameterized properties
public DeleteItemRequest ( string tableName, AttributeValue>.Dictionary key ) : System
tableName string The name of the table from which to delete the item.
key AttributeValue>.Dictionary A map of attribute names to AttributeValue objects, representing the primary key of the item to delete. 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.
return System

DeleteItemRequest() public method

Instantiates DeleteItemRequest with the parameterized properties
public DeleteItemRequest ( string tableName, AttributeValue>.Dictionary key, ReturnValue returnValues ) : System
tableName string The name of the table from which to delete the item.
key AttributeValue>.Dictionary A map of attribute names to AttributeValue objects, representing the primary key of the item to delete. 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.
returnValues ReturnValue Use 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.
The ReturnValues parameter is used by several DynamoDB operations; however, DeleteItem does not recognize any values other than NONE or ALL_OLD.
return System