Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface IDynamoDBModelConfig

DynamoDBModel configuration options.

export
interface

IDynamoDBModelConfig

Hierarchy

  • IDynamoDBModelConfig

Index

Properties

documentClient

documentClient: DocumentClient

DynamoDBDocument client instance. Must be declared before configuring the model.

type

{DocumentClient}

memberof

IDynamoDBModelConfig

hash

hash: string

The name of the hash key.

type

{string}

memberof

IDynamoDBModelConfig

Optional hashType

hashType: "string" | "number"

The type of the hash key.

type

{('string' | 'number')}

memberof

IDynamoDBModelConfig

Optional indexName

indexName: string

The name of the index to use when running an index operation. By default if will be called byGSIK. If the index is not created before hand, and the model is configured with a tenant, then the method will fail.

type

{string}

memberof

IDynamoDBModelConfig

Optional maxGSIK

maxGSIK: number

The maximum GSIK values to use to index the models. This is necessary when configuring a tenant, since you can't configure an IAM policy to restrict access to an item with a prefix on its hash ID. So, a GSIK will be configured on every item by the library, using the tenant value plus a number between 0 and maxGSIK. Then you can create an IAM policy that restrict access on the index (called by defaylt byGSIK) with access only on the items with the appropiate GSIK value.

type

{number}

memberof

IDynamoDBModelConfig

Optional range

range: string

The name of the range key.

type

{string}

memberof

IDynamoDBModelConfig

Optional rangeType

rangeType: "string" | "number"

The type of the range key.

type

{('string' | 'number')}

memberof

IDynamoDBModelConfig

struct

The struct representing the model. Should be configured followin the superstruct configuration guide.

type

{IDynamoDBModelStruct}

memberof

IDynamoDBModelConfig

table

table: string

The table name. If not provided it will try to use the table name globally configured.

type

{string}

memberof

IDynamoDBModelConfig

Optional tenant

tenant: string

The tenant unique identifier.

type

{string}

memberof

IDynamoDBModelConfig

Optional track

track: boolean

Value used to track the dates where modifications were done to the item.

type

{boolean}

memberof

IDynamoDBModelConfig

Generated using TypeDoc