@guardian/cdk
    Preparing search index...

    Interface GuDynamoTableProps

    interface GuDynamoTableProps {
        billingMode?: BillingMode;
        contributorInsightsEnabled?: boolean;
        deletionProtection?: boolean;
        devXBackups: OptIn | OptOut;
        encryption?: TableEncryption;
        encryptionKey?: IKey;
        importSource?: ImportSourceSpecification;
        kinesisPrecisionTimestamp?: ApproximateCreationDateTimePrecision;
        kinesisStream?: IStream;
        maxReadRequestUnits?: number;
        maxWriteRequestUnits?: number;
        partitionKey: Attribute;
        pointInTimeRecovery?: boolean;
        pointInTimeRecoverySpecification?: PointInTimeRecoverySpecification;
        readCapacity?: number;
        removalPolicy?: RemovalPolicy;
        replicaRemovalPolicy?: RemovalPolicy;
        replicationRegions?: string[];
        replicationTimeout?: Duration;
        resourcePolicy?: PolicyDocument;
        sortKey?: Attribute;
        stream?: StreamViewType;
        tableClass?: TableClass;
        tableName?: string;
        timeToLiveAttribute?: string;
        waitForReplicationToFinish?: boolean;
        warmThroughput?: WarmThroughput;
        writeCapacity?: number;
    }

    Hierarchy

    • TableProps
      • GuDynamoTableProps
    Index

    Properties

    billingMode?: BillingMode

    Specify how you are charged for read and write throughput and how you manage capacity.

    PROVISIONED if replicationRegions is not specified, PAY_PER_REQUEST otherwise

    contributorInsightsEnabled?: boolean

    Whether CloudWatch contributor insights is enabled.

    false
    
    deletionProtection?: boolean

    Enables deletion protection for the table.

    false
    
    devXBackups: OptIn | OptOut

    We recommend using DevX Backups to protect your DynamoDB table's backups. For more details on this feature, see the documentation.

    encryption?: TableEncryption

    Whether server-side encryption with an AWS managed customer master key is enabled.

    This property cannot be set if serverSideEncryption is set.

    NOTE: if you set this to CUSTOMER_MANAGED and encryptionKey is not specified, the key that the Tablet generates for you will be created with default permissions. If you are using CDKv2, these permissions will be sufficient to enable the key for use with DynamoDB tables. If you are using CDKv1, make sure the feature flag @aws-cdk/aws-kms:defaultKeyPolicies is set to true in your cdk.json.

    - The table is encrypted with an encryption key managed by DynamoDB, and you are not charged any fee for using it.
    
    encryptionKey?: IKey

    External KMS key to use for table encryption.

    This property can only be set if encryption is set to TableEncryption.CUSTOMER_MANAGED.

    • If encryption is set to TableEncryption.CUSTOMER_MANAGED and this property is undefined, a new KMS key will be created and associated with this table. If encryption and this property are both undefined, then the table is encrypted with an encryption key managed by DynamoDB, and you are not charged any fee for using it.
    importSource?: ImportSourceSpecification

    The properties of data being imported from the S3 bucket source to the table.

    - no data import from the S3 bucket
    
    kinesisPrecisionTimestamp?: ApproximateCreationDateTimePrecision

    Kinesis Data Stream approximate creation timestamp precision

    ApproximateCreationDateTimePrecision.MICROSECOND
    
    kinesisStream?: IStream

    Kinesis Data Stream to capture item-level changes for the table.

    - no Kinesis Data Stream
    
    maxReadRequestUnits?: number

    The maximum read request units for the table. Careful if you add Global Secondary Indexes, as those will share the table's maximum on-demand throughput.

    Can only be provided if billingMode is PAY_PER_REQUEST.

    - on-demand throughput is disabled
    
    maxWriteRequestUnits?: number

    The write request units for the table. Careful if you add Global Secondary Indexes, as those will share the table's maximum on-demand throughput.

    Can only be provided if billingMode is PAY_PER_REQUEST.

    - on-demand throughput is disabled
    
    partitionKey: Attribute

    Partition key attribute definition.

    pointInTimeRecovery?: boolean

    Whether point-in-time recovery is enabled.

    use pointInTimeRecoverySpecification instead

    false - point in time recovery is not enabled.
    
    pointInTimeRecoverySpecification?: PointInTimeRecoverySpecification

    Whether point-in-time recovery is enabled and recoveryPeriodInDays is set.

    - point in time recovery is not enabled.
    
    readCapacity?: number

    The read capacity for the table. Careful if you add Global Secondary Indexes, as those will share the table's provisioned throughput.

    Can only be provided if billingMode is Provisioned.

    5
    
    removalPolicy?: RemovalPolicy

    The removal policy to apply to the DynamoDB Table.

    RemovalPolicy.RETAIN
    
    replicaRemovalPolicy?: RemovalPolicy

    The removal policy to apply to the DynamoDB replica tables.

    undefined - use DynamoDB Table's removal policy
    
    replicationRegions?: string[]

    Regions where replica tables will be created

    - no replica tables are created
    
    replicationTimeout?: Duration

    The timeout for a table replication operation in a single region.

    Duration.minutes(30)
    
    resourcePolicy?: PolicyDocument

    Resource policy to assign to table.

    sortKey?: Attribute

    Sort key attribute definition.

    no sort key
    
    stream?: StreamViewType

    When an item in the table is modified, StreamViewType determines what information is written to the stream for this table.

    • streams are disabled unless replicationRegions is specified
    tableClass?: TableClass

    Specify the table class.

    STANDARD
    
    tableName?: string

    Enforces a particular physical table name.

    <generated>
    
    timeToLiveAttribute?: string

    The name of TTL attribute.

    - TTL is disabled
    
    waitForReplicationToFinish?: boolean

    [WARNING: Use this flag with caution, misusing this flag may cause deleting existing replicas, refer to the detailed documentation for more information] Indicates whether CloudFormation stack waits for replication to finish. If set to false, the CloudFormation resource will mark the resource as created and replication will be completed asynchronously. This property is ignored if replicationRegions property is not set.

    WARNING: DO NOT UNSET this property if adding/removing multiple replicationRegions in one deployment, as CloudFormation only supports one region replication at a time. CDK overcomes this limitation by waiting for replication to finish before starting new replicationRegion.

    If the custom resource which handles replication has a physical resource ID with the format region instead of tablename-region (this would happen if the custom resource hasn't received an event since v1.91.0), DO NOT SET this property to false without making a change to the table name. This will cause the existing replicas to be deleted.

    warmThroughput?: WarmThroughput

    Specify values to pre-warm you DynamoDB Table Warm Throughput feature is not available for Global Table replicas using the Table construct. To enable Warm Throughput, use the TableV2 construct instead.

    writeCapacity?: number

    The write capacity for the table. Careful if you add Global Secondary Indexes, as those will share the table's provisioned throughput.

    Can only be provided if billingMode is Provisioned.

    5