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.

Put

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

type Put struct { ConditionExpression *string `type:"string"` ExpressionAttributeNames map[string]*string `type:"map"` ExpressionAttributeValues map[string]*AttributeValue `type:"map"` Item map[string]*AttributeValue `type:"map" required:"true"` ReturnValuesOnConditionCheckFailure *string `type:"string" enum:"ReturnValuesOnConditionCheckFailure"` TableName *string `min:"3" type:"string" required:"true"` }

Represents a request to perform a PutItem operation.

ConditionExpression

Type: *string

A condition that must be satisfied in order for a conditional update to succeed.

ExpressionAttributeNames

Type: map[string]*string

One or more substitution tokens for attribute names in an expression.

ExpressionAttributeValues

Type: map[string]*AttributeValue

One or more values that can be substituted in an expression.

Item

Type: map[string]*AttributeValue

A map of attribute name to attribute values, representing the primary key of the item to be written by PutItem. All of the table's primary key attributes must be specified, and their data types must match those of the table's key schema. If any attributes are present in the item that are part of an index key schema for the table, their types must match the index key schema.

Item is a required field

ReturnValuesOnConditionCheckFailure

Type: *string

Use ReturnValuesOnConditionCheckFailure to get the item attributes if the Put condition fails. For ReturnValuesOnConditionCheckFailure, the valid values are: NONE and ALL_OLD.

TableName

Type: *string

Name of the table in which to write the item.

TableName is a required field

Method

GoString

func (s Put) GoString() string

GoString returns the string representation

SetConditionExpression

func (s *Put) SetConditionExpression(v string) *Put

SetConditionExpression sets the ConditionExpression field's value.

SetExpressionAttributeNames

func (s *Put) SetExpressionAttributeNames(v map[string]*string) *Put

SetExpressionAttributeNames sets the ExpressionAttributeNames field's value.

SetExpressionAttributeValues

func (s *Put) SetExpressionAttributeValues(v map[string]*AttributeValue) *Put

SetExpressionAttributeValues sets the ExpressionAttributeValues field's value.

SetItem

func (s *Put) SetItem(v map[string]*AttributeValue) *Put

SetItem sets the Item field's value.

SetReturnValuesOnConditionCheckFailure

func (s *Put) SetReturnValuesOnConditionCheckFailure(v string) *Put

SetReturnValuesOnConditionCheckFailure sets the ReturnValuesOnConditionCheckFailure field's value.

SetTableName

func (s *Put) SetTableName(v string) *Put

SetTableName sets the TableName field's value.

String

func (s Put) String() string

String returns the string representation

Validate

func (s *Put) Validate() error

Validate inspects the fields of the type to determine if they are valid.

PutRequest

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

type PutRequest struct { Item map[string]*AttributeValue `type:"map" required:"true"` }

Represents a request to perform a PutItem operation on an item.

Item

Type: map[string]*AttributeValue

A map of attribute name to attribute values, representing the primary key of an item to be processed by PutItem. All of the table's primary key attributes must be specified, and their data types must match those of the table's key schema. If any attributes are present in the item which are part of an index key schema for the table, their types must match the index key schema.

Item is a required field

Method

GoString

func (s PutRequest) GoString() string

GoString returns the string representation

SetItem

func (s *PutRequest) SetItem(v map[string]*AttributeValue) *PutRequest

SetItem sets the Item field's value.

String

func (s PutRequest) String() string

String returns the string representation

On this page: