Skip to main content

DynamoDBSchema

The DynamoDBSchema class is the schema for the DynamoDB resource, which represents an AWS DynamoDB table. Terraform provisions it as aws_dynamodb_table.

@group

Resources/DynamoDB

@overrideProperty

parents - This resource has no parents.

@overrideProperty

resourceId - The resource id is of format dynamodb-<table-name>

Hierarchy

  • BaseResourceSchema
    • DynamoDBSchema

Index

Properties

inheritedlocalResourceId

localResourceId: string

The ID the resource was created with, unique within its scope.

inheritedparents

parents: IResourceReference[]

The resources this one is built on top of.

properties

properties: { AttributeDefinitions: { AttributeName: string; AttributeType: B | N | S }[]; awsAccountId: string; awsRegionId: string; billingMode: { settings: DynamoDBBillingPayPerRequestSchema; type: PAY_PER_REQUEST } | { settings: DynamoDBBillingProvisionedSchema; type: PROVISIONED }; DeletionProtectionEnabled: boolean; GlobalSecondaryIndexes: DynamoDBSecondaryIndexSchema[]; KeySchema: DynamoDBKeySchema[]; LocalSecondaryIndexes: DynamoDBSecondaryIndexSchema[]; PointInTimeRecoveryEnabled: boolean; StreamSpecification?: { StreamViewType: KEYS_ONLY | NEW_AND_OLD_IMAGES | NEW_IMAGE | OLD_IMAGE }; TableClass: STANDARD; TableName: string; timeToLiveAttribute?: string }

Input properties.

  • properties.awsAccountId - The AWS account id.
  • properties.awsRegionId - The AWS region id.
  • properties.AttributeDefinitions - Attribute definitions for key schema and index key attributes.
  • properties.billingMode - Billing mode: PAY_PER_REQUEST or PROVISIONED.
  • properties.DeletionProtectionEnabled - Flag to enable delete protection.
  • properties.KeySchema - The primary key schema with one HASH and an optional RANGE key.
  • properties.LocalSecondaryIndexes - Local secondary indexes.
  • properties.GlobalSecondaryIndexes - Global secondary indexes.
  • properties.PointInTimeRecoveryEnabled - Flag to enable point-in-time recovery.
  • properties.StreamSpecification - DynamoDB Streams configuration.
  • properties.TableClass - Type of DynamoDB table.
  • properties.TableName - The DynamoDB table name.
  • properties.timeToLiveAttribute - Applies TTL on a number attribute.

Type declaration

  • AttributeDefinitions: { AttributeName: string; AttributeType: B | N | S }[]
  • awsAccountId: string
  • awsRegionId: string
  • billingMode: { settings: DynamoDBBillingPayPerRequestSchema; type: PAY_PER_REQUEST } | { settings: DynamoDBBillingProvisionedSchema; type: PROVISIONED }
  • DeletionProtectionEnabled: boolean
  • GlobalSecondaryIndexes: DynamoDBSecondaryIndexSchema[]
  • KeySchema: DynamoDBKeySchema[]
  • LocalSecondaryIndexes: DynamoDBSecondaryIndexSchema[]
  • PointInTimeRecoveryEnabled: boolean
  • optionalStreamSpecification?: { StreamViewType: KEYS_ONLY | NEW_AND_OLD_IMAGES | NEW_IMAGE | OLD_IMAGE }
    • StreamViewType: KEYS_ONLY | NEW_AND_OLD_IMAGES | NEW_IMAGE | OLD_IMAGE
  • TableClass: STANDARD
  • TableName: string
  • optionaltimeToLiveAttribute?: string

inheritedresourceId

resourceId: string

The ID of the resource, unique across the infrastructure: its localResourceId, followed by a hash of its scope when it has one.

response

response: { TableArn?: string } = { TableArn: 'arn:aws:dynamodb:us-east-1:000000000000:table/mock-table', }

Saved response.

  • response.TableArn - The table ARN.

Type declaration

  • optionalTableArn?: string

inheritedscope

scope: string[]

The contexts of the models the resource is placed under, derived from where the node creating it sits in the model graph. Octo sets it; a resource created outside a model action has none.

inheritedtags

tags: {}

The tags applied to the resource.


Type declaration

  • [key string]: string