Explicitly include or exclude attributes - Amazon SDK for Java 2.x
Services or capabilities described in Amazon Web Services documentation might vary by Region. To see the differences applicable to the China Regions, see Getting Started with Amazon Web Services in China (PDF).

Explicitly include or exclude attributes

The DynamoDB Enhanced Client API offers annotations to exclude data class attributes from becoming attributes on a table. With the API, you can also use an attribute name that's different from the data class attribute name.

Exclude attributes

To ignore attributes that should not be mapped to a DynamoDB table, mark the attribute with the @DynamoDbIgnore annotation.

private String internalKey; @DynamoDbIgnore public String getInternalKey() { return this.internalKey; } public void setInternalKey(String internalKey) { return this.internalKey = internalKey;}

Include attributes

To change the name of an attribute used in the DynamoDB table, mark it with the @DynamoDbAttribute annotation and supply a different name.

private String internalKey; @DynamoDbAttribute("renamedInternalKey") public String getInternalKey() { return this.internalKey; } public void setInternalKey(String internalKey) { return this.internalKey = internalKey;}