Attribute

On This Page

Description

A named JSON object that represents a NoSQL item attribute.

Syntax

"<attribute name>": <attribute value>
Elements
<attribute name>

The attribute name. See Attribute Names for attribute naming guidelines.

  • Type: String
<attribute value>

An attribute-value object that provides information about the attribute's data type and value.

Examples

Define an attribute named username that signifies a username. The attribute type is a string ("S"), and its data value is "johnd":

{"username": {"S": "johnd"}}

Define an age attribute named age that signifies a user's age. The attribute type is a number ("N"), and its data value is "34"; note the numeric data value is represented as a string:

{"age": {"N": "34"}}

Define an attribute named is_admin that signifies whether a user has administrator privileges. The attribute type is a Boolean value ("BOOL"), and its data value is false:

{"is_admin": {"BOOL": false}}

Define an age attribute named credentials that signifies encoded username and password login credentials. The attribute type is a number ("B"), and its data value is "iguazio:$apr1$YgrCYAYo$6v6iumigwirH4Jsdt4MWr0"; note the blob data value is represented as a string:

{"credentials": {"B": "iguazio:$apr1$YgrCYAYo$6v6iumigwirH4Jsdt4MWr0"}}

See Also