AWS SDK for Go (PILOT)
API Reference

PREVIEW DOCUMENTATION - This is a preview of a new format for the AWS SDK for Go API Reference documentation. For the current AWS SDK for Go API Reference, see https://docs.aws.amazon.com/sdk-for-go/api/.

We welcome your feedback on this new version of the documentation. Send your comments to aws-sdkdocs-feedback@amazon.com.

AttributeValue

import "github.com/aws/aws-sdk-go/service/dynamodb"

type AttributeValue struct { B []byte `type:"blob"` BOOL *bool `type:"boolean"` BS [][]byte `type:"list"` L []*AttributeValue `type:"list"` M map[string]*AttributeValue `type:"map"` N *string `type:"string"` NS []*string `type:"list"` NULL *bool `type:"boolean"` S *string `type:"string"` SS []*string `type:"list"` }

Represents the data for an attribute.

Each attribute value is described as a name-value pair. The name is the data type, and the value is the data itself.

For more information, see Data Types (https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/HowItWorks.NamingRulesDataTypes.html#HowItWorks.DataTypes) in the Amazon DynamoDB Developer Guide.

B

Type: []byte

An attribute of type Binary. For example:

"B": "dGhpcyB0ZXh0IGlzIGJhc2U2NC1lbmNvZGVk"

B is automatically base64 encoded/decoded by the SDK.

BOOL

Type: *bool

An attribute of type Boolean. For example:

"BOOL": true

BS

Type: [][]byte

An attribute of type Binary Set. For example:

"BS": ["U3Vubnk=", "UmFpbnk=", "U25vd3k="]

L

Represents the data for an attribute.

Each attribute value is described as a name-value pair. The name is the data type, and the value is the data itself.

For more information, see Data Types (https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/HowItWorks.NamingRulesDataTypes.html#HowItWorks.DataTypes) in the Amazon DynamoDB Developer Guide.

M

Type: map[string]*AttributeValue

An attribute of type Map. For example:

"M": {"Name": {"S": "Joe"}, "Age": {"N": "35"}}

N

Type: *string

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.

NS

Type: []*string

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.

NULL

Type: *bool

An attribute of type Null. For example:

"NULL": true

S

Type: *string

An attribute of type String. For example:

"S": "Hello"

SS

Type: []*string

An attribute of type String Set. For example:

"SS": ["Giraffe", "Hippo" ,"Zebra"]

Method

GoString

func (s AttributeValue) GoString() string

GoString returns the string representation

SetB

func (s *AttributeValue) SetB(v []byte) *AttributeValue

SetB sets the B field's value.

SetBOOL

func (s *AttributeValue) SetBOOL(v bool) *AttributeValue

SetBOOL sets the BOOL field's value.

SetBS

func (s *AttributeValue) SetBS(v [][]byte) *AttributeValue

SetBS sets the BS field's value.

SetL

func (s *AttributeValue) SetL(v []*AttributeValue) *AttributeValue

SetL sets the L field's value.

SetM

func (s *AttributeValue) SetM(v map[string]*AttributeValue) *AttributeValue

SetM sets the M field's value.

SetN

func (s *AttributeValue) SetN(v string) *AttributeValue

SetN sets the N field's value.

SetNS

func (s *AttributeValue) SetNS(v []*string) *AttributeValue

SetNS sets the NS field's value.

SetNULL

func (s *AttributeValue) SetNULL(v bool) *AttributeValue

SetNULL sets the NULL field's value.

SetS

func (s *AttributeValue) SetS(v string) *AttributeValue

SetS sets the S field's value.

SetSS

func (s *AttributeValue) SetSS(v []*string) *AttributeValue

SetSS sets the SS field's value.

String

func (s AttributeValue) String() string

String returns the string representation

On this page: