Class DynamoAttributeValue
Represents the data for an attribute.
Inheritance
Namespace: Amazon.CDK.AWS.StepFunctions.Tasks
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class DynamoAttributeValue : DeputyBase
Syntax (vb)
Public Class DynamoAttributeValue
Inherits DeputyBase
Remarks
Each attribute value is described as a name-value pair. The name is the data type, and the value is the data itself.
See: https://docs.aws.amazon.com/amazondynamodb/latest/APIReference/API_AttributeValue.html
ExampleMetadata: infused
Examples
Table myTable;
new DynamoDeleteItem(this, "DeleteItem", new DynamoDeleteItemProps {
Key = new Dictionary<string, DynamoAttributeValue> { { "MessageId", DynamoAttributeValue.FromString("message-007") } },
Table = myTable,
ResultPath = JsonPath.DISCARD
});
Synopsis
Constructors
DynamoAttributeValue(ByRefValue) | Used by jsii to construct an instance of this class from a Javascript-owned object reference |
DynamoAttributeValue(DeputyBase.DeputyProps) | Used by jsii to construct an instance of this class from DeputyProps |
Properties
AttributeValue | Represents the data for the attribute. |
Methods
BooleanFromJsonPath(String) | Sets an attribute of type Boolean from state input through Json path. |
FromBinary(String) | Sets an attribute of type Binary. |
FromBinarySet(String[]) | Sets an attribute of type Binary Set. |
FromBoolean(Boolean) | Sets an attribute of type Boolean. |
FromList(DynamoAttributeValue[]) | Sets an attribute of type List. |
FromMap(IDictionary<String, DynamoAttributeValue>) | Sets an attribute of type Map. |
FromNull(Boolean) | Sets an attribute of type Null. |
FromNumber(Double) | Sets a literal number. |
FromNumberSet(Double[]) | Sets an attribute of type Number Set. |
FromString(String) | Sets an attribute of type String. |
FromStringSet(String[]) | Sets an attribute of type String Set. |
ListFromJsonPath(String) | Sets an attribute of type List. |
MapFromJsonPath(String) | Sets an attribute of type Map. |
NumberFromString(String) | Sets an attribute of type Number. |
NumberSetFromStrings(String[]) | Sets an attribute of type Number Set. |
ToObject() | Returns the DynamoDB attribute value. |
Constructors
DynamoAttributeValue(ByRefValue)
Used by jsii to construct an instance of this class from a Javascript-owned object reference
protected DynamoAttributeValue(ByRefValue reference)
Parameters
- reference Amazon.JSII.Runtime.Deputy.ByRefValue
The Javascript-owned object reference
DynamoAttributeValue(DeputyBase.DeputyProps)
Used by jsii to construct an instance of this class from DeputyProps
protected DynamoAttributeValue(DeputyBase.DeputyProps props)
Parameters
- props Amazon.JSII.Runtime.Deputy.DeputyBase.DeputyProps
The deputy props
Properties
AttributeValue
Represents the data for the attribute.
public virtual object AttributeValue { get; }
Property Value
System.Object
Remarks
Data can be i.e. "S": "Hello"
Methods
BooleanFromJsonPath(String)
Sets an attribute of type Boolean from state input through Json path.
public static DynamoAttributeValue BooleanFromJsonPath(string value)
Parameters
- value System.String
Json path that specifies state input to be used.
Returns
Remarks
For example: "BOOL": true
FromBinary(String)
Sets an attribute of type Binary.
public static DynamoAttributeValue FromBinary(string value)
Parameters
- value System.String
base-64 encoded string.
Returns
Remarks
For example: "B": "dGhpcyB0ZXh0IGlzIGJhc2U2NC1lbmNvZGVk"
FromBinarySet(String[])
Sets an attribute of type Binary Set.
public static DynamoAttributeValue FromBinarySet(string[] value)
Parameters
- value System.String[]
Returns
Remarks
For example: "BS": ["U3Vubnk=", "UmFpbnk=", "U25vd3k="]
FromBoolean(Boolean)
Sets an attribute of type Boolean.
public static DynamoAttributeValue FromBoolean(bool value)
Parameters
- value System.Boolean
Returns
Remarks
For example: "BOOL": true
FromList(DynamoAttributeValue[])
Sets an attribute of type List.
public static DynamoAttributeValue FromList(DynamoAttributeValue[] value)
Parameters
- value DynamoAttributeValue[]
Returns
Remarks
For example: "L": [ {"S": "Cookies"} , {"S": "Coffee"}, {"N", "3.14159"}]
FromMap(IDictionary<String, DynamoAttributeValue>)
Sets an attribute of type Map.
public static DynamoAttributeValue FromMap(IDictionary<string, DynamoAttributeValue> value)
Parameters
- value System.Collections.Generic.IDictionary<System.String, DynamoAttributeValue>
Returns
Remarks
For example: "M": {"Name": {"S": "Joe"}, "Age": {"N": "35"}}
FromNull(Boolean)
Sets an attribute of type Null.
public static DynamoAttributeValue FromNull(bool value)
Parameters
- value System.Boolean
Returns
Remarks
For example: "NULL": true
FromNumber(Double)
Sets a literal number.
public static DynamoAttributeValue FromNumber(double value)
Parameters
- value System.Double
Returns
Remarks
For example: 1234 Numbers are sent across the network to DynamoDB as strings, to maximize compatibility across languages and libraries. However, DynamoDB treats them as number type attributes for mathematical operations.
FromNumberSet(Double[])
Sets an attribute of type Number Set.
public static DynamoAttributeValue FromNumberSet(double[] value)
Parameters
- value System.Double[]
Returns
Remarks
For example: "NS": ["42.2", "-19", "7.5", "3.14"] Numbers are sent across the network to DynamoDB as strings, to maximize compatibility across languages and libraries. However, DynamoDB treats them as number type attributes for mathematical operations.
FromString(String)
Sets an attribute of type String.
public static DynamoAttributeValue FromString(string value)
Parameters
- value System.String
Returns
Remarks
For example: "S": "Hello" Strings may be literal values or as JsonPath. Example values:
FromStringSet(String[])
Sets an attribute of type String Set.
public static DynamoAttributeValue FromStringSet(string[] value)
Parameters
- value System.String[]
Returns
Remarks
For example: "SS": ["Giraffe", "Hippo" ,"Zebra"]
ListFromJsonPath(String)
Sets an attribute of type List.
public static DynamoAttributeValue ListFromJsonPath(string value)
Parameters
- value System.String
Json path that specifies state input to be used.
Returns
Remarks
For example: "L": [ {"S": "Cookies"} , {"S": "Coffee"}, {"S", "Veggies"}]
MapFromJsonPath(String)
Sets an attribute of type Map.
public static DynamoAttributeValue MapFromJsonPath(string value)
Parameters
- value System.String
Json path that specifies state input to be used.
Returns
Remarks
For example: "M": {"Name": {"S": "Joe"}, "Age": {"N": "35"}}
NumberFromString(String)
Sets an attribute of type Number.
public static DynamoAttributeValue NumberFromString(string value)
Parameters
- value System.String
Returns
Remarks
For example: "N": "123.45" Numbers are sent across the network to DynamoDB as strings, to maximize compatibility across languages and libraries. However, DynamoDB treats them as number type attributes for mathematical operations.
Numbers may be expressed as literal strings or as JsonPath
NumberSetFromStrings(String[])
Sets an attribute of type Number Set.
public static DynamoAttributeValue NumberSetFromStrings(string[] value)
Parameters
- value System.String[]
Returns
Remarks
For example: "NS": ["42.2", "-19", "7.5", "3.14"] Numbers are sent across the network to DynamoDB as strings, to maximize compatibility across languages and libraries. However, DynamoDB treats them as number type attributes for mathematical operations.
Numbers may be expressed as literal strings or as JsonPath
ToObject()
Returns the DynamoDB attribute value.
public virtual object ToObject()
Returns
System.Object