Synchronizer
Uploads your Database
configuration to DynamoDB-Toolshack:
import { Synchronizer } from 'dynamodb-toolbox/database/actions/synchronize'
await pokeDB
.build(Synchronizer)
.awsAccount({
awsAccountId: '398259209128',
awsRegion: 'us-east-1'
})
.sync({ apiKey: '<YOUR_API_KEY_HERE>' })
Requestβ
.awsAccount(...)
β
(required)
Defines the AWS accountId
and region
associated with the Database
. You can optionally include metadata:
await PokeTable.build(Synchronizer)
.awsAccount({
awsAccountId: '398259209128',
awsRegion: 'us-east-1',
// π Optional metadata
title: 'Dev',
description: 'Development environment account',
// π https://ui.shadcn.com/colors
color: 'blue'
})
.sync(...)
Methodsβ
.sync(...)
β
Uploads the configuration to DynamoDB-Toolshack:
await PokeTable.build(Synchronizer)
.awsAccount(...)
.sync({
// π https://app.dynamodb-toolshack.com/api-keys
apiKey: '<API_KEY>',
// π (optional) Keep only specified entities (`false` by default)
deleteUnknownEntities: true,
})