public static final class DynamoDbPersistenceAdapter.Builder extends Object
Modifier and Type | Method and Description |
---|---|
DynamoDbPersistenceAdapter |
build() |
DynamoDbPersistenceAdapter.Builder |
withAttributesKeyName(String attributesKeyName)
Optional name of the attributes key.
|
DynamoDbPersistenceAdapter.Builder |
withAutoCreateTable(boolean autoCreateTable)
Optional flag specifying whether the adapter should automatically create a table with the configured name
if it does not already exist.
|
DynamoDbPersistenceAdapter.Builder |
withDynamoDbClient(com.amazonaws.services.dynamodbv2.AmazonDynamoDB dynamoDb)
Optional DynamoDB client instance to use.
|
DynamoDbPersistenceAdapter.Builder |
withPartitionKeyGenerator(Function<com.amazon.ask.model.RequestEnvelope,String> partitionKeyGenerator)
Optional partition key generator function used to derive partition key value from one or more
attributes of a
RequestEnvelope . |
DynamoDbPersistenceAdapter.Builder |
withPartitionKeyName(String partitionKeyName)
Optional name of the partition key used to key attributes.
|
DynamoDbPersistenceAdapter.Builder |
withTableName(String tableName)
Name of the DynamoDB table to use for storing Skill persistence attributes.
|
public DynamoDbPersistenceAdapter.Builder withDynamoDbClient(com.amazonaws.services.dynamodbv2.AmazonDynamoDB dynamoDb)
dynamoDb
- client instancepublic DynamoDbPersistenceAdapter.Builder withTableName(String tableName)
tableName
- name of the DynamoDB table to usepublic DynamoDbPersistenceAdapter.Builder withPartitionKeyName(String partitionKeyName)
partitionKeyName
- name of the partition keypublic DynamoDbPersistenceAdapter.Builder withAttributesKeyName(String attributesKeyName)
attributesKeyName
- name of the attribute keypublic DynamoDbPersistenceAdapter.Builder withPartitionKeyGenerator(Function<com.amazon.ask.model.RequestEnvelope,String> partitionKeyGenerator)
RequestEnvelope
. By default, PartitionKeyGenerators.userId()
is used.partitionKeyGenerator
- partition key generator functionpublic DynamoDbPersistenceAdapter.Builder withAutoCreateTable(boolean autoCreateTable)
autoCreateTable
- true if the table should be automatically created if it does not already existpublic DynamoDbPersistenceAdapter build()
Copyright © Amazon.com, Inc. or its affiliates. All Rights Reserved.