The name of the hash
key.
The type of the hash
key.
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.
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.
The name of the range
key.
The type of the range
key.
The struct representing the model. Should be configured followin the superstruct configuration guide.
DynamoDB table name to store the model.
The tenant
unique identifier.
Value used to track the dates where modifications were done to the item.
Adds the gsik
value to the item, created by joining the tenant
value
with a random value between 0
and maxGSIK
.
Gets the hash
and range
key from the model.
If tenant
is defined, it also adds it to the hash
key.
Adds the appropiate track values if the track
option is on.
Validates the body of the request using superstruct
.
Generated using TypeDoc
Regular expression to use when checking if the
hash
key has thetenant
prefixed.{RegExp}
IModel