@cloudcomponents/cdk-dynamodb-seeder
@cloudcomponents/cdk-dynamodb-seeder / DynamoDBSeeder
-
Construct↳
DynamoDBSeeder
• new DynamoDBSeeder(scope, id, props)
| Name | Type |
|---|---|
scope |
Construct |
id |
string |
props |
DynamoDBSeederProps |
Construct.constructor
• Readonly node: ConstructNode
The construct tree node associated with this construct.
stability stable
Construct.node
▸ Protected onPrepare(): void
Perform final modifications before synthesis.
This method can be implemented by derived constructs in order to perform final changes before synthesis. prepare() will be called after child constructs have been prepared.
This is an advanced framework feature. Only use this if you understand the implications.
stability stable
void
Construct.onPrepare
▸ Protected onSynthesize(session): void
Allows this construct to emit artifacts into the cloud assembly during synthesis.
This method is usually implemented by framework-level constructs such as Stack and Asset
as they participate in synthesizing the cloud assembly.
stability stable
| Name | Type | Description |
|---|---|---|
session |
ISynthesisSession |
The synthesis session. |
void
Construct.onSynthesize
▸ Protected onValidate(): string[]
Validate the current construct.
This method can be implemented by derived constructs in order to perform validation logic. It is called on all constructs before synthesis.
stability stable
string[]
An array of validation error messages, or an empty array if the construct is valid.
Construct.onValidate
▸ Protected prepare(): void
Perform final modifications before synthesis.
This method can be implemented by derived constructs in order to perform final changes before synthesis. prepare() will be called after child constructs have been prepared.
This is an advanced framework feature. Only use this if you understand the implications.
stability stable
void
Construct.prepare
▸ Protected synthesize(session): void
Allows this construct to emit artifacts into the cloud assembly during synthesis.
This method is usually implemented by framework-level constructs such as Stack and Asset
as they participate in synthesizing the cloud assembly.
stability stable
| Name | Type | Description |
|---|---|---|
session |
ISynthesisSession |
The synthesis session. |
void
Construct.synthesize
▸ toString(): string
Returns a string representation of this construct.
stability stable
string
Construct.toString
▸ Protected validate(): string[]
Validate the current construct.
This method can be implemented by derived constructs in order to perform validation logic. It is called on all constructs before synthesis.
stability stable
string[]
An array of validation error messages, or an empty array if the construct is valid.
Construct.validate
▸ Static isConstruct(x): x is Construct
Return whether the given object is a Construct.
stability stable
| Name | Type |
|---|---|
x |
any |
x is Construct
Construct.isConstruct
@cloudcomponents/cdk-dynamodb-seeder / InlineSeeds
Seeds from an inline json object (limited to 4KiB).
-
↳
InlineSeeds
• new InlineSeeds(seeds)
| Name | Type |
|---|---|
seeds |
string |
▸ bind(_scope): SeedsConfig
Called when the seeder is initialized to allow this object to bind to the stack.
| Name | Type |
|---|---|
_scope |
Construct |
▸ Static fromBucket(bucket, key, objectVersion?): S3Seeds
| Name | Type | Description |
|---|---|---|
bucket |
IBucket |
The S3 bucket |
key |
string |
The object key |
objectVersion? |
string |
Optional S3 object version |
S3Seeds associated with the specified S3 object.
▸ Static fromInline(seeds): InlineSeeds
| Name | Type | Description |
|---|---|---|
seeds |
Record<string, unknown>[] |
The actual json code (limited to 4KiB) |
InlineSeeds with inline seeds.
▸ Static fromJsonFile(path, options?): JsonFileSeeds
Loads the seeds from a local disk path and uploads it to s3.
| Name | Type | Description |
|---|---|---|
path |
string |
Path to json seeds file. |
options? |
AssetOptions |
- |
JsonFileSeeds associated with the specified S3 object.
@cloudcomponents/cdk-dynamodb-seeder / JsonFileSeeds
Seeds from a local json file.
-
↳
JsonFileSeeds
• new JsonFileSeeds(path, options?)
| Name | Type |
|---|---|
path |
string |
options |
AssetOptions |
• Private Optional asset: Asset
• Readonly path: string
▸ bind(scope): SeedsConfig
Called when the seeder is initialized to allow this object to bind to the stack.
| Name | Type |
|---|---|
scope |
Construct |
▸ Static fromBucket(bucket, key, objectVersion?): S3Seeds
| Name | Type | Description |
|---|---|---|
bucket |
IBucket |
The S3 bucket |
key |
string |
The object key |
objectVersion? |
string |
Optional S3 object version |
S3Seeds associated with the specified S3 object.
▸ Static fromInline(seeds): InlineSeeds
| Name | Type | Description |
|---|---|---|
seeds |
Record<string, unknown>[] |
The actual json code (limited to 4KiB) |
InlineSeeds with inline seeds.
▸ Static fromJsonFile(path, options?): JsonFileSeeds
Loads the seeds from a local disk path and uploads it to s3.
| Name | Type | Description |
|---|---|---|
path |
string |
Path to json seeds file. |
options? |
AssetOptions |
- |
JsonFileSeeds associated with the specified S3 object.
@cloudcomponents/cdk-dynamodb-seeder / S3Seeds
Seeds from an S3 archive.
-
↳
S3Seeds
• new S3Seeds(bucket, key, objectVersion?)
| Name | Type |
|---|---|
bucket |
IBucket |
key |
string |
objectVersion? |
string |
• Private bucketName: string
▸ bind(_scope): SeedsConfig
Called when the seeder is initialized to allow this object to bind to the stack.
| Name | Type |
|---|---|
_scope |
Construct |
▸ Static fromBucket(bucket, key, objectVersion?): S3Seeds
| Name | Type | Description |
|---|---|---|
bucket |
IBucket |
The S3 bucket |
key |
string |
The object key |
objectVersion? |
string |
Optional S3 object version |
S3Seeds associated with the specified S3 object.
▸ Static fromInline(seeds): InlineSeeds
| Name | Type | Description |
|---|---|---|
seeds |
Record<string, unknown>[] |
The actual json code (limited to 4KiB) |
InlineSeeds with inline seeds.
▸ Static fromJsonFile(path, options?): JsonFileSeeds
Loads the seeds from a local disk path and uploads it to s3.
| Name | Type | Description |
|---|---|---|
path |
string |
Path to json seeds file. |
options? |
AssetOptions |
- |
JsonFileSeeds associated with the specified S3 object.
@cloudcomponents/cdk-dynamodb-seeder / Seeds
-
Seeds↳
S3Seeds
• new Seeds()
▸ Abstract bind(scope): SeedsConfig
Called when the seeder is initialized to allow this object to bind to the stack.
| Name | Type | Description |
|---|---|---|
scope |
Construct |
The binding scope. |
▸ Static fromBucket(bucket, key, objectVersion?): S3Seeds
| Name | Type | Description |
|---|---|---|
bucket |
IBucket |
The S3 bucket |
key |
string |
The object key |
objectVersion? |
string |
Optional S3 object version |
S3Seeds associated with the specified S3 object.
▸ Static fromInline(seeds): InlineSeeds
| Name | Type | Description |
|---|---|---|
seeds |
Record<string, unknown>[] |
The actual json code (limited to 4KiB) |
InlineSeeds with inline seeds.
▸ Static fromJsonFile(path, options?): JsonFileSeeds
Loads the seeds from a local disk path and uploads it to s3.
| Name | Type | Description |
|---|---|---|
path |
string |
Path to json seeds file. |
options? |
AssetOptions |
- |
JsonFileSeeds associated with the specified S3 object.
@cloudcomponents/cdk-dynamodb-seeder / DynamoDBSeederProps
• Readonly seeds: Seeds
• Readonly table: ITable
• Optional Readonly timeout: Duration
The function execution time (in seconds) after which Lambda terminates the function. Because the execution time affects cost, set this value based on the function's expected execution time.
default Duration.minutes(15)
@cloudcomponents/cdk-dynamodb-seeder / SeedsConfig
• Optional Readonly inlineSeeds: string
Inline seeds.
• Optional Readonly s3Location: Location
The location of the seeds in S3.