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.

Key

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

func Key(key string) KeyBuilder

Key creates a KeyBuilder. The argument should represent the desired partition key or sort key value. KeyBuilders should only be used to specify relationships for Key Condition Expressions. When referring to the partition key or sort key in any other Expression, use Name().

Example:

// Use Key() to create a key condition expression keyCondition := expression.Key("foo").Equal(expression.Value("bar"))

key

Type: string

KeyBuilder

KeyBuilder represents either the partition key or the sort key, both of which are top level attributes to some item in DynamoDB. Since KeyBuilder represents an operand, KeyBuilder implements the OperandBuilder interface. Methods and functions in the package take KeyBuilder as an argument and establishes relationships between operands. However, KeyBuilder should only be used to describe Key Condition Expressions. KeyBuilder should only be initialized using the function Key().

Example:

// Create a KeyBuilder representing the item key "aKey" keyBuilder := expression.Key("aKey")

On this page: