@Generated(value="jsii-pacmak/1.74.0 (build 6d08790)",
date="2023-03-22T19:35:50.181Z")
public class DynamoAttributeValue
extends software.amazon.jsii.JsiiObject
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();
Modifier | Constructor and Description |
---|---|
protected |
DynamoAttributeValue(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) |
protected |
DynamoAttributeValue(software.amazon.jsii.JsiiObjectRef objRef) |
Modifier and Type | Method and Description |
---|---|
static DynamoAttributeValue |
booleanFromJsonPath(java.lang.String value)
Sets an attribute of type Boolean from state input through Json path.
|
static DynamoAttributeValue |
fromBinary(java.lang.String value)
Sets an attribute of type Binary.
|
static DynamoAttributeValue |
fromBinarySet(java.util.List<java.lang.String> value)
Sets an attribute of type Binary Set.
|
static DynamoAttributeValue |
fromBoolean(java.lang.Boolean value)
Sets an attribute of type Boolean.
|
static DynamoAttributeValue |
fromList(java.util.List<? extends DynamoAttributeValue> value)
Sets an attribute of type List.
|
static DynamoAttributeValue |
fromMap(java.util.Map<java.lang.String,? extends DynamoAttributeValue> value)
Sets an attribute of type Map.
|
static DynamoAttributeValue |
fromNull(java.lang.Boolean value)
Sets an attribute of type Null.
|
static DynamoAttributeValue |
fromNumber(java.lang.Number value)
Sets a literal number.
|
static DynamoAttributeValue |
fromNumberSet(java.util.List<? extends java.lang.Number> value)
Sets an attribute of type Number Set.
|
static DynamoAttributeValue |
fromString(java.lang.String value)
Sets an attribute of type String.
|
static DynamoAttributeValue |
fromStringSet(java.util.List<java.lang.String> value)
Sets an attribute of type String Set.
|
java.lang.Object |
getAttributeValue()
Represents the data for the attribute.
|
static DynamoAttributeValue |
listFromJsonPath(java.lang.String value)
Sets an attribute of type List.
|
static DynamoAttributeValue |
mapFromJsonPath(java.lang.String value)
Sets an attribute of type Map.
|
static DynamoAttributeValue |
numberFromString(java.lang.String value)
Sets an attribute of type Number.
|
static DynamoAttributeValue |
numberSetFromStrings(java.util.List<java.lang.String> value)
Sets an attribute of type Number Set.
|
java.lang.Object |
toObject()
Returns the DynamoDB attribute value.
|
protected DynamoAttributeValue(software.amazon.jsii.JsiiObjectRef objRef)
protected DynamoAttributeValue(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
public static DynamoAttributeValue booleanFromJsonPath(java.lang.String value)
For example: "BOOL": true
value
- Json path that specifies state input to be used. This parameter is required.public static DynamoAttributeValue fromBinary(java.lang.String value)
For example: "B": "dGhpcyB0ZXh0IGlzIGJhc2U2NC1lbmNvZGVk"
value
- base-64 encoded string. This parameter is required.public static DynamoAttributeValue fromBinarySet(java.util.List<java.lang.String> value)
For example: "BS": ["U3Vubnk=", "UmFpbnk=", "U25vd3k="]
value
- This parameter is required.public static DynamoAttributeValue fromBoolean(java.lang.Boolean value)
For example: "BOOL": true
value
- This parameter is required.public static DynamoAttributeValue fromList(java.util.List<? extends DynamoAttributeValue> value)
For example: "L": [ {"S": "Cookies"} , {"S": "Coffee"}, {"N", "3.14159"}]
value
- This parameter is required.public static DynamoAttributeValue fromMap(java.util.Map<java.lang.String,? extends DynamoAttributeValue> value)
For example: "M": {"Name": {"S": "Joe"}, "Age": {"N": "35"}}
value
- This parameter is required.public static DynamoAttributeValue fromNull(java.lang.Boolean value)
For example: "NULL": true
value
- This parameter is required.public static DynamoAttributeValue fromNumber(java.lang.Number value)
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.
value
- This parameter is required.public static DynamoAttributeValue fromNumberSet(java.util.List<? extends java.lang.Number> value)
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.
value
- This parameter is required.public static DynamoAttributeValue fromString(java.lang.String value)
For example: "S": "Hello" Strings may be literal values or as JsonPath. Example values:
DynamoAttributeValue.fromString('someValue')
DynamoAttributeValue.fromString(JsonPath.stringAt('$.bar'))
value
- This parameter is required.public static DynamoAttributeValue fromStringSet(java.util.List<java.lang.String> value)
For example: "SS": ["Giraffe", "Hippo" ,"Zebra"]
value
- This parameter is required.public static DynamoAttributeValue listFromJsonPath(java.lang.String value)
For example: "L": [ {"S": "Cookies"} , {"S": "Coffee"}, {"S", "Veggies"}]
value
- Json path that specifies state input to be used. This parameter is required.public static DynamoAttributeValue mapFromJsonPath(java.lang.String value)
For example: "M": {"Name": {"S": "Joe"}, "Age": {"N": "35"}}
value
- Json path that specifies state input to be used. This parameter is required.public static DynamoAttributeValue numberFromString(java.lang.String value)
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
value
- This parameter is required.public static DynamoAttributeValue numberSetFromStrings(java.util.List<java.lang.String> value)
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
value
- This parameter is required.public java.lang.Object toObject()
public java.lang.Object getAttributeValue()
Data can be i.e. "S": "Hello"