Interface IDynamoUpdateItemProps
Properties for DynamoUpdateItem Task.
Inherited Members
Namespace: Amazon.CDK.AWS.StepFunctions.Tasks
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public interface IDynamoUpdateItemProps : ITaskStateBaseProps
Syntax (vb)
Public Interface IDynamoUpdateItemProps
Inherits ITaskStateBaseProps
Remarks
ExampleMetadata: infused
Examples
Table myTable;
new DynamoUpdateItem(this, "UpdateItem", new DynamoUpdateItemProps {
Key = new Dictionary<string, DynamoAttributeValue> {
{ "MessageId", DynamoAttributeValue.FromString("message-007") }
},
Table = myTable,
ExpressionAttributeValues = new Dictionary<string, DynamoAttributeValue> {
{ ":val", DynamoAttributeValue.NumberFromString(JsonPath.StringAt("$.Item.TotalCount.N")) },
{ ":rand", DynamoAttributeValue.FromNumber(20) }
},
UpdateExpression = "SET TotalCount = :val + :rand"
});
Synopsis
Properties
ConditionExpression | A condition that must be satisfied in order for a conditional DeleteItem to succeed. |
ExpressionAttributeNames | One or more substitution tokens for attribute names in an expression. |
ExpressionAttributeValues | One or more values that can be substituted in an expression. |
Key | Primary key of the item to retrieve. |
ReturnConsumedCapacity | Determines the level of detail about provisioned throughput consumption that is returned in the response. |
ReturnItemCollectionMetrics | Determines whether item collection metrics are returned. |
ReturnValues | Use ReturnValues if you want to get the item attributes as they appeared before they were deleted. |
Table | The name of the table containing the requested item. |
UpdateExpression | An expression that defines one or more attributes to be updated, the action to be performed on them, and new values for them. |
Properties
ConditionExpression
A condition that must be satisfied in order for a conditional DeleteItem to succeed.
virtual string ConditionExpression { get; }
Property Value
System.String
Remarks
Default: - No condition expression
ExpressionAttributeNames
One or more substitution tokens for attribute names in an expression.
virtual IDictionary<string, string> ExpressionAttributeNames { get; }
Property Value
System.Collections.Generic.IDictionary<System.String, System.String>
Remarks
Default: - No expression attribute names
ExpressionAttributeValues
One or more values that can be substituted in an expression.
virtual IDictionary<string, DynamoAttributeValue> ExpressionAttributeValues { get; }
Property Value
System.Collections.Generic.IDictionary<System.String, DynamoAttributeValue>
Remarks
Default: - No expression attribute values
Key
Primary key of the item to retrieve.
IDictionary<string, DynamoAttributeValue> Key { get; }
Property Value
System.Collections.Generic.IDictionary<System.String, DynamoAttributeValue>
Remarks
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.
ReturnConsumedCapacity
Determines the level of detail about provisioned throughput consumption that is returned in the response.
virtual Nullable<DynamoConsumedCapacity> ReturnConsumedCapacity { get; }
Property Value
System.Nullable<DynamoConsumedCapacity>
Remarks
Default: DynamoConsumedCapacity.NONE
ReturnItemCollectionMetrics
Determines whether item collection metrics are returned.
virtual Nullable<DynamoItemCollectionMetrics> ReturnItemCollectionMetrics { get; }
Property Value
System.Nullable<DynamoItemCollectionMetrics>
Remarks
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 to NONE (the default), no statistics are returned.
Default: DynamoItemCollectionMetrics.NONE
ReturnValues
Use ReturnValues if you want to get the item attributes as they appeared before they were deleted.
virtual Nullable<DynamoReturnValues> ReturnValues { get; }
Property Value
System.Nullable<DynamoReturnValues>
Remarks
Default: DynamoReturnValues.NONE
Table
UpdateExpression
An expression that defines one or more attributes to be updated, the action to be performed on them, and new values for them.
virtual string UpdateExpression { get; }
Property Value
System.String
Remarks
Default: - No update expression