Class DynamoAttributeValue
- All Implemented Interfaces:
software.amazon.jsii.JsiiSerializable
Each attribute value is described as a name-value pair. The name is the data type, and the value is the data itself.
Example:
Table myTable;
DynamoDeleteItem.Builder.create(this, "DeleteItem")
.key(Map.of("MessageId", DynamoAttributeValue.fromString("message-007")))
.table(myTable)
.resultPath(JsonPath.DISCARD)
.build();
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class software.amazon.jsii.JsiiObject
software.amazon.jsii.JsiiObject.InitializationMode -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedDynamoAttributeValue(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protectedDynamoAttributeValue(software.amazon.jsii.JsiiObjectRef objRef) -
Method Summary
Modifier and TypeMethodDescriptionstatic DynamoAttributeValuebooleanFromJsonata(String value) Sets an attribute of type Boolean from state input through JSONata expression.static DynamoAttributeValuebooleanFromJsonPath(String value) Sets an attribute of type Boolean from state input through Json path.static DynamoAttributeValuefromBinary(String value) Sets an attribute of type Binary.static DynamoAttributeValuefromBinarySet(List<String> value) Sets an attribute of type Binary Set.static DynamoAttributeValuefromBoolean(Boolean value) Sets an attribute of type Boolean.static DynamoAttributeValuefromList(List<? extends DynamoAttributeValue> value) Sets an attribute of type List.static DynamoAttributeValuefromMap(Map<String, ? extends DynamoAttributeValue> value) Sets an attribute of type Map.static DynamoAttributeValueSets an attribute of type Null.static DynamoAttributeValuefromNumber(Number value) Sets a literal number.static DynamoAttributeValuefromNumberSet(List<? extends Number> value) Sets an attribute of type Number Set.static DynamoAttributeValuefromString(String value) Sets an attribute of type String.static DynamoAttributeValuefromStringSet(List<String> value) Sets an attribute of type String Set.Represents the data for the attribute.static DynamoAttributeValuelistFromJsonata(String value) Sets an attribute of type List.static DynamoAttributeValuelistFromJsonPath(String value) Sets an attribute of type List.static DynamoAttributeValuemapFromJsonata(String value) Sets an attribute of type Map.static DynamoAttributeValuemapFromJsonPath(String value) Sets an attribute of type Map.static DynamoAttributeValuenumberFromString(String value) Sets an attribute of type Number.static DynamoAttributeValuenumberSetFromStrings(List<String> value) Sets an attribute of type Number Set.toObject()Returns the DynamoDB attribute value.Methods inherited from class software.amazon.jsii.JsiiObject
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSetMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Constructor Details
-
DynamoAttributeValue
protected DynamoAttributeValue(software.amazon.jsii.JsiiObjectRef objRef) -
DynamoAttributeValue
protected DynamoAttributeValue(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
-
-
Method Details
-
booleanFromJsonata
@Stability(Stable) @NotNull public static DynamoAttributeValue booleanFromJsonata(@NotNull String value) Sets an attribute of type Boolean from state input through JSONata expression.For example: "BOOL": true
- Parameters:
value- JSONata expression that specifies state input to be used. This parameter is required.
-
booleanFromJsonPath
@Stability(Stable) @NotNull public static DynamoAttributeValue booleanFromJsonPath(@NotNull String value) Sets an attribute of type Boolean from state input through Json path.For example: "BOOL": true
- Parameters:
value- Json path that specifies state input to be used. This parameter is required.
-
fromBinary
Sets an attribute of type Binary.For example: "B": "dGhpcyB0ZXh0IGlzIGJhc2U2NC1lbmNvZGVk"
- Parameters:
value- base-64 encoded string. This parameter is required.
-
fromBinarySet
@Stability(Stable) @NotNull public static DynamoAttributeValue fromBinarySet(@NotNull List<String> value) Sets an attribute of type Binary Set.For example: "BS": ["U3Vubnk=", "UmFpbnk=", "U25vd3k="]
- Parameters:
value- This parameter is required.
-
fromBoolean
Sets an attribute of type Boolean.For example: "BOOL": true
- Parameters:
value- This parameter is required.
-
fromList
@Stability(Stable) @NotNull public static DynamoAttributeValue fromList(@NotNull List<? extends DynamoAttributeValue> value) Sets an attribute of type List.For example: "L": [ {"S": "Cookies"} , {"S": "Coffee"}, {"N", "3.14159"}]
- Parameters:
value- This parameter is required.
-
fromMap
@Stability(Stable) @NotNull public static DynamoAttributeValue fromMap(@NotNull Map<String, ? extends DynamoAttributeValue> value) Sets an attribute of type Map.For example: "M": {"Name": {"S": "Joe"}, "Age": {"N": "35"}}
- Parameters:
value- This parameter is required.
-
fromNull
Sets an attribute of type Null.For example: "NULL": true
- Parameters:
value- This parameter is required.
-
fromNumber
Sets a literal number.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.
- Parameters:
value- This parameter is required.
-
fromNumberSet
@Stability(Stable) @NotNull public static DynamoAttributeValue fromNumberSet(@NotNull List<? extends Number> value) Sets an attribute of type Number Set.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.
- Parameters:
value- This parameter is required.
-
fromString
Sets an attribute of type String.For example: "S": "Hello" Strings may be literal values or as JSONata expression or as JsonPath. Example values:
DynamoAttributeValue.fromString('someValue')DynamoAttributeValue.fromString('{% $bar %}')DynamoAttributeValue.fromString(JsonPath.stringAt('$.bar'))
- Parameters:
value- This parameter is required.
-
fromStringSet
@Stability(Stable) @NotNull public static DynamoAttributeValue fromStringSet(@NotNull List<String> value) Sets an attribute of type String Set.For example: "SS": ["Giraffe", "Hippo" ,"Zebra"]
- Parameters:
value- This parameter is required.
-
listFromJsonata
@Stability(Stable) @NotNull public static DynamoAttributeValue listFromJsonata(@NotNull String value) Sets an attribute of type List.For example: "L": [ {"S": "Cookies"} , {"S": "Coffee"}, {"S", "Veggies"}]
- Parameters:
value- JSONata expression that specifies state input to be used. This parameter is required.
-
listFromJsonPath
@Stability(Stable) @NotNull public static DynamoAttributeValue listFromJsonPath(@NotNull String value) Sets an attribute of type List.For example: "L": [ {"S": "Cookies"} , {"S": "Coffee"}, {"S", "Veggies"}]
- Parameters:
value- Json path that specifies state input to be used. This parameter is required.
-
mapFromJsonata
@Stability(Stable) @NotNull public static DynamoAttributeValue mapFromJsonata(@NotNull String value) Sets an attribute of type Map.For example: "M": {"Name": {"S": "Joe"}, "Age": {"N": "35"}}
- Parameters:
value- JSONata expression that specifies state input to be used. This parameter is required.
-
mapFromJsonPath
@Stability(Stable) @NotNull public static DynamoAttributeValue mapFromJsonPath(@NotNull String value) Sets an attribute of type Map.For example: "M": {"Name": {"S": "Joe"}, "Age": {"N": "35"}}
- Parameters:
value- Json path that specifies state input to be used. This parameter is required.
-
numberFromString
@Stability(Stable) @NotNull public static DynamoAttributeValue numberFromString(@NotNull String value) Sets an attribute of type Number.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 JSONata expression or as JsonPath
- Parameters:
value- This parameter is required.
-
numberSetFromStrings
@Stability(Stable) @NotNull public static DynamoAttributeValue numberSetFromStrings(@NotNull List<String> value) Sets an attribute of type Number Set.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
- Parameters:
value- This parameter is required.
-
toObject
Returns the DynamoDB attribute value. -
getAttributeValue
Represents the data for the attribute.Data can be i.e. "S": "Hello"
-