Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions packages/amplify-data-construct/API.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ import { MutationFunctionSlot } from '@aws-amplify/graphql-api-construct';
import { OIDCAuthorizationConfig } from '@aws-amplify/graphql-api-construct';
import { OptimisticConflictResolutionStrategy } from '@aws-amplify/graphql-api-construct';
import { PartialTranslationBehavior } from '@aws-amplify/graphql-api-construct';
import { PointInTimeRecoverySpecification } from '@aws-amplify/graphql-api-construct';
import { ProvisionedConcurrencyConfig } from '@aws-amplify/graphql-api-construct';
import { ProvisionedThroughput } from '@aws-amplify/graphql-api-construct';
import { QueryFunctionSlot } from '@aws-amplify/graphql-api-construct';
Expand Down Expand Up @@ -143,6 +144,8 @@ export { OptimisticConflictResolutionStrategy }

export { PartialTranslationBehavior }

export { PointInTimeRecoverySpecification }

export { ProvisionedConcurrencyConfig }

export { ProvisionedThroughput }
Expand Down
2 changes: 2 additions & 0 deletions packages/amplify-data-construct/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ import {
OIDCAuthorizationConfig,
OptimisticConflictResolutionStrategy,
PartialTranslationBehavior,
PointInTimeRecoverySpecification,
ProvisionedConcurrencyConfig,
ProvisionedThroughput,
QueryFunctionSlot,
Expand Down Expand Up @@ -101,6 +102,7 @@ export {
OIDCAuthorizationConfig,
OptimisticConflictResolutionStrategy,
PartialTranslationBehavior,
PointInTimeRecoverySpecification,
ProvisionedConcurrencyConfig,
ProvisionedThroughput,
QueryFunctionSlot,
Expand Down
112 changes: 89 additions & 23 deletions packages/amplify-graphql-api-construct/.jsii
Original file line number Diff line number Diff line change
Expand Up @@ -4262,7 +4262,7 @@
},
"locationInModule": {
"filename": "src/amplify-dynamodb-table-wrapper.ts",
"line": 107
"line": 124
},
"parameters": [
{
Expand All @@ -4279,7 +4279,7 @@
"kind": "class",
"locationInModule": {
"filename": "src/amplify-dynamodb-table-wrapper.ts",
"line": 93
"line": 110
},
"methods": [
{
Expand All @@ -4290,7 +4290,7 @@
},
"locationInModule": {
"filename": "src/amplify-dynamodb-table-wrapper.ts",
"line": 99
"line": 116
},
"name": "isAmplifyDynamoDbTableResource",
"parameters": [
Expand Down Expand Up @@ -4318,7 +4318,7 @@
},
"locationInModule": {
"filename": "src/amplify-dynamodb-table-wrapper.ts",
"line": 117
"line": 134
},
"name": "applyRemovalPolicy",
"parameters": [
Expand All @@ -4340,7 +4340,7 @@
},
"locationInModule": {
"filename": "src/amplify-dynamodb-table-wrapper.ts",
"line": 154
"line": 179
},
"name": "setGlobalSecondaryIndexProvisionedThroughput",
"parameters": [
Expand Down Expand Up @@ -4374,7 +4374,7 @@
},
"locationInModule": {
"filename": "src/amplify-dynamodb-table-wrapper.ts",
"line": 124
"line": 141
},
"name": "billingMode",
"type": {
Expand All @@ -4388,7 +4388,7 @@
},
"locationInModule": {
"filename": "src/amplify-dynamodb-table-wrapper.ts",
"line": 182
"line": 207
},
"name": "deletionProtectionEnabled",
"type": {
Expand All @@ -4402,21 +4402,35 @@
},
"locationInModule": {
"filename": "src/amplify-dynamodb-table-wrapper.ts",
"line": 138
"line": 155
},
"name": "pointInTimeRecoveryEnabled",
"type": {
"primitive": "boolean"
}
},
{
"docs": {
"stability": "stable",
"summary": "Whether point-in-time recovery is enabled and recoveryPeriodInDays is set."
},
"locationInModule": {
"filename": "src/amplify-dynamodb-table-wrapper.ts",
"line": 163
},
"name": "pointInTimeRecoverySpecification",
"type": {
"fqn": "@aws-amplify/graphql-api-construct.PointInTimeRecoverySpecification"
}
},
{
"docs": {
"stability": "stable",
"summary": "Update the provisioned throughput for the base table."
},
"locationInModule": {
"filename": "src/amplify-dynamodb-table-wrapper.ts",
"line": 145
"line": 170
},
"name": "provisionedThroughput",
"type": {
Expand All @@ -4430,7 +4444,7 @@
},
"locationInModule": {
"filename": "src/amplify-dynamodb-table-wrapper.ts",
"line": 175
"line": 200
},
"name": "sseSpecification",
"type": {
Expand All @@ -4444,7 +4458,7 @@
},
"locationInModule": {
"filename": "src/amplify-dynamodb-table-wrapper.ts",
"line": 168
"line": 193
},
"name": "streamSpecification",
"type": {
Expand All @@ -4458,7 +4472,7 @@
},
"locationInModule": {
"filename": "src/amplify-dynamodb-table-wrapper.ts",
"line": 131
"line": 148
},
"name": "timeToLiveAttribute",
"type": {
Expand Down Expand Up @@ -7851,6 +7865,58 @@
],
"symbolId": "src/types:PartialTranslationBehavior"
},
"@aws-amplify/graphql-api-construct.PointInTimeRecoverySpecification": {
"assembly": "@aws-amplify/graphql-api-construct",
"datatype": true,
"docs": {
"stability": "stable",
"summary": "Reference to PointInTimeRecovey Specification for continuous backups."
},
"fqn": "@aws-amplify/graphql-api-construct.PointInTimeRecoverySpecification",
"kind": "interface",
"locationInModule": {
"filename": "src/amplify-dynamodb-table-wrapper.ts",
"line": 25
},
"name": "PointInTimeRecoverySpecification",
"properties": [
{
"abstract": true,
"docs": {
"stability": "stable",
"summary": "Indicates whether point in time recovery is enabled (true) or disabled (false) on the table."
},
"immutable": true,
"locationInModule": {
"filename": "src/amplify-dynamodb-table-wrapper.ts",
"line": 29
},
"name": "pointInTimeRecoveryEnabled",
"type": {
"primitive": "boolean"
}
},
{
"abstract": true,
"docs": {
"remarks": "Your table data is only recoverable to any point-in-time from within the configured recovery period.\nIf no value is provided, the value will default to 35.",
"stability": "stable",
"summary": "The number of preceding days for which continuous backups are taken and maintained."
},
"immutable": true,
"locationInModule": {
"filename": "src/amplify-dynamodb-table-wrapper.ts",
"line": 35
},
"name": "recoveryPeriodInDays",
"optional": true,
"type": {
"primitive": "number"
}
}
],
"symbolId": "src/amplify-dynamodb-table-wrapper:PointInTimeRecoverySpecification"
},
"@aws-amplify/graphql-api-construct.ProvisionedConcurrencyConfig": {
"assembly": "@aws-amplify/graphql-api-construct",
"datatype": true,
Expand Down Expand Up @@ -7897,7 +7963,7 @@
"kind": "interface",
"locationInModule": {
"filename": "src/amplify-dynamodb-table-wrapper.ts",
"line": 24
"line": 41
},
"name": "ProvisionedThroughput",
"properties": [
Expand All @@ -7910,7 +7976,7 @@
"immutable": true,
"locationInModule": {
"filename": "src/amplify-dynamodb-table-wrapper.ts",
"line": 28
"line": 45
},
"name": "readCapacityUnits",
"type": {
Expand All @@ -7926,7 +7992,7 @@
"immutable": true,
"locationInModule": {
"filename": "src/amplify-dynamodb-table-wrapper.ts",
"line": 33
"line": 50
},
"name": "writeCapacityUnits",
"type": {
Expand Down Expand Up @@ -8380,7 +8446,7 @@
"kind": "interface",
"locationInModule": {
"filename": "src/amplify-dynamodb-table-wrapper.ts",
"line": 47
"line": 64
},
"name": "SSESpecification",
"properties": [
Expand All @@ -8394,7 +8460,7 @@
"immutable": true,
"locationInModule": {
"filename": "src/amplify-dynamodb-table-wrapper.ts",
"line": 53
"line": 70
},
"name": "sseEnabled",
"type": {
Expand All @@ -8411,7 +8477,7 @@
"immutable": true,
"locationInModule": {
"filename": "src/amplify-dynamodb-table-wrapper.ts",
"line": 60
"line": 77
},
"name": "kmsMasterKeyId",
"optional": true,
Expand All @@ -8429,7 +8495,7 @@
"immutable": true,
"locationInModule": {
"filename": "src/amplify-dynamodb-table-wrapper.ts",
"line": 67
"line": 84
},
"name": "sseType",
"optional": true,
Expand All @@ -8451,7 +8517,7 @@
"kind": "enum",
"locationInModule": {
"filename": "src/amplify-dynamodb-table-wrapper.ts",
"line": 40
"line": 57
},
"members": [
{
Expand Down Expand Up @@ -8845,7 +8911,7 @@
"kind": "interface",
"locationInModule": {
"filename": "src/amplify-dynamodb-table-wrapper.ts",
"line": 73
"line": 90
},
"name": "StreamSpecification",
"properties": [
Expand All @@ -8859,7 +8925,7 @@
"immutable": true,
"locationInModule": {
"filename": "src/amplify-dynamodb-table-wrapper.ts",
"line": 82
"line": 99
},
"name": "streamViewType",
"type": {
Expand Down Expand Up @@ -9406,5 +9472,5 @@
}
},
"version": "1.19.1",
"fingerprint": "PPucGaTQ0avUZv4fcPh4qlcwLhqNyOu8BKiIJYPk1KQ="
"fingerprint": "RNnJUxImtZvv+vNsWZSIFhn+AtaWlvFnZIlb75aw0oI="
}
7 changes: 7 additions & 0 deletions packages/amplify-graphql-api-construct/API.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ export class AmplifyDynamoDbTableWrapper {
set deletionProtectionEnabled(deletionProtectionEnabled: boolean);
static isAmplifyDynamoDbTableResource(x: any): x is CfnResource;
set pointInTimeRecoveryEnabled(pointInTimeRecoveryEnabled: boolean);
set pointInTimeRecoverySpecification(pointInTimeRecoverySpecification: PointInTimeRecoverySpecification);
set provisionedThroughput(provisionedThroughput: ProvisionedThroughput);
setGlobalSecondaryIndexProvisionedThroughput(indexName: string, provisionedThroughput: ProvisionedThroughput): void;
set sseSpecification(sseSpecification: SSESpecification);
Expand Down Expand Up @@ -358,6 +359,12 @@ export interface PartialTranslationBehavior {
readonly useSubUsernameForDefaultIdentityClaim?: boolean;
}

// @public
export interface PointInTimeRecoverySpecification {
readonly pointInTimeRecoveryEnabled: boolean;
readonly recoveryPeriodInDays?: number;
}

// @public
export interface ProvisionedConcurrencyConfig {
readonly provisionedConcurrentExecutions: number;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,41 @@ describe('AmplifyDynamoDbTable', () => {
pointInTimeRecoverySpecification: { pointInTimeRecoveryEnabled: false },
});
});

it('round trips a value with direct specification setting', () => {
tableWrapper.pointInTimeRecoverySpecification = {
pointInTimeRecoveryEnabled: true,
};
validateProps({
pointInTimeRecoverySpecification: { pointInTimeRecoveryEnabled: true },
});
});

it('round trips a value with recovery period days', () => {
tableWrapper.pointInTimeRecoverySpecification = {
pointInTimeRecoveryEnabled: true,
recoveryPeriodInDays: 7,
};
validateProps({
pointInTimeRecoverySpecification: {
pointInTimeRecoveryEnabled: true,
recoveryPeriodInDays: 7,
},
});
});

it('round trips a value with recovery period days when disabled', () => {
tableWrapper.pointInTimeRecoverySpecification = {
pointInTimeRecoveryEnabled: false,
recoveryPeriodInDays: 14,
};
validateProps({
pointInTimeRecoverySpecification: {
pointInTimeRecoveryEnabled: false,
recoveryPeriodInDays: 14,
},
});
});
});

describe('provisionedThroughput', () => {
Expand Down
Loading
Loading