From 021d1c350240cba2f1fc005727f4e3d9220f408a Mon Sep 17 00:00:00 2001 From: Lee Hannigan Date: Thu, 14 Nov 2024 09:51:05 +0000 Subject: [PATCH 1/4] feat(dynamodb): add warm-throughput to L2 --- packages/aws-cdk-lib/aws-dynamodb/README.md | 20 +++ .../aws-cdk-lib/aws-dynamodb/TABLE_V1_API.md | 19 +++ .../aws-cdk-lib/aws-dynamodb/lib/shared.ts | 16 ++ .../aws-cdk-lib/aws-dynamodb/lib/table-v2.ts | 19 +++ .../aws-cdk-lib/aws-dynamodb/lib/table.ts | 19 ++- .../aws-dynamodb/test/dynamodb.test.ts | 141 ++++++++++++++++++ .../aws-dynamodb/test/table-v2.test.ts | 66 ++++++++ 7 files changed, 299 insertions(+), 1 deletion(-) diff --git a/packages/aws-cdk-lib/aws-dynamodb/README.md b/packages/aws-cdk-lib/aws-dynamodb/README.md index 41244dec60ea9..e226790d5f6ef 100644 --- a/packages/aws-cdk-lib/aws-dynamodb/README.md +++ b/packages/aws-cdk-lib/aws-dynamodb/README.md @@ -229,6 +229,26 @@ const globalTable = new dynamodb.TableV2(this, 'Table', { Further reading: https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/HowItWorks.ReadWriteCapacityMode.html +## Warm Throughput +Warm throughput refers to the number of read and write operations your DynamoDB table can instantaneously support. + +This optional configuration allows you to pre-warm your table or index to handle anticipated throughput, ensuring optimal performance under expected load. + +The Warm Throughput configuration settings are automatically replicated across all Global Table replicas. + +```ts +const table = new dynamodb.TableV2(this, 'Table', { + partitionKey: { name: 'id', type: dynamodb.AttributeType.STRING }, + warmThroughput: { + readUnitsPerSecond: 15000, + writeUnitsPerSecond: 20000, + }, +}); +``` +Further reading: +https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/warm-throughput.html + + ## Encryption All user data stored in a DynamoDB table is fully encrypted at rest. When creating an instance of the `TableV2` construct, you can select the following table encryption options: diff --git a/packages/aws-cdk-lib/aws-dynamodb/TABLE_V1_API.md b/packages/aws-cdk-lib/aws-dynamodb/TABLE_V1_API.md index 34cf25434d6b2..9d62a170a3676 100644 --- a/packages/aws-cdk-lib/aws-dynamodb/TABLE_V1_API.md +++ b/packages/aws-cdk-lib/aws-dynamodb/TABLE_V1_API.md @@ -60,6 +60,25 @@ const table = new dynamodb.Table(this, 'Table', { Further reading: https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/HowItWorks.ReadWriteCapacityMode. +## Warm Throughput +Warm throughput refers to the number of read and write operations your DynamoDB table can instantaneously support. + +This optional configuration allows you to pre-warm your table or index to handle anticipated throughput, ensuring optimal performance under expected load. + +Note: The Warm Throughput feature is not available for Global Table replicas using `Table` construct; use the `TableV2` construct instead to enable this functionality. + +```ts +const table = new dynamodb.Table(this, 'Table', { + partitionKey: { name: 'id', type: dynamodb.AttributeType.STRING }, + warmThroughput: { + readUnitsPerSecond: 15000, + writeUnitsPerSecond: 20000, + }, +}); +``` +Further reading: +https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/warm-throughput.html + ## Table Class DynamoDB supports two table classes: diff --git a/packages/aws-cdk-lib/aws-dynamodb/lib/shared.ts b/packages/aws-cdk-lib/aws-dynamodb/lib/shared.ts index 1955ef7fccd35..d73540650d99d 100644 --- a/packages/aws-cdk-lib/aws-dynamodb/lib/shared.ts +++ b/packages/aws-cdk-lib/aws-dynamodb/lib/shared.ts @@ -85,6 +85,22 @@ export interface Attribute { readonly type: AttributeType; } +/** + * Reference to WarmThroughput for a DynamoDB table + */ +export interface WarmThroughput { + /** + * Configures the number of read units per second a table will be able to handle instantly + * @default - no readUnitsPerSecond configured + */ + readonly readUnitsPerSecond?: number; + /** + * Configures the number of write units per second a table will be able to handle instantly + * @default - no writeUnitsPerSecond configured + */ + readonly writeUnitsPerSecond?: number; +} + /** * Data types for attributes within a table * diff --git a/packages/aws-cdk-lib/aws-dynamodb/lib/table-v2.ts b/packages/aws-cdk-lib/aws-dynamodb/lib/table-v2.ts index ac79fb6fad792..1dd55b0ba23f6 100644 --- a/packages/aws-cdk-lib/aws-dynamodb/lib/table-v2.ts +++ b/packages/aws-cdk-lib/aws-dynamodb/lib/table-v2.ts @@ -11,6 +11,7 @@ import { SecondaryIndexProps, StreamViewType, TableClass, + WarmThroughput, } from './shared'; import { ITableV2, TableBaseV2 } from './table-v2-base'; import { PolicyDocument } from '../../aws-iam'; @@ -118,6 +119,13 @@ export interface GlobalSecondaryIndexPropsV2 extends SecondaryIndexProps { * @default - inherited from the primary table. */ readonly maxWriteRequestUnits?: number; + + /** + * The warm throughput configuration for the global secondary index. + * + * @default - no warm throughput is configured + */ + readonly warmThroughput?: WarmThroughput; } /** @@ -298,6 +306,13 @@ export interface TablePropsV2 extends TableOptionsV2 { * @default TableEncryptionV2.dynamoOwnedKey() */ readonly encryption?: TableEncryptionV2; + + /** + * The warm throughput configuration for the table. + * + * @default - no warm throughput is configured + */ + readonly warmThroughput?: WarmThroughput; } /** @@ -576,6 +591,7 @@ export class TableV2 extends TableBaseV2 { timeToLiveSpecification: props.timeToLiveAttribute ? { attributeName: props.timeToLiveAttribute, enabled: true } : undefined, + warmThroughput: props.warmThroughput ?? undefined, }); resource.applyRemovalPolicy(props.removalPolicy); @@ -741,6 +757,8 @@ export class TableV2 extends TableBaseV2 { props.maxReadRequestUnits && this.globalSecondaryIndexMaxReadUnits.set(props.indexName, props.maxReadRequestUnits); + const warmThroughput = props.warmThroughput ?? undefined; + const writeOnDemandThroughputSettings: CfnGlobalTable.WriteOnDemandThroughputSettingsProperty | undefined = props.maxWriteRequestUnits ? { maxWriteRequestUnits: props.maxWriteRequestUnits } : undefined; @@ -751,6 +769,7 @@ export class TableV2 extends TableBaseV2 { projection, writeProvisionedThroughputSettings, writeOnDemandThroughputSettings, + warmThroughput, }; } diff --git a/packages/aws-cdk-lib/aws-dynamodb/lib/table.ts b/packages/aws-cdk-lib/aws-dynamodb/lib/table.ts index 0b381a5f90dcb..a020bf33b0011 100644 --- a/packages/aws-cdk-lib/aws-dynamodb/lib/table.ts +++ b/packages/aws-cdk-lib/aws-dynamodb/lib/table.ts @@ -8,7 +8,7 @@ import { ScalableTableAttribute } from './scalable-table-attribute'; import { Operation, OperationsMetricOptions, SystemErrorsForOperationsMetricOptions, Attribute, BillingMode, ProjectionType, ITable, SecondaryIndexProps, TableClass, - LocalSecondaryIndexProps, TableEncryption, StreamViewType, + LocalSecondaryIndexProps, TableEncryption, StreamViewType, WarmThroughput, } from './shared'; import * as appscaling from '../../aws-applicationautoscaling'; import * as cloudwatch from '../../aws-cloudwatch'; @@ -259,6 +259,14 @@ export interface TableOptions extends SchemaOptions { */ readonly billingMode?: BillingMode; + /** + * 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. + * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-dynamodb-table.html#cfn-dynamodb-table-warmthroughput + * @default - warm throughput is not configured + */ + readonly warmThroughput?: WarmThroughput; + /** * Whether point-in-time recovery is enabled. * @default - point-in-time recovery is disabled @@ -457,6 +465,13 @@ export interface GlobalSecondaryIndexProps extends SecondaryIndexProps, SchemaOp */ readonly maxWriteRequestUnits?: number; + /** + * The warm throughput configuration for the global secondary index. + * + * @default - no warm throughput is configured + */ + readonly warmThroughput?: WarmThroughput; + /** * Whether CloudWatch contributor insights is enabled for the specified global secondary index. * @@ -1187,6 +1202,7 @@ export class Table extends TableBase { resourcePolicy: props.resourcePolicy ? { policyDocument: props.resourcePolicy } : undefined, + warmThroughput: props.warmThroughput?? undefined, }); this.table.applyRemovalPolicy(props.removalPolicy); @@ -1249,6 +1265,7 @@ export class Table extends TableBase { maxWriteRequestUnits: props.maxWriteRequestUnits || undefined, }, } : undefined), + warmThroughput: props.warmThroughput ?? undefined, }); this.secondaryIndexSchemas.set(props.indexName, { diff --git a/packages/aws-cdk-lib/aws-dynamodb/test/dynamodb.test.ts b/packages/aws-cdk-lib/aws-dynamodb/test/dynamodb.test.ts index 420d8ce7a8290..9456251d4e47e 100644 --- a/packages/aws-cdk-lib/aws-dynamodb/test/dynamodb.test.ts +++ b/packages/aws-cdk-lib/aws-dynamodb/test/dynamodb.test.ts @@ -3642,3 +3642,144 @@ test('Resource policy test', () => { }, }); }); + +test('Warm Throughput test on-demand', () => { + // GIVEN + const app = new App(); + const stack = new Stack(app, 'Stack'); + + // WHEN + const table = new Table(stack, 'Table', { + partitionKey: { name: 'id', type: AttributeType.STRING }, + warmThroughput: { + readUnitsPerSecond: 13000, + writeUnitsPerSecond: 5000, + }, + }); + + table.addGlobalSecondaryIndex({ + indexName: 'my-index-1', + partitionKey: { name: 'gsi1pk', type: AttributeType.STRING }, + warmThroughput: { + readUnitsPerSecond: 15000, + writeUnitsPerSecond: 6000, + }, + }); + + table.addGlobalSecondaryIndex({ + indexName: 'my-index-2', + partitionKey: { name: 'gsi2pk', type: AttributeType.STRING }, + }); + + // THEN + Template.fromStack(stack).hasResourceProperties('AWS::DynamoDB::Table', { + KeySchema: [ + { AttributeName: 'id', KeyType: 'HASH' }, + ], + AttributeDefinitions: [ + { AttributeName: 'id', AttributeType: 'S' }, + { AttributeName: 'gsi1pk', AttributeType: 'S' }, + { AttributeName: 'gsi2pk', AttributeType: 'S' }, + ], + WarmThroughput: { + ReadUnitsPerSecond: 13000, + WriteUnitsPerSecond: 5000, + }, + GlobalSecondaryIndexes: [ + { + IndexName: 'my-index-1', + KeySchema: [ + { AttributeName: 'gsi1pk', KeyType: 'HASH' }, + ], + Projection: { ProjectionType: 'ALL' }, + WarmThroughput: { + ReadUnitsPerSecond: 15000, + WriteUnitsPerSecond: 6000, + }, + }, + { + IndexName: 'my-index-2', + KeySchema: [ + { AttributeName: 'gsi2pk', KeyType: 'HASH' }, + ], + Projection: { ProjectionType: 'ALL' }, + }, + ], + }); + +}); + +test('Warm Throughput test provisioned', () => { + // GIVEN + const app = new App(); + const stack = new Stack(app, 'Stack'); + + // WHEN + const table = new Table(stack, 'Table', { + partitionKey: { name: 'id', type: AttributeType.STRING }, + readCapacity: 5, + writeCapacity: 6, + warmThroughput: { + readUnitsPerSecond: 2000, + writeUnitsPerSecond: 1000, + }, + }); + + table.addGlobalSecondaryIndex({ + indexName: 'my-index-1', + partitionKey: { name: 'gsi1pk', type: AttributeType.STRING }, + readCapacity: 7, + writeCapacity: 8, + warmThroughput: { + readUnitsPerSecond: 3000, + writeUnitsPerSecond: 4000, + }, + }); + + table.addGlobalSecondaryIndex({ + indexName: 'my-index-2', + partitionKey: { name: 'gsi2pk', type: AttributeType.STRING }, + readCapacity: 9, + writeCapacity: 10, + }); + + // THEN + Template.fromStack(stack).hasResourceProperties('AWS::DynamoDB::Table', { + KeySchema: [ + { AttributeName: 'id', KeyType: 'HASH' }, + ], + AttributeDefinitions: [ + { AttributeName: 'id', AttributeType: 'S' }, + { AttributeName: 'gsi1pk', AttributeType: 'S' }, + { AttributeName: 'gsi2pk', AttributeType: 'S' }, + ], + WarmThroughput: { + ReadUnitsPerSecond: 2000, + WriteUnitsPerSecond: 1000, + }, + ProvisionedThroughput: { ReadCapacityUnits: 5, WriteCapacityUnits: 6 }, + GlobalSecondaryIndexes: [ + { + IndexName: 'my-index-1', + KeySchema: [ + { AttributeName: 'gsi1pk', KeyType: 'HASH' }, + ], + Projection: { ProjectionType: 'ALL' }, + WarmThroughput: { + ReadUnitsPerSecond: 3000, + WriteUnitsPerSecond: 4000, + }, + ProvisionedThroughput: { ReadCapacityUnits: 7, WriteCapacityUnits: 8 }, + }, + { + IndexName: 'my-index-2', + KeySchema: [ + { AttributeName: 'gsi2pk', KeyType: 'HASH' }, + ], + Projection: { ProjectionType: 'ALL' }, + ProvisionedThroughput: { ReadCapacityUnits: 9, WriteCapacityUnits: 10 }, + }, + ], + }); + +}); \ No newline at end of file diff --git a/packages/aws-cdk-lib/aws-dynamodb/test/table-v2.test.ts b/packages/aws-cdk-lib/aws-dynamodb/test/table-v2.test.ts index a4c9c66808ff2..c60601a5a13b8 100644 --- a/packages/aws-cdk-lib/aws-dynamodb/test/table-v2.test.ts +++ b/packages/aws-cdk-lib/aws-dynamodb/test/table-v2.test.ts @@ -3109,3 +3109,69 @@ test('Resource policy test', () => { ], }); }); + +test('Warm Throughput test on-demand', () => { + // GIVEN + const stack = new Stack(undefined, 'Stack', { env: { region: 'eu-west-1' } }); + + // WHEN + const table = new TableV2(stack, 'Table', { + partitionKey: { name: 'id', type: AttributeType.STRING }, + warmThroughput: { + readUnitsPerSecond: 13000, + writeUnitsPerSecond: 5000, + }, + replicas: [{ + region: 'us-west-2', + }], + globalSecondaryIndexes: [{ + indexName: 'my-index-1', + partitionKey: { name: 'gsi1pk', type: AttributeType.STRING }, + warmThroughput: { + readUnitsPerSecond: 15000, + writeUnitsPerSecond: 6000, + }, + }, + { + indexName: 'my-index-2', + partitionKey: { name: 'gsi2pk', type: AttributeType.STRING }, + }], + }); + + // THEN + Template.fromStack(stack).hasResourceProperties('AWS::DynamoDB::GlobalTable', { + KeySchema: [ + { AttributeName: 'id', KeyType: 'HASH' }, + ], + AttributeDefinitions: [ + { AttributeName: 'id', AttributeType: 'S' }, + { AttributeName: 'gsi1pk', AttributeType: 'S' }, + { AttributeName: 'gsi2pk', AttributeType: 'S' }, + ], + WarmThroughput: { + ReadUnitsPerSecond: 13000, + WriteUnitsPerSecond: 5000, + }, + GlobalSecondaryIndexes: [ + { + IndexName: 'my-index-1', + KeySchema: [ + { AttributeName: 'gsi1pk', KeyType: 'HASH' }, + ], + Projection: { ProjectionType: 'ALL' }, + WarmThroughput: { + ReadUnitsPerSecond: 15000, + WriteUnitsPerSecond: 6000, + }, + }, + { + IndexName: 'my-index-2', + KeySchema: [ + { AttributeName: 'gsi2pk', KeyType: 'HASH' }, + ], + Projection: { ProjectionType: 'ALL' }, + }, + ], + }); + +}); \ No newline at end of file From 0947e10f48fe0eef5dcd2a57a7a47522bbf1bdd6 Mon Sep 17 00:00:00 2001 From: Lee Hannigan Date: Thu, 14 Nov 2024 09:59:45 +0000 Subject: [PATCH 2/4] adding integ tests and ss --- .../cdk.out | 1 + .../integ.json | 12 + .../manifest.json | 115 ++++ .../tree.json | 202 ++++++ .../warm-throughput-stack-v2.assets.json | 20 + .../warm-throughput-stack-v2.template.json | 123 ++++ ...efaultTestDeployAssertA2FD11C0.assets.json | 19 + ...aultTestDeployAssertA2FD11C0.template.json | 36 + .../test/integ.dynamodb-v2.warm-throughput.ts | 50 ++ .../cdk.out | 1 + .../integ.json | 12 + .../manifest.json | 115 ++++ .../tree.json | 178 +++++ .../warm-throughput-stack.assets.json | 19 + .../warm-throughput-stack.template.json | 91 +++ ...efaultTestDeployAssertA9A62BB4.assets.json | 19 + ...aultTestDeployAssertA9A62BB4.template.json | 36 + .../test/integ.dynamodb.warm-throughput.ts | 42 ++ .../cfn-response.js | 10 +- .../consts.js | 0 .../framework.js | 0 .../outbound.js | 0 .../util.js | 54 ++ .../util.js | 53 -- ...db-global-replicas-provisioned.assets.json | 14 +- ...-global-replicas-provisioned.template.json | 2 +- ...plicaProviderEA32CB30.nested.template.json | 6 +- .../manifest.json | 2 +- .../tree.json | 8 +- .../cfn-response.js | 10 +- .../consts.js | 0 .../framework.js | 0 .../outbound.js | 0 .../util.js | 54 ++ .../util.js | 53 -- .../cdk-dynamodb-global-20191121.assets.json | 14 +- ...cdk-dynamodb-global-20191121.template.json | 2 +- ...plicaProviderB281C954.nested.template.json | 6 +- .../integ.global.js.snapshot/manifest.json | 2 +- .../test/integ.global.js.snapshot/tree.json | 8 +- .../us-east-1/aws-dynamodb-globaltable.json | 643 ++++++++++++++++++ .../us-east-1/aws-dynamodb-table.json | 588 ++++++++++++++++ 42 files changed, 2472 insertions(+), 148 deletions(-) create mode 100644 packages/@aws-cdk-testing/framework-integ/test/aws-dynamodb/test/integ.dynamodb-v2.warm-throughput.js.snapshot/cdk.out create mode 100644 packages/@aws-cdk-testing/framework-integ/test/aws-dynamodb/test/integ.dynamodb-v2.warm-throughput.js.snapshot/integ.json create mode 100644 packages/@aws-cdk-testing/framework-integ/test/aws-dynamodb/test/integ.dynamodb-v2.warm-throughput.js.snapshot/manifest.json create mode 100644 packages/@aws-cdk-testing/framework-integ/test/aws-dynamodb/test/integ.dynamodb-v2.warm-throughput.js.snapshot/tree.json create mode 100644 packages/@aws-cdk-testing/framework-integ/test/aws-dynamodb/test/integ.dynamodb-v2.warm-throughput.js.snapshot/warm-throughput-stack-v2.assets.json create mode 100644 packages/@aws-cdk-testing/framework-integ/test/aws-dynamodb/test/integ.dynamodb-v2.warm-throughput.js.snapshot/warm-throughput-stack-v2.template.json create mode 100644 packages/@aws-cdk-testing/framework-integ/test/aws-dynamodb/test/integ.dynamodb-v2.warm-throughput.js.snapshot/warmthroughputintegtestv2DefaultTestDeployAssertA2FD11C0.assets.json create mode 100644 packages/@aws-cdk-testing/framework-integ/test/aws-dynamodb/test/integ.dynamodb-v2.warm-throughput.js.snapshot/warmthroughputintegtestv2DefaultTestDeployAssertA2FD11C0.template.json create mode 100644 packages/@aws-cdk-testing/framework-integ/test/aws-dynamodb/test/integ.dynamodb-v2.warm-throughput.ts create mode 100644 packages/@aws-cdk-testing/framework-integ/test/aws-dynamodb/test/integ.dynamodb.warm-throughput.js.snapshot/cdk.out create mode 100644 packages/@aws-cdk-testing/framework-integ/test/aws-dynamodb/test/integ.dynamodb.warm-throughput.js.snapshot/integ.json create mode 100644 packages/@aws-cdk-testing/framework-integ/test/aws-dynamodb/test/integ.dynamodb.warm-throughput.js.snapshot/manifest.json create mode 100644 packages/@aws-cdk-testing/framework-integ/test/aws-dynamodb/test/integ.dynamodb.warm-throughput.js.snapshot/tree.json create mode 100644 packages/@aws-cdk-testing/framework-integ/test/aws-dynamodb/test/integ.dynamodb.warm-throughput.js.snapshot/warm-throughput-stack.assets.json create mode 100644 packages/@aws-cdk-testing/framework-integ/test/aws-dynamodb/test/integ.dynamodb.warm-throughput.js.snapshot/warm-throughput-stack.template.json create mode 100644 packages/@aws-cdk-testing/framework-integ/test/aws-dynamodb/test/integ.dynamodb.warm-throughput.js.snapshot/warmthroughputintegtestDefaultTestDeployAssertA9A62BB4.assets.json create mode 100644 packages/@aws-cdk-testing/framework-integ/test/aws-dynamodb/test/integ.dynamodb.warm-throughput.js.snapshot/warmthroughputintegtestDefaultTestDeployAssertA9A62BB4.template.json create mode 100644 packages/@aws-cdk-testing/framework-integ/test/aws-dynamodb/test/integ.dynamodb.warm-throughput.ts rename packages/@aws-cdk-testing/framework-integ/test/aws-dynamodb/test/integ.global-replicas-provisioned.js.snapshot/{asset.fe4094cd52f099e46f858f05efdde02f5de79288c9c783676b3fa53a494d04b5 => asset.d320874294f5d626406d5f86087c2a2c8e6efc0aab690c5105572555dc445fd4}/cfn-response.js (73%) rename packages/@aws-cdk-testing/framework-integ/test/aws-dynamodb/test/integ.global-replicas-provisioned.js.snapshot/{asset.fe4094cd52f099e46f858f05efdde02f5de79288c9c783676b3fa53a494d04b5 => asset.d320874294f5d626406d5f86087c2a2c8e6efc0aab690c5105572555dc445fd4}/consts.js (100%) rename packages/@aws-cdk-testing/framework-integ/test/aws-dynamodb/test/integ.global-replicas-provisioned.js.snapshot/{asset.fe4094cd52f099e46f858f05efdde02f5de79288c9c783676b3fa53a494d04b5 => asset.d320874294f5d626406d5f86087c2a2c8e6efc0aab690c5105572555dc445fd4}/framework.js (100%) rename packages/@aws-cdk-testing/framework-integ/test/aws-dynamodb/test/integ.global-replicas-provisioned.js.snapshot/{asset.fe4094cd52f099e46f858f05efdde02f5de79288c9c783676b3fa53a494d04b5 => asset.d320874294f5d626406d5f86087c2a2c8e6efc0aab690c5105572555dc445fd4}/outbound.js (100%) create mode 100644 packages/@aws-cdk-testing/framework-integ/test/aws-dynamodb/test/integ.global-replicas-provisioned.js.snapshot/asset.d320874294f5d626406d5f86087c2a2c8e6efc0aab690c5105572555dc445fd4/util.js delete mode 100644 packages/@aws-cdk-testing/framework-integ/test/aws-dynamodb/test/integ.global-replicas-provisioned.js.snapshot/asset.fe4094cd52f099e46f858f05efdde02f5de79288c9c783676b3fa53a494d04b5/util.js rename packages/@aws-cdk-testing/framework-integ/test/aws-dynamodb/test/integ.global.js.snapshot/{asset.fe4094cd52f099e46f858f05efdde02f5de79288c9c783676b3fa53a494d04b5 => asset.d320874294f5d626406d5f86087c2a2c8e6efc0aab690c5105572555dc445fd4}/cfn-response.js (73%) rename packages/@aws-cdk-testing/framework-integ/test/aws-dynamodb/test/integ.global.js.snapshot/{asset.fe4094cd52f099e46f858f05efdde02f5de79288c9c783676b3fa53a494d04b5 => asset.d320874294f5d626406d5f86087c2a2c8e6efc0aab690c5105572555dc445fd4}/consts.js (100%) rename packages/@aws-cdk-testing/framework-integ/test/aws-dynamodb/test/integ.global.js.snapshot/{asset.fe4094cd52f099e46f858f05efdde02f5de79288c9c783676b3fa53a494d04b5 => asset.d320874294f5d626406d5f86087c2a2c8e6efc0aab690c5105572555dc445fd4}/framework.js (100%) rename packages/@aws-cdk-testing/framework-integ/test/aws-dynamodb/test/integ.global.js.snapshot/{asset.fe4094cd52f099e46f858f05efdde02f5de79288c9c783676b3fa53a494d04b5 => asset.d320874294f5d626406d5f86087c2a2c8e6efc0aab690c5105572555dc445fd4}/outbound.js (100%) create mode 100644 packages/@aws-cdk-testing/framework-integ/test/aws-dynamodb/test/integ.global.js.snapshot/asset.d320874294f5d626406d5f86087c2a2c8e6efc0aab690c5105572555dc445fd4/util.js delete mode 100644 packages/@aws-cdk-testing/framework-integ/test/aws-dynamodb/test/integ.global.js.snapshot/asset.fe4094cd52f099e46f858f05efdde02f5de79288c9c783676b3fa53a494d04b5/util.js create mode 100644 tools/@aws-cdk/spec2cdk/temporary-schemas/us-east-1/aws-dynamodb-globaltable.json create mode 100644 tools/@aws-cdk/spec2cdk/temporary-schemas/us-east-1/aws-dynamodb-table.json diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-dynamodb/test/integ.dynamodb-v2.warm-throughput.js.snapshot/cdk.out b/packages/@aws-cdk-testing/framework-integ/test/aws-dynamodb/test/integ.dynamodb-v2.warm-throughput.js.snapshot/cdk.out new file mode 100644 index 0000000000000..c6e612584e352 --- /dev/null +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-dynamodb/test/integ.dynamodb-v2.warm-throughput.js.snapshot/cdk.out @@ -0,0 +1 @@ +{"version":"38.0.1"} \ No newline at end of file diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-dynamodb/test/integ.dynamodb-v2.warm-throughput.js.snapshot/integ.json b/packages/@aws-cdk-testing/framework-integ/test/aws-dynamodb/test/integ.dynamodb-v2.warm-throughput.js.snapshot/integ.json new file mode 100644 index 0000000000000..1f417fdea8e00 --- /dev/null +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-dynamodb/test/integ.dynamodb-v2.warm-throughput.js.snapshot/integ.json @@ -0,0 +1,12 @@ +{ + "version": "38.0.1", + "testCases": { + "warm-throughput-integ-test-v2/DefaultTest": { + "stacks": [ + "warm-throughput-stack-v2" + ], + "assertionStack": "warm-throughput-integ-test-v2/DefaultTest/DeployAssert", + "assertionStackName": "warmthroughputintegtestv2DefaultTestDeployAssertA2FD11C0" + } + } +} \ No newline at end of file diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-dynamodb/test/integ.dynamodb-v2.warm-throughput.js.snapshot/manifest.json b/packages/@aws-cdk-testing/framework-integ/test/aws-dynamodb/test/integ.dynamodb-v2.warm-throughput.js.snapshot/manifest.json new file mode 100644 index 0000000000000..3ead8007dcbde --- /dev/null +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-dynamodb/test/integ.dynamodb-v2.warm-throughput.js.snapshot/manifest.json @@ -0,0 +1,115 @@ +{ + "version": "38.0.1", + "artifacts": { + "warm-throughput-stack-v2.assets": { + "type": "cdk:asset-manifest", + "properties": { + "file": "warm-throughput-stack-v2.assets.json", + "requiresBootstrapStackVersion": 6, + "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version" + } + }, + "warm-throughput-stack-v2": { + "type": "aws:cloudformation:stack", + "environment": "aws://unknown-account/eu-west-1", + "properties": { + "templateFile": "warm-throughput-stack-v2.template.json", + "terminationProtection": false, + "validateOnSynth": false, + "notificationArns": [], + "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-deploy-role-${AWS::AccountId}-eu-west-1", + "cloudFormationExecutionRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-cfn-exec-role-${AWS::AccountId}-eu-west-1", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-eu-west-1/e8d4da32962e661c67793742bfac886e53ea102f30d7fc024b5496d04e6fdb4a.json", + "requiresBootstrapStackVersion": 6, + "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", + "additionalDependencies": [ + "warm-throughput-stack-v2.assets" + ], + "lookupRole": { + "arn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-lookup-role-${AWS::AccountId}-eu-west-1", + "requiresBootstrapStackVersion": 8, + "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version" + } + }, + "dependencies": [ + "warm-throughput-stack-v2.assets" + ], + "metadata": { + "/warm-throughput-stack-v2/TableTest1/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "TableTest143E55AA2" + } + ], + "/warm-throughput-stack-v2/BootstrapVersion": [ + { + "type": "aws:cdk:logicalId", + "data": "BootstrapVersion" + } + ], + "/warm-throughput-stack-v2/CheckBootstrapVersion": [ + { + "type": "aws:cdk:logicalId", + "data": "CheckBootstrapVersion" + } + ] + }, + "displayName": "warm-throughput-stack-v2" + }, + "warmthroughputintegtestv2DefaultTestDeployAssertA2FD11C0.assets": { + "type": "cdk:asset-manifest", + "properties": { + "file": "warmthroughputintegtestv2DefaultTestDeployAssertA2FD11C0.assets.json", + "requiresBootstrapStackVersion": 6, + "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version" + } + }, + "warmthroughputintegtestv2DefaultTestDeployAssertA2FD11C0": { + "type": "aws:cloudformation:stack", + "environment": "aws://unknown-account/unknown-region", + "properties": { + "templateFile": "warmthroughputintegtestv2DefaultTestDeployAssertA2FD11C0.template.json", + "terminationProtection": false, + "validateOnSynth": false, + "notificationArns": [], + "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-deploy-role-${AWS::AccountId}-${AWS::Region}", + "cloudFormationExecutionRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-cfn-exec-role-${AWS::AccountId}-${AWS::Region}", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/21fbb51d7b23f6a6c262b46a9caee79d744a3ac019fd45422d988b96d44b2a22.json", + "requiresBootstrapStackVersion": 6, + "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", + "additionalDependencies": [ + "warmthroughputintegtestv2DefaultTestDeployAssertA2FD11C0.assets" + ], + "lookupRole": { + "arn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-lookup-role-${AWS::AccountId}-${AWS::Region}", + "requiresBootstrapStackVersion": 8, + "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version" + } + }, + "dependencies": [ + "warmthroughputintegtestv2DefaultTestDeployAssertA2FD11C0.assets" + ], + "metadata": { + "/warm-throughput-integ-test-v2/DefaultTest/DeployAssert/BootstrapVersion": [ + { + "type": "aws:cdk:logicalId", + "data": "BootstrapVersion" + } + ], + "/warm-throughput-integ-test-v2/DefaultTest/DeployAssert/CheckBootstrapVersion": [ + { + "type": "aws:cdk:logicalId", + "data": "CheckBootstrapVersion" + } + ] + }, + "displayName": "warm-throughput-integ-test-v2/DefaultTest/DeployAssert" + }, + "Tree": { + "type": "cdk:tree", + "properties": { + "file": "tree.json" + } + } + } +} \ No newline at end of file diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-dynamodb/test/integ.dynamodb-v2.warm-throughput.js.snapshot/tree.json b/packages/@aws-cdk-testing/framework-integ/test/aws-dynamodb/test/integ.dynamodb-v2.warm-throughput.js.snapshot/tree.json new file mode 100644 index 0000000000000..880de92521501 --- /dev/null +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-dynamodb/test/integ.dynamodb-v2.warm-throughput.js.snapshot/tree.json @@ -0,0 +1,202 @@ +{ + "version": "tree-0.1", + "tree": { + "id": "App", + "path": "", + "children": { + "warm-throughput-stack-v2": { + "id": "warm-throughput-stack-v2", + "path": "warm-throughput-stack-v2", + "children": { + "TableTest1": { + "id": "TableTest1", + "path": "warm-throughput-stack-v2/TableTest1", + "children": { + "Resource": { + "id": "Resource", + "path": "warm-throughput-stack-v2/TableTest1/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::DynamoDB::GlobalTable", + "aws:cdk:cloudformation:props": { + "attributeDefinitions": [ + { + "attributeName": "id", + "attributeType": "S" + }, + { + "attributeName": "gsi1pk", + "attributeType": "S" + } + ], + "billingMode": "PAY_PER_REQUEST", + "globalSecondaryIndexes": [ + { + "indexName": "my-index-1", + "keySchema": [ + { + "attributeName": "gsi1pk", + "keyType": "HASH" + } + ], + "projection": { + "projectionType": "ALL" + }, + "warmThroughput": { + "readUnitsPerSecond": 15000, + "writeUnitsPerSecond": 6000 + } + }, + { + "indexName": "my-index-2", + "keySchema": [ + { + "attributeName": "gsi1pk", + "keyType": "HASH" + } + ], + "projection": { + "projectionType": "ALL" + } + } + ], + "keySchema": [ + { + "attributeName": "id", + "keyType": "HASH" + } + ], + "replicas": [ + { + "region": "us-west-2", + "globalSecondaryIndexes": [ + { + "indexName": "my-index-1" + }, + { + "indexName": "my-index-2" + } + ] + }, + { + "region": "eu-west-1", + "globalSecondaryIndexes": [ + { + "indexName": "my-index-1" + }, + { + "indexName": "my-index-2" + } + ] + } + ], + "streamSpecification": { + "streamViewType": "NEW_AND_OLD_IMAGES" + }, + "warmThroughput": { + "readUnitsPerSecond": 14000, + "writeUnitsPerSecond": 5000 + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_dynamodb.CfnGlobalTable", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_dynamodb.TableBaseV2", + "version": "0.0.0" + } + }, + "BootstrapVersion": { + "id": "BootstrapVersion", + "path": "warm-throughput-stack-v2/BootstrapVersion", + "constructInfo": { + "fqn": "aws-cdk-lib.CfnParameter", + "version": "0.0.0" + } + }, + "CheckBootstrapVersion": { + "id": "CheckBootstrapVersion", + "path": "warm-throughput-stack-v2/CheckBootstrapVersion", + "constructInfo": { + "fqn": "aws-cdk-lib.CfnRule", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.Stack", + "version": "0.0.0" + } + }, + "warm-throughput-integ-test-v2": { + "id": "warm-throughput-integ-test-v2", + "path": "warm-throughput-integ-test-v2", + "children": { + "DefaultTest": { + "id": "DefaultTest", + "path": "warm-throughput-integ-test-v2/DefaultTest", + "children": { + "Default": { + "id": "Default", + "path": "warm-throughput-integ-test-v2/DefaultTest/Default", + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.4.2" + } + }, + "DeployAssert": { + "id": "DeployAssert", + "path": "warm-throughput-integ-test-v2/DefaultTest/DeployAssert", + "children": { + "BootstrapVersion": { + "id": "BootstrapVersion", + "path": "warm-throughput-integ-test-v2/DefaultTest/DeployAssert/BootstrapVersion", + "constructInfo": { + "fqn": "aws-cdk-lib.CfnParameter", + "version": "0.0.0" + } + }, + "CheckBootstrapVersion": { + "id": "CheckBootstrapVersion", + "path": "warm-throughput-integ-test-v2/DefaultTest/DeployAssert/CheckBootstrapVersion", + "constructInfo": { + "fqn": "aws-cdk-lib.CfnRule", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.Stack", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/integ-tests-alpha.IntegTestCase", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/integ-tests-alpha.IntegTest", + "version": "0.0.0" + } + }, + "Tree": { + "id": "Tree", + "path": "Tree", + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.4.2" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.App", + "version": "0.0.0" + } + } +} \ No newline at end of file diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-dynamodb/test/integ.dynamodb-v2.warm-throughput.js.snapshot/warm-throughput-stack-v2.assets.json b/packages/@aws-cdk-testing/framework-integ/test/aws-dynamodb/test/integ.dynamodb-v2.warm-throughput.js.snapshot/warm-throughput-stack-v2.assets.json new file mode 100644 index 0000000000000..4070991ce6d09 --- /dev/null +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-dynamodb/test/integ.dynamodb-v2.warm-throughput.js.snapshot/warm-throughput-stack-v2.assets.json @@ -0,0 +1,20 @@ +{ + "version": "38.0.1", + "files": { + "e8d4da32962e661c67793742bfac886e53ea102f30d7fc024b5496d04e6fdb4a": { + "source": { + "path": "warm-throughput-stack-v2.template.json", + "packaging": "file" + }, + "destinations": { + "current_account-eu-west-1": { + "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-eu-west-1", + "objectKey": "e8d4da32962e661c67793742bfac886e53ea102f30d7fc024b5496d04e6fdb4a.json", + "region": "eu-west-1", + "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-eu-west-1" + } + } + } + }, + "dockerImages": {} +} \ No newline at end of file diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-dynamodb/test/integ.dynamodb-v2.warm-throughput.js.snapshot/warm-throughput-stack-v2.template.json b/packages/@aws-cdk-testing/framework-integ/test/aws-dynamodb/test/integ.dynamodb-v2.warm-throughput.js.snapshot/warm-throughput-stack-v2.template.json new file mode 100644 index 0000000000000..69850a26b531d --- /dev/null +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-dynamodb/test/integ.dynamodb-v2.warm-throughput.js.snapshot/warm-throughput-stack-v2.template.json @@ -0,0 +1,123 @@ +{ + "Resources": { + "TableTest143E55AA2": { + "Type": "AWS::DynamoDB::GlobalTable", + "Properties": { + "AttributeDefinitions": [ + { + "AttributeName": "id", + "AttributeType": "S" + }, + { + "AttributeName": "gsi1pk", + "AttributeType": "S" + } + ], + "BillingMode": "PAY_PER_REQUEST", + "GlobalSecondaryIndexes": [ + { + "IndexName": "my-index-1", + "KeySchema": [ + { + "AttributeName": "gsi1pk", + "KeyType": "HASH" + } + ], + "Projection": { + "ProjectionType": "ALL" + }, + "WarmThroughput": { + "ReadUnitsPerSecond": 15000, + "WriteUnitsPerSecond": 6000 + } + }, + { + "IndexName": "my-index-2", + "KeySchema": [ + { + "AttributeName": "gsi1pk", + "KeyType": "HASH" + } + ], + "Projection": { + "ProjectionType": "ALL" + } + } + ], + "KeySchema": [ + { + "AttributeName": "id", + "KeyType": "HASH" + } + ], + "Replicas": [ + { + "GlobalSecondaryIndexes": [ + { + "IndexName": "my-index-1" + }, + { + "IndexName": "my-index-2" + } + ], + "Region": "us-west-2" + }, + { + "GlobalSecondaryIndexes": [ + { + "IndexName": "my-index-1" + }, + { + "IndexName": "my-index-2" + } + ], + "Region": "eu-west-1" + } + ], + "StreamSpecification": { + "StreamViewType": "NEW_AND_OLD_IMAGES" + }, + "WarmThroughput": { + "ReadUnitsPerSecond": 14000, + "WriteUnitsPerSecond": 5000 + } + }, + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete" + } + }, + "Parameters": { + "BootstrapVersion": { + "Type": "AWS::SSM::Parameter::Value", + "Default": "/cdk-bootstrap/hnb659fds/version", + "Description": "Version of the CDK Bootstrap resources in this environment, automatically retrieved from SSM Parameter Store. [cdk:skip]" + } + }, + "Rules": { + "CheckBootstrapVersion": { + "Assertions": [ + { + "Assert": { + "Fn::Not": [ + { + "Fn::Contains": [ + [ + "1", + "2", + "3", + "4", + "5" + ], + { + "Ref": "BootstrapVersion" + } + ] + } + ] + }, + "AssertDescription": "CDK bootstrap stack version 6 required. Please run 'cdk bootstrap' with a recent version of the CDK CLI." + } + ] + } + } +} \ No newline at end of file diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-dynamodb/test/integ.dynamodb-v2.warm-throughput.js.snapshot/warmthroughputintegtestv2DefaultTestDeployAssertA2FD11C0.assets.json b/packages/@aws-cdk-testing/framework-integ/test/aws-dynamodb/test/integ.dynamodb-v2.warm-throughput.js.snapshot/warmthroughputintegtestv2DefaultTestDeployAssertA2FD11C0.assets.json new file mode 100644 index 0000000000000..9f1c36d556723 --- /dev/null +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-dynamodb/test/integ.dynamodb-v2.warm-throughput.js.snapshot/warmthroughputintegtestv2DefaultTestDeployAssertA2FD11C0.assets.json @@ -0,0 +1,19 @@ +{ + "version": "38.0.1", + "files": { + "21fbb51d7b23f6a6c262b46a9caee79d744a3ac019fd45422d988b96d44b2a22": { + "source": { + "path": "warmthroughputintegtestv2DefaultTestDeployAssertA2FD11C0.template.json", + "packaging": "file" + }, + "destinations": { + "current_account-current_region": { + "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", + "objectKey": "21fbb51d7b23f6a6c262b46a9caee79d744a3ac019fd45422d988b96d44b2a22.json", + "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" + } + } + } + }, + "dockerImages": {} +} \ No newline at end of file diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-dynamodb/test/integ.dynamodb-v2.warm-throughput.js.snapshot/warmthroughputintegtestv2DefaultTestDeployAssertA2FD11C0.template.json b/packages/@aws-cdk-testing/framework-integ/test/aws-dynamodb/test/integ.dynamodb-v2.warm-throughput.js.snapshot/warmthroughputintegtestv2DefaultTestDeployAssertA2FD11C0.template.json new file mode 100644 index 0000000000000..ad9d0fb73d1dd --- /dev/null +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-dynamodb/test/integ.dynamodb-v2.warm-throughput.js.snapshot/warmthroughputintegtestv2DefaultTestDeployAssertA2FD11C0.template.json @@ -0,0 +1,36 @@ +{ + "Parameters": { + "BootstrapVersion": { + "Type": "AWS::SSM::Parameter::Value", + "Default": "/cdk-bootstrap/hnb659fds/version", + "Description": "Version of the CDK Bootstrap resources in this environment, automatically retrieved from SSM Parameter Store. [cdk:skip]" + } + }, + "Rules": { + "CheckBootstrapVersion": { + "Assertions": [ + { + "Assert": { + "Fn::Not": [ + { + "Fn::Contains": [ + [ + "1", + "2", + "3", + "4", + "5" + ], + { + "Ref": "BootstrapVersion" + } + ] + } + ] + }, + "AssertDescription": "CDK bootstrap stack version 6 required. Please run 'cdk bootstrap' with a recent version of the CDK CLI." + } + ] + } + } +} \ No newline at end of file diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-dynamodb/test/integ.dynamodb-v2.warm-throughput.ts b/packages/@aws-cdk-testing/framework-integ/test/aws-dynamodb/test/integ.dynamodb-v2.warm-throughput.ts new file mode 100644 index 0000000000000..cff0ce1740ac5 --- /dev/null +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-dynamodb/test/integ.dynamodb-v2.warm-throughput.ts @@ -0,0 +1,50 @@ +import { App, RemovalPolicy, Stack, StackProps } from 'aws-cdk-lib'; +import { Construct } from 'constructs'; +import * as dynamodb from 'aws-cdk-lib/aws-dynamodb'; +import { IntegTest } from '@aws-cdk/integ-tests-alpha'; + +export class TestStack extends Stack { + + readonly table: dynamodb.TableV2; + + constructor(scope: Construct, id: string, props?: StackProps) { + super(scope, id, props); + + this.table = new dynamodb.TableV2(this, 'TableTest1', { + partitionKey: { + name: 'id', + type: dynamodb.AttributeType.STRING, + }, + warmThroughput: { + readUnitsPerSecond: 14000, + writeUnitsPerSecond: 5000, + }, + replicas: [{ + region: 'us-west-2', + }], + globalSecondaryIndexes: [ + { + indexName: 'my-index-1', + partitionKey: { name: 'gsi1pk', type: dynamodb.AttributeType.STRING }, + warmThroughput: { + readUnitsPerSecond: 15000, + writeUnitsPerSecond: 6000, + }, + }, + { + indexName: 'my-index-2', + partitionKey: { name: 'gsi1pk', type: dynamodb.AttributeType.STRING }, + }, + ], + removalPolicy: RemovalPolicy.DESTROY, + }); + + } +} + +const app = new App(); +const stack = new TestStack(app, 'warm-throughput-stack-v2', { env: { region: 'eu-west-1' } }); + +new IntegTest(app, 'warm-throughput-integ-test-v2', { + testCases: [stack], +}); diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-dynamodb/test/integ.dynamodb.warm-throughput.js.snapshot/cdk.out b/packages/@aws-cdk-testing/framework-integ/test/aws-dynamodb/test/integ.dynamodb.warm-throughput.js.snapshot/cdk.out new file mode 100644 index 0000000000000..c6e612584e352 --- /dev/null +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-dynamodb/test/integ.dynamodb.warm-throughput.js.snapshot/cdk.out @@ -0,0 +1 @@ +{"version":"38.0.1"} \ No newline at end of file diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-dynamodb/test/integ.dynamodb.warm-throughput.js.snapshot/integ.json b/packages/@aws-cdk-testing/framework-integ/test/aws-dynamodb/test/integ.dynamodb.warm-throughput.js.snapshot/integ.json new file mode 100644 index 0000000000000..67c2aef09eb5b --- /dev/null +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-dynamodb/test/integ.dynamodb.warm-throughput.js.snapshot/integ.json @@ -0,0 +1,12 @@ +{ + "version": "38.0.1", + "testCases": { + "warm-throughput-integ-test/DefaultTest": { + "stacks": [ + "warm-throughput-stack" + ], + "assertionStack": "warm-throughput-integ-test/DefaultTest/DeployAssert", + "assertionStackName": "warmthroughputintegtestDefaultTestDeployAssertA9A62BB4" + } + } +} \ No newline at end of file diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-dynamodb/test/integ.dynamodb.warm-throughput.js.snapshot/manifest.json b/packages/@aws-cdk-testing/framework-integ/test/aws-dynamodb/test/integ.dynamodb.warm-throughput.js.snapshot/manifest.json new file mode 100644 index 0000000000000..d3feceae96f6a --- /dev/null +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-dynamodb/test/integ.dynamodb.warm-throughput.js.snapshot/manifest.json @@ -0,0 +1,115 @@ +{ + "version": "38.0.1", + "artifacts": { + "warm-throughput-stack.assets": { + "type": "cdk:asset-manifest", + "properties": { + "file": "warm-throughput-stack.assets.json", + "requiresBootstrapStackVersion": 6, + "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version" + } + }, + "warm-throughput-stack": { + "type": "aws:cloudformation:stack", + "environment": "aws://unknown-account/unknown-region", + "properties": { + "templateFile": "warm-throughput-stack.template.json", + "terminationProtection": false, + "validateOnSynth": false, + "notificationArns": [], + "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-deploy-role-${AWS::AccountId}-${AWS::Region}", + "cloudFormationExecutionRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-cfn-exec-role-${AWS::AccountId}-${AWS::Region}", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/49ac99a4afc26a3c2b01a72fd651e3635180fbb98a34d1996729d3bfa6489397.json", + "requiresBootstrapStackVersion": 6, + "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", + "additionalDependencies": [ + "warm-throughput-stack.assets" + ], + "lookupRole": { + "arn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-lookup-role-${AWS::AccountId}-${AWS::Region}", + "requiresBootstrapStackVersion": 8, + "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version" + } + }, + "dependencies": [ + "warm-throughput-stack.assets" + ], + "metadata": { + "/warm-throughput-stack/TableTest1/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "TableTest143E55AA2" + } + ], + "/warm-throughput-stack/BootstrapVersion": [ + { + "type": "aws:cdk:logicalId", + "data": "BootstrapVersion" + } + ], + "/warm-throughput-stack/CheckBootstrapVersion": [ + { + "type": "aws:cdk:logicalId", + "data": "CheckBootstrapVersion" + } + ] + }, + "displayName": "warm-throughput-stack" + }, + "warmthroughputintegtestDefaultTestDeployAssertA9A62BB4.assets": { + "type": "cdk:asset-manifest", + "properties": { + "file": "warmthroughputintegtestDefaultTestDeployAssertA9A62BB4.assets.json", + "requiresBootstrapStackVersion": 6, + "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version" + } + }, + "warmthroughputintegtestDefaultTestDeployAssertA9A62BB4": { + "type": "aws:cloudformation:stack", + "environment": "aws://unknown-account/unknown-region", + "properties": { + "templateFile": "warmthroughputintegtestDefaultTestDeployAssertA9A62BB4.template.json", + "terminationProtection": false, + "validateOnSynth": false, + "notificationArns": [], + "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-deploy-role-${AWS::AccountId}-${AWS::Region}", + "cloudFormationExecutionRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-cfn-exec-role-${AWS::AccountId}-${AWS::Region}", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/21fbb51d7b23f6a6c262b46a9caee79d744a3ac019fd45422d988b96d44b2a22.json", + "requiresBootstrapStackVersion": 6, + "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", + "additionalDependencies": [ + "warmthroughputintegtestDefaultTestDeployAssertA9A62BB4.assets" + ], + "lookupRole": { + "arn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-lookup-role-${AWS::AccountId}-${AWS::Region}", + "requiresBootstrapStackVersion": 8, + "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version" + } + }, + "dependencies": [ + "warmthroughputintegtestDefaultTestDeployAssertA9A62BB4.assets" + ], + "metadata": { + "/warm-throughput-integ-test/DefaultTest/DeployAssert/BootstrapVersion": [ + { + "type": "aws:cdk:logicalId", + "data": "BootstrapVersion" + } + ], + "/warm-throughput-integ-test/DefaultTest/DeployAssert/CheckBootstrapVersion": [ + { + "type": "aws:cdk:logicalId", + "data": "CheckBootstrapVersion" + } + ] + }, + "displayName": "warm-throughput-integ-test/DefaultTest/DeployAssert" + }, + "Tree": { + "type": "cdk:tree", + "properties": { + "file": "tree.json" + } + } + } +} \ No newline at end of file diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-dynamodb/test/integ.dynamodb.warm-throughput.js.snapshot/tree.json b/packages/@aws-cdk-testing/framework-integ/test/aws-dynamodb/test/integ.dynamodb.warm-throughput.js.snapshot/tree.json new file mode 100644 index 0000000000000..8c5aee5d25b0a --- /dev/null +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-dynamodb/test/integ.dynamodb.warm-throughput.js.snapshot/tree.json @@ -0,0 +1,178 @@ +{ + "version": "tree-0.1", + "tree": { + "id": "App", + "path": "", + "children": { + "warm-throughput-stack": { + "id": "warm-throughput-stack", + "path": "warm-throughput-stack", + "children": { + "TableTest1": { + "id": "TableTest1", + "path": "warm-throughput-stack/TableTest1", + "children": { + "Resource": { + "id": "Resource", + "path": "warm-throughput-stack/TableTest1/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::DynamoDB::Table", + "aws:cdk:cloudformation:props": { + "attributeDefinitions": [ + { + "attributeName": "id", + "attributeType": "S" + }, + { + "attributeName": "gsi1pk", + "attributeType": "S" + } + ], + "globalSecondaryIndexes": [ + { + "indexName": "my-index", + "keySchema": [ + { + "attributeName": "gsi1pk", + "keyType": "HASH" + } + ], + "projection": { + "projectionType": "ALL" + }, + "provisionedThroughput": { + "readCapacityUnits": 5, + "writeCapacityUnits": 5 + }, + "warmThroughput": { + "readUnitsPerSecond": 15000, + "writeUnitsPerSecond": 5000 + } + } + ], + "keySchema": [ + { + "attributeName": "id", + "keyType": "HASH" + } + ], + "provisionedThroughput": { + "readCapacityUnits": 5, + "writeCapacityUnits": 5 + }, + "warmThroughput": { + "readUnitsPerSecond": 14000, + "writeUnitsPerSecond": 5000 + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_dynamodb.CfnTable", + "version": "0.0.0" + } + }, + "ScalingRole": { + "id": "ScalingRole", + "path": "warm-throughput-stack/TableTest1/ScalingRole", + "constructInfo": { + "fqn": "aws-cdk-lib.Resource", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_dynamodb.Table", + "version": "0.0.0" + } + }, + "BootstrapVersion": { + "id": "BootstrapVersion", + "path": "warm-throughput-stack/BootstrapVersion", + "constructInfo": { + "fqn": "aws-cdk-lib.CfnParameter", + "version": "0.0.0" + } + }, + "CheckBootstrapVersion": { + "id": "CheckBootstrapVersion", + "path": "warm-throughput-stack/CheckBootstrapVersion", + "constructInfo": { + "fqn": "aws-cdk-lib.CfnRule", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.Stack", + "version": "0.0.0" + } + }, + "warm-throughput-integ-test": { + "id": "warm-throughput-integ-test", + "path": "warm-throughput-integ-test", + "children": { + "DefaultTest": { + "id": "DefaultTest", + "path": "warm-throughput-integ-test/DefaultTest", + "children": { + "Default": { + "id": "Default", + "path": "warm-throughput-integ-test/DefaultTest/Default", + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.4.2" + } + }, + "DeployAssert": { + "id": "DeployAssert", + "path": "warm-throughput-integ-test/DefaultTest/DeployAssert", + "children": { + "BootstrapVersion": { + "id": "BootstrapVersion", + "path": "warm-throughput-integ-test/DefaultTest/DeployAssert/BootstrapVersion", + "constructInfo": { + "fqn": "aws-cdk-lib.CfnParameter", + "version": "0.0.0" + } + }, + "CheckBootstrapVersion": { + "id": "CheckBootstrapVersion", + "path": "warm-throughput-integ-test/DefaultTest/DeployAssert/CheckBootstrapVersion", + "constructInfo": { + "fqn": "aws-cdk-lib.CfnRule", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.Stack", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/integ-tests-alpha.IntegTestCase", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/integ-tests-alpha.IntegTest", + "version": "0.0.0" + } + }, + "Tree": { + "id": "Tree", + "path": "Tree", + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.4.2" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.App", + "version": "0.0.0" + } + } +} \ No newline at end of file diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-dynamodb/test/integ.dynamodb.warm-throughput.js.snapshot/warm-throughput-stack.assets.json b/packages/@aws-cdk-testing/framework-integ/test/aws-dynamodb/test/integ.dynamodb.warm-throughput.js.snapshot/warm-throughput-stack.assets.json new file mode 100644 index 0000000000000..bd15495c0b68a --- /dev/null +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-dynamodb/test/integ.dynamodb.warm-throughput.js.snapshot/warm-throughput-stack.assets.json @@ -0,0 +1,19 @@ +{ + "version": "38.0.1", + "files": { + "49ac99a4afc26a3c2b01a72fd651e3635180fbb98a34d1996729d3bfa6489397": { + "source": { + "path": "warm-throughput-stack.template.json", + "packaging": "file" + }, + "destinations": { + "current_account-current_region": { + "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", + "objectKey": "49ac99a4afc26a3c2b01a72fd651e3635180fbb98a34d1996729d3bfa6489397.json", + "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" + } + } + } + }, + "dockerImages": {} +} \ No newline at end of file diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-dynamodb/test/integ.dynamodb.warm-throughput.js.snapshot/warm-throughput-stack.template.json b/packages/@aws-cdk-testing/framework-integ/test/aws-dynamodb/test/integ.dynamodb.warm-throughput.js.snapshot/warm-throughput-stack.template.json new file mode 100644 index 0000000000000..a058b4d0c432f --- /dev/null +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-dynamodb/test/integ.dynamodb.warm-throughput.js.snapshot/warm-throughput-stack.template.json @@ -0,0 +1,91 @@ +{ + "Resources": { + "TableTest143E55AA2": { + "Type": "AWS::DynamoDB::Table", + "Properties": { + "AttributeDefinitions": [ + { + "AttributeName": "id", + "AttributeType": "S" + }, + { + "AttributeName": "gsi1pk", + "AttributeType": "S" + } + ], + "GlobalSecondaryIndexes": [ + { + "IndexName": "my-index", + "KeySchema": [ + { + "AttributeName": "gsi1pk", + "KeyType": "HASH" + } + ], + "Projection": { + "ProjectionType": "ALL" + }, + "ProvisionedThroughput": { + "ReadCapacityUnits": 5, + "WriteCapacityUnits": 5 + }, + "WarmThroughput": { + "ReadUnitsPerSecond": 15000, + "WriteUnitsPerSecond": 5000 + } + } + ], + "KeySchema": [ + { + "AttributeName": "id", + "KeyType": "HASH" + } + ], + "ProvisionedThroughput": { + "ReadCapacityUnits": 5, + "WriteCapacityUnits": 5 + }, + "WarmThroughput": { + "ReadUnitsPerSecond": 14000, + "WriteUnitsPerSecond": 5000 + } + }, + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete" + } + }, + "Parameters": { + "BootstrapVersion": { + "Type": "AWS::SSM::Parameter::Value", + "Default": "/cdk-bootstrap/hnb659fds/version", + "Description": "Version of the CDK Bootstrap resources in this environment, automatically retrieved from SSM Parameter Store. [cdk:skip]" + } + }, + "Rules": { + "CheckBootstrapVersion": { + "Assertions": [ + { + "Assert": { + "Fn::Not": [ + { + "Fn::Contains": [ + [ + "1", + "2", + "3", + "4", + "5" + ], + { + "Ref": "BootstrapVersion" + } + ] + } + ] + }, + "AssertDescription": "CDK bootstrap stack version 6 required. Please run 'cdk bootstrap' with a recent version of the CDK CLI." + } + ] + } + } +} \ No newline at end of file diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-dynamodb/test/integ.dynamodb.warm-throughput.js.snapshot/warmthroughputintegtestDefaultTestDeployAssertA9A62BB4.assets.json b/packages/@aws-cdk-testing/framework-integ/test/aws-dynamodb/test/integ.dynamodb.warm-throughput.js.snapshot/warmthroughputintegtestDefaultTestDeployAssertA9A62BB4.assets.json new file mode 100644 index 0000000000000..fb5392eb67670 --- /dev/null +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-dynamodb/test/integ.dynamodb.warm-throughput.js.snapshot/warmthroughputintegtestDefaultTestDeployAssertA9A62BB4.assets.json @@ -0,0 +1,19 @@ +{ + "version": "38.0.1", + "files": { + "21fbb51d7b23f6a6c262b46a9caee79d744a3ac019fd45422d988b96d44b2a22": { + "source": { + "path": "warmthroughputintegtestDefaultTestDeployAssertA9A62BB4.template.json", + "packaging": "file" + }, + "destinations": { + "current_account-current_region": { + "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", + "objectKey": "21fbb51d7b23f6a6c262b46a9caee79d744a3ac019fd45422d988b96d44b2a22.json", + "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" + } + } + } + }, + "dockerImages": {} +} \ No newline at end of file diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-dynamodb/test/integ.dynamodb.warm-throughput.js.snapshot/warmthroughputintegtestDefaultTestDeployAssertA9A62BB4.template.json b/packages/@aws-cdk-testing/framework-integ/test/aws-dynamodb/test/integ.dynamodb.warm-throughput.js.snapshot/warmthroughputintegtestDefaultTestDeployAssertA9A62BB4.template.json new file mode 100644 index 0000000000000..ad9d0fb73d1dd --- /dev/null +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-dynamodb/test/integ.dynamodb.warm-throughput.js.snapshot/warmthroughputintegtestDefaultTestDeployAssertA9A62BB4.template.json @@ -0,0 +1,36 @@ +{ + "Parameters": { + "BootstrapVersion": { + "Type": "AWS::SSM::Parameter::Value", + "Default": "/cdk-bootstrap/hnb659fds/version", + "Description": "Version of the CDK Bootstrap resources in this environment, automatically retrieved from SSM Parameter Store. [cdk:skip]" + } + }, + "Rules": { + "CheckBootstrapVersion": { + "Assertions": [ + { + "Assert": { + "Fn::Not": [ + { + "Fn::Contains": [ + [ + "1", + "2", + "3", + "4", + "5" + ], + { + "Ref": "BootstrapVersion" + } + ] + } + ] + }, + "AssertDescription": "CDK bootstrap stack version 6 required. Please run 'cdk bootstrap' with a recent version of the CDK CLI." + } + ] + } + } +} \ No newline at end of file diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-dynamodb/test/integ.dynamodb.warm-throughput.ts b/packages/@aws-cdk-testing/framework-integ/test/aws-dynamodb/test/integ.dynamodb.warm-throughput.ts new file mode 100644 index 0000000000000..5e297d83331b3 --- /dev/null +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-dynamodb/test/integ.dynamodb.warm-throughput.ts @@ -0,0 +1,42 @@ +import { App, RemovalPolicy, Stack, StackProps } from 'aws-cdk-lib'; +import { Construct } from 'constructs'; +import * as dynamodb from 'aws-cdk-lib/aws-dynamodb'; +import { IntegTest } from '@aws-cdk/integ-tests-alpha'; + +export class TestStack extends Stack { + + readonly table: dynamodb.Table; + + constructor(scope: Construct, id: string, props?: StackProps) { + super(scope, id, props); + + this.table = new dynamodb.Table(this, 'TableTest1', { + partitionKey: { + name: 'id', + type: dynamodb.AttributeType.STRING, + }, + warmThroughput: { + readUnitsPerSecond: 14000, + writeUnitsPerSecond: 5000, + }, + removalPolicy: RemovalPolicy.DESTROY, + }); + + this.table.addGlobalSecondaryIndex({ + indexName: 'my-index', + partitionKey: { name: 'gsi1pk', type: dynamodb.AttributeType.STRING }, + warmThroughput: { + readUnitsPerSecond: 15000, + writeUnitsPerSecond: 5000, + }, + }); + + } +} + +const app = new App(); +const stack = new TestStack(app, 'warm-throughput-stack', {}); + +new IntegTest(app, 'warm-throughput-integ-test', { + testCases: [stack], +}); diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-dynamodb/test/integ.global-replicas-provisioned.js.snapshot/asset.fe4094cd52f099e46f858f05efdde02f5de79288c9c783676b3fa53a494d04b5/cfn-response.js b/packages/@aws-cdk-testing/framework-integ/test/aws-dynamodb/test/integ.global-replicas-provisioned.js.snapshot/asset.d320874294f5d626406d5f86087c2a2c8e6efc0aab690c5105572555dc445fd4/cfn-response.js similarity index 73% rename from packages/@aws-cdk-testing/framework-integ/test/aws-dynamodb/test/integ.global-replicas-provisioned.js.snapshot/asset.fe4094cd52f099e46f858f05efdde02f5de79288c9c783676b3fa53a494d04b5/cfn-response.js rename to packages/@aws-cdk-testing/framework-integ/test/aws-dynamodb/test/integ.global-replicas-provisioned.js.snapshot/asset.d320874294f5d626406d5f86087c2a2c8e6efc0aab690c5105572555dc445fd4/cfn-response.js index 12f017f21494c..a8c8eff4a5a61 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-dynamodb/test/integ.global-replicas-provisioned.js.snapshot/asset.fe4094cd52f099e46f858f05efdde02f5de79288c9c783676b3fa53a494d04b5/cfn-response.js +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-dynamodb/test/integ.global-replicas-provisioned.js.snapshot/asset.d320874294f5d626406d5f86087c2a2c8e6efc0aab690c5105572555dc445fd4/cfn-response.js @@ -1,9 +1,6 @@ "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); -exports.Retry = exports.includeStackTraces = exports.MISSING_PHYSICAL_ID_MARKER = exports.CREATE_FAILED_PHYSICAL_ID_MARKER = void 0; -exports.submitResponse = submitResponse; -exports.safeHandler = safeHandler; -exports.redactDataFromPayload = redactDataFromPayload; +exports.Retry = exports.redactDataFromPayload = exports.safeHandler = exports.includeStackTraces = exports.submitResponse = exports.MISSING_PHYSICAL_ID_MARKER = exports.CREATE_FAILED_PHYSICAL_ID_MARKER = void 0; /* eslint-disable max-len */ /* eslint-disable no-console */ const url = require("url"); @@ -45,6 +42,7 @@ async function submitResponse(status, event, options = {}) { }, }, responseBody); } +exports.submitResponse = submitResponse; exports.includeStackTraces = true; // for unit tests function safeHandler(block) { return async (event) => { @@ -88,6 +86,7 @@ function safeHandler(block) { } }; } +exports.safeHandler = safeHandler; function redactDataFromPayload(payload) { // Create a deep copy of the payload object const redactedPayload = JSON.parse(JSON.stringify(payload)); @@ -100,7 +99,8 @@ function redactDataFromPayload(payload) { } return redactedPayload; } +exports.redactDataFromPayload = redactDataFromPayload; class Retry extends Error { } exports.Retry = Retry; -//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY2ZuLXJlc3BvbnNlLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiY2ZuLXJlc3BvbnNlLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7OztBQXdCQSx3Q0FtQ0M7QUFJRCxrQ0EyQ0M7QUFFRCxzREFZQztBQXhIRCw0QkFBNEI7QUFDNUIsK0JBQStCO0FBQy9CLDJCQUEyQjtBQUMzQix5Q0FBeUM7QUFDekMsaUNBQTBDO0FBRzdCLFFBQUEsZ0NBQWdDLEdBQUcsd0RBQXdELENBQUM7QUFDNUYsUUFBQSwwQkFBMEIsR0FBRyw4REFBOEQsQ0FBQztBQWdCbEcsS0FBSyxVQUFVLGNBQWMsQ0FBQyxNQUE0QixFQUFFLEtBQWlDLEVBQUUsVUFBeUMsRUFBRztJQUNoSixNQUFNLElBQUksR0FBbUQ7UUFDM0QsTUFBTSxFQUFFLE1BQU07UUFDZCxNQUFNLEVBQUUsT0FBTyxDQUFDLE1BQU0sSUFBSSxNQUFNO1FBQ2hDLE9BQU8sRUFBRSxLQUFLLENBQUMsT0FBTztRQUN0QixTQUFTLEVBQUUsS0FBSyxDQUFDLFNBQVM7UUFDMUIsa0JBQWtCLEVBQUUsS0FBSyxDQUFDLGtCQUFrQixJQUFJLGtDQUEwQjtRQUMxRSxpQkFBaUIsRUFBRSxLQUFLLENBQUMsaUJBQWlCO1FBQzFDLE1BQU0sRUFBRSxPQUFPLENBQUMsTUFBTTtRQUN0QixJQUFJLEVBQUUsS0FBSyxDQUFDLElBQUk7S0FDakIsQ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integ/test/aws-dynamodb/test/integ.global-replicas-provisioned.js.snapshot/asset.fe4094cd52f099e46f858f05efdde02f5de79288c9c783676b3fa53a494d04b5/consts.js b/packages/@aws-cdk-testing/framework-integ/test/aws-dynamodb/test/integ.global-replicas-provisioned.js.snapshot/asset.d320874294f5d626406d5f86087c2a2c8e6efc0aab690c5105572555dc445fd4/consts.js similarity index 100% rename from packages/@aws-cdk-testing/framework-integ/test/aws-dynamodb/test/integ.global-replicas-provisioned.js.snapshot/asset.fe4094cd52f099e46f858f05efdde02f5de79288c9c783676b3fa53a494d04b5/consts.js rename to packages/@aws-cdk-testing/framework-integ/test/aws-dynamodb/test/integ.global-replicas-provisioned.js.snapshot/asset.d320874294f5d626406d5f86087c2a2c8e6efc0aab690c5105572555dc445fd4/consts.js diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-dynamodb/test/integ.global-replicas-provisioned.js.snapshot/asset.fe4094cd52f099e46f858f05efdde02f5de79288c9c783676b3fa53a494d04b5/framework.js b/packages/@aws-cdk-testing/framework-integ/test/aws-dynamodb/test/integ.global-replicas-provisioned.js.snapshot/asset.d320874294f5d626406d5f86087c2a2c8e6efc0aab690c5105572555dc445fd4/framework.js similarity index 100% rename from packages/@aws-cdk-testing/framework-integ/test/aws-dynamodb/test/integ.global-replicas-provisioned.js.snapshot/asset.fe4094cd52f099e46f858f05efdde02f5de79288c9c783676b3fa53a494d04b5/framework.js rename to packages/@aws-cdk-testing/framework-integ/test/aws-dynamodb/test/integ.global-replicas-provisioned.js.snapshot/asset.d320874294f5d626406d5f86087c2a2c8e6efc0aab690c5105572555dc445fd4/framework.js diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-dynamodb/test/integ.global-replicas-provisioned.js.snapshot/asset.fe4094cd52f099e46f858f05efdde02f5de79288c9c783676b3fa53a494d04b5/outbound.js b/packages/@aws-cdk-testing/framework-integ/test/aws-dynamodb/test/integ.global-replicas-provisioned.js.snapshot/asset.d320874294f5d626406d5f86087c2a2c8e6efc0aab690c5105572555dc445fd4/outbound.js similarity index 100% rename from packages/@aws-cdk-testing/framework-integ/test/aws-dynamodb/test/integ.global-replicas-provisioned.js.snapshot/asset.fe4094cd52f099e46f858f05efdde02f5de79288c9c783676b3fa53a494d04b5/outbound.js rename to packages/@aws-cdk-testing/framework-integ/test/aws-dynamodb/test/integ.global-replicas-provisioned.js.snapshot/asset.d320874294f5d626406d5f86087c2a2c8e6efc0aab690c5105572555dc445fd4/outbound.js diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-dynamodb/test/integ.global-replicas-provisioned.js.snapshot/asset.d320874294f5d626406d5f86087c2a2c8e6efc0aab690c5105572555dc445fd4/util.js b/packages/@aws-cdk-testing/framework-integ/test/aws-dynamodb/test/integ.global-replicas-provisioned.js.snapshot/asset.d320874294f5d626406d5f86087c2a2c8e6efc0aab690c5105572555dc445fd4/util.js new file mode 100644 index 0000000000000..55b2075a3efc6 --- /dev/null +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-dynamodb/test/integ.global-replicas-provisioned.js.snapshot/asset.d320874294f5d626406d5f86087c2a2c8e6efc0aab690c5105572555dc445fd4/util.js @@ -0,0 +1,54 @@ +"use strict"; +/* eslint-disable no-console */ +Object.defineProperty(exports, "__esModule", { value: true }); +exports.parseJsonPayload = exports.withRetries = exports.log = exports.getEnv = void 0; +function getEnv(name) { + const value = process.env[name]; + if (!value) { + throw new Error(`The environment variable "${name}" is not defined`); + } + return value; +} +exports.getEnv = getEnv; +function log(title, ...args) { + console.log('[provider-framework]', title, ...args.map(x => typeof (x) === 'object' ? JSON.stringify(x, undefined, 2) : x)); +} +exports.log = log; +function withRetries(options, fn) { + return async (...xs) => { + let attempts = options.attempts; + let ms = options.sleep; + while (true) { + try { + return await fn(...xs); + } + catch (e) { + if (attempts-- <= 0) { + throw e; + } + await sleep(Math.floor(Math.random() * ms)); + ms *= 2; + } + } + }; +} +exports.withRetries = withRetries; +async function sleep(ms) { + return new Promise((ok) => setTimeout(ok, ms)); +} +function parseJsonPayload(payload) { + // sdk v3 returns payloads in Uint8Array, either it or a string or Buffer + // can be cast into a buffer and then decoded. + const text = new TextDecoder().decode(Buffer.from(payload ?? '')); + if (!text) { + return {}; + } + try { + return JSON.parse(text); + } + catch { + throw new Error(`return values from user-handlers must be JSON objects. got: "${text}"`); + } +} +exports.parseJsonPayload = parseJsonPayload; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidXRpbC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbInV0aWwudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IjtBQUFBLCtCQUErQjs7O0FBRS9CLFNBQWdCLE1BQU0sQ0FBQyxJQUFZO0lBQ2pDLE1BQU0sS0FBSyxHQUFHLE9BQU8sQ0FBQyxHQUFHLENBQUMsSUFBSSxDQUFDLENBQUM7SUFDaEMsSUFBSSxDQUFDLEtBQUssRUFBRSxDQUFDO1FBQ1gsTUFBTSxJQUFJLEtBQUssQ0FBQyw2QkFBNkIsSUFBSSxrQkFBa0IsQ0FBQyxDQUFDO0lBQ3ZFLENBQUM7SUFDRCxPQUFPLEtBQUssQ0FBQztBQUNmLENBQUM7QUFORCx3QkFNQztBQUVELFNBQWdCLEdBQUcsQ0FBQyxLQUFVLEVBQUUsR0FBRyxJQUFXO0lBQzVDLE9BQU8sQ0FBQyxHQUFHLENBQUMsc0JBQXNCLEVBQUUsS0FBSyxFQUFFLEdBQUcsSUFBSSxDQUFDLEdBQUcsQ0FBQyxDQUFDLENBQUMsRUFBRSxDQUFDLE9BQU0sQ0FBQyxDQUFDLENBQUMsS0FBSyxRQUFRLENBQUMsQ0FBQyxDQUFDLElBQUksQ0FBQyxTQUFTLENBQUMsQ0FBQyxFQUFFLFNBQVMsRUFBRSxDQUFDLENBQUMsQ0FBQyxDQUFDLENBQUMsQ0FBQyxDQUFDLENBQUMsQ0FBQztBQUM3SCxDQUFDO0FBRkQsa0JBRUM7QUFTRCxTQUFnQ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BCdWZmZXJcbiAgLy8gY2FuIGJlIGNhc3QgaW50byBhIGJ1ZmZlciBhbmQgdGhlbiBkZWNvZGVkLlxuICBjb25zdCB0ZXh0ID0gbmV3IFRleHREZWNvZGVyKCkuZGVjb2RlKEJ1ZmZlci5mcm9tKHBheWxvYWQgPz8gJycpKTtcbiAgaWYgKCF0ZXh0KSB7IHJldHVybiB7IH07IH1cbiAgdHJ5IHtcbiAgICByZXR1cm4gSlNPTi5wYXJzZSh0ZXh0KTtcbiAgfSBjYXRjaCB7XG4gICAgdGhyb3cgbmV3IEVycm9yKGByZXR1cm4gdmFsdWVzIGZyb20gdXNlci1oYW5kbGVycyBtdXN0IGJlIEpTT04gb2JqZWN0cy4gZ290OiBcIiR7dGV4dH1cImApO1xuICB9XG59XG4iXX0= \ No newline at end of file diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-dynamodb/test/integ.global-replicas-provisioned.js.snapshot/asset.fe4094cd52f099e46f858f05efdde02f5de79288c9c783676b3fa53a494d04b5/util.js b/packages/@aws-cdk-testing/framework-integ/test/aws-dynamodb/test/integ.global-replicas-provisioned.js.snapshot/asset.fe4094cd52f099e46f858f05efdde02f5de79288c9c783676b3fa53a494d04b5/util.js deleted file mode 100644 index 5d48e914660a6..0000000000000 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-dynamodb/test/integ.global-replicas-provisioned.js.snapshot/asset.fe4094cd52f099e46f858f05efdde02f5de79288c9c783676b3fa53a494d04b5/util.js +++ /dev/null @@ -1,53 +0,0 @@ -"use strict"; -/* eslint-disable no-console */ -Object.defineProperty(exports, "__esModule", { value: true }); -exports.getEnv = getEnv; -exports.log = log; -exports.withRetries = withRetries; -exports.parseJsonPayload = parseJsonPayload; -function getEnv(name) { - const value = process.env[name]; - if (!value) { - throw new Error(`The environment variable "${name}" is not defined`); - } - return value; -} -function log(title, ...args) { - console.log('[provider-framework]', title, ...args.map(x => typeof (x) === 'object' ? JSON.stringify(x, undefined, 2) : x)); -} -function withRetries(options, fn) { - return async (...xs) => { - let attempts = options.attempts; - let ms = options.sleep; - while (true) { - try { - return await fn(...xs); - } - catch (e) { - if (attempts-- <= 0) { - throw e; - } - await sleep(Math.floor(Math.random() * ms)); - ms *= 2; - } - } - }; -} -async function sleep(ms) { - return new Promise((ok) => setTimeout(ok, ms)); -} -function parseJsonPayload(payload) { - // sdk v3 returns payloads in Uint8Array, either it or a string or Buffer - // can be cast into a buffer and then decoded. - const text = new TextDecoder().decode(Buffer.from(payload ?? '')); - if (!text) { - return {}; - } - try { - return JSON.parse(text); - } - catch { - throw new Error(`return values from user-handlers must be JSON objects. got: "${text}"`); - } -} -//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidXRpbC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbInV0aWwudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IjtBQUFBLCtCQUErQjs7QUFFL0Isd0JBTUM7QUFFRCxrQkFFQztBQVNELGtDQWdCQztBQU1ELDRDQVVDO0FBbkRELFNBQWdCLE1BQU0sQ0FBQyxJQUFZO0lBQ2pDLE1BQU0sS0FBSyxHQUFHLE9BQU8sQ0FBQyxHQUFHLENBQUMsSUFBSSxDQUFDLENBQUM7SUFDaEMsSUFBSSxDQUFDLEtBQUssRUFBRSxDQUFDO1FBQ1gsTUFBTSxJQUFJLEtBQUssQ0FBQyw2QkFBNkIsSUFBSSxrQkFBa0IsQ0FBQyxDQUFDO0lBQ3ZFLENBQUM7SUFDRCxPQUFPLEtBQUssQ0FBQztBQUNmLENBQUM7QUFFRCxTQUFnQixHQUFHLENBQUMsS0FBVSxFQUFFLEdBQUcsSUFBVztJQUM1QyxPQUFPLENBQUMsR0FBRyxDQUFDLHNCQUFzQixFQUFFLEtBQUssRUFBRSxHQUFHLElBQUksQ0FBQyxHQUFHLENBQUMsQ0FBQyxDQUFDLEVBQUUsQ0FBQyxPQUFNLENBQUMsQ0FBQyxDQUFDLEtBQUss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bmRlZmluZWQgfCBudWxsKTogYW55IHtcbiAgLy8gc2RrIHYzIHJldHVybnMgcGF5bG9hZHMgaW4gVWludDhBcnJheSwgZWl0aGVyIGl0IG9yIGEgc3RyaW5nIG9yIEJ1ZmZlclxuICAvLyBjYW4gYmUgY2FzdCBpbnRvIGEgYnVmZmVyIGFuZCB0aGVuIGRlY29kZWQuXG4gIGNvbnN0IHRleHQgPSBuZXcgVGV4dERlY29kZXIoKS5kZWNvZGUoQnVmZmVyLmZyb20ocGF5bG9hZCA/PyAnJykpO1xuICBpZiAoIXRleHQpIHsgcmV0dXJuIHsgfTsgfVxuICB0cnkge1xuICAgIHJldHVybiBKU09OLnBhcnNlKHRleHQpO1xuICB9IGNhdGNoIHtcbiAgICB0aHJvdyBuZXcgRXJyb3IoYHJldHVybiB2YWx1ZXMgZnJvbSB1c2VyLWhhbmRsZXJzIG11c3QgYmUgSlNPTiBvYmplY3RzLiBnb3Q6IFwiJHt0ZXh0fVwiYCk7XG4gIH1cbn1cbiJdfQ== \ No newline at end of file diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-dynamodb/test/integ.global-replicas-provisioned.js.snapshot/aws-cdk-dynamodb-global-replicas-provisioned.assets.json b/packages/@aws-cdk-testing/framework-integ/test/aws-dynamodb/test/integ.global-replicas-provisioned.js.snapshot/aws-cdk-dynamodb-global-replicas-provisioned.assets.json index 71de88fe7e0f1..cbd3500556ac7 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-dynamodb/test/integ.global-replicas-provisioned.js.snapshot/aws-cdk-dynamodb-global-replicas-provisioned.assets.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-dynamodb/test/integ.global-replicas-provisioned.js.snapshot/aws-cdk-dynamodb-global-replicas-provisioned.assets.json @@ -14,20 +14,20 @@ } } }, - "fe4094cd52f099e46f858f05efdde02f5de79288c9c783676b3fa53a494d04b5": { + "d320874294f5d626406d5f86087c2a2c8e6efc0aab690c5105572555dc445fd4": { "source": { - "path": "asset.fe4094cd52f099e46f858f05efdde02f5de79288c9c783676b3fa53a494d04b5", + "path": "asset.d320874294f5d626406d5f86087c2a2c8e6efc0aab690c5105572555dc445fd4", "packaging": "zip" }, "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "fe4094cd52f099e46f858f05efdde02f5de79288c9c783676b3fa53a494d04b5.zip", + "objectKey": "d320874294f5d626406d5f86087c2a2c8e6efc0aab690c5105572555dc445fd4.zip", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } }, - "5c0f7be02b4e69e39de079b2942aa05f6c48601e5bdca08cf1a5bf5cd237965a": { + "7b0c41732533f1cc5642dbc3ee13a4ecf0a9f7f9d6f78973320d5d430f270955": { "source": { "path": "awscdkdynamodbglobalreplicasprovisionedawscdkawsdynamodbReplicaProviderEA32CB30.nested.template.json", "packaging": "file" @@ -35,12 +35,12 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "5c0f7be02b4e69e39de079b2942aa05f6c48601e5bdca08cf1a5bf5cd237965a.json", + "objectKey": "7b0c41732533f1cc5642dbc3ee13a4ecf0a9f7f9d6f78973320d5d430f270955.json", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } }, - "2c0d537771a44b83794935ded4940b9ac48f44a91e7caafcca8eed4e3b1d64ce": { + "84c4fa5bea6c554906e1b2fb1cbfcea6618b220ee39b213243898139fc28a697": { "source": { "path": "aws-cdk-dynamodb-global-replicas-provisioned.template.json", "packaging": "file" @@ -48,7 +48,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "2c0d537771a44b83794935ded4940b9ac48f44a91e7caafcca8eed4e3b1d64ce.json", + "objectKey": "84c4fa5bea6c554906e1b2fb1cbfcea6618b220ee39b213243898139fc28a697.json", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-dynamodb/test/integ.global-replicas-provisioned.js.snapshot/aws-cdk-dynamodb-global-replicas-provisioned.template.json b/packages/@aws-cdk-testing/framework-integ/test/aws-dynamodb/test/integ.global-replicas-provisioned.js.snapshot/aws-cdk-dynamodb-global-replicas-provisioned.template.json index e06a7cc96e375..97b1f71c17af7 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-dynamodb/test/integ.global-replicas-provisioned.js.snapshot/aws-cdk-dynamodb-global-replicas-provisioned.template.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-dynamodb/test/integ.global-replicas-provisioned.js.snapshot/aws-cdk-dynamodb-global-replicas-provisioned.template.json @@ -291,7 +291,7 @@ { "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" }, - "/5c0f7be02b4e69e39de079b2942aa05f6c48601e5bdca08cf1a5bf5cd237965a.json" + "/7b0c41732533f1cc5642dbc3ee13a4ecf0a9f7f9d6f78973320d5d430f270955.json" ] ] } diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-dynamodb/test/integ.global-replicas-provisioned.js.snapshot/awscdkdynamodbglobalreplicasprovisionedawscdkawsdynamodbReplicaProviderEA32CB30.nested.template.json b/packages/@aws-cdk-testing/framework-integ/test/aws-dynamodb/test/integ.global-replicas-provisioned.js.snapshot/awscdkdynamodbglobalreplicasprovisionedawscdkawsdynamodbReplicaProviderEA32CB30.nested.template.json index c93f2f4f56678..11ed99a9c5afa 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-dynamodb/test/integ.global-replicas-provisioned.js.snapshot/awscdkdynamodbglobalreplicasprovisionedawscdkawsdynamodbReplicaProviderEA32CB30.nested.template.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-dynamodb/test/integ.global-replicas-provisioned.js.snapshot/awscdkdynamodbglobalreplicasprovisionedawscdkawsdynamodbReplicaProviderEA32CB30.nested.template.json @@ -444,7 +444,7 @@ "S3Bucket": { "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" }, - "S3Key": "fe4094cd52f099e46f858f05efdde02f5de79288c9c783676b3fa53a494d04b5.zip" + "S3Key": "d320874294f5d626406d5f86087c2a2c8e6efc0aab690c5105572555dc445fd4.zip" }, "Description": "AWS CDK resource provider framework - onEvent (aws-cdk-dynamodb-global-replicas-provisioned/@aws-cdk--aws-dynamodb.ReplicaProvider/Provider)", "Environment": { @@ -589,7 +589,7 @@ "S3Bucket": { "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" }, - "S3Key": "fe4094cd52f099e46f858f05efdde02f5de79288c9c783676b3fa53a494d04b5.zip" + "S3Key": "d320874294f5d626406d5f86087c2a2c8e6efc0aab690c5105572555dc445fd4.zip" }, "Description": "AWS CDK resource provider framework - isComplete (aws-cdk-dynamodb-global-replicas-provisioned/@aws-cdk--aws-dynamodb.ReplicaProvider/Provider)", "Environment": { @@ -731,7 +731,7 @@ "S3Bucket": { "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" }, - "S3Key": "fe4094cd52f099e46f858f05efdde02f5de79288c9c783676b3fa53a494d04b5.zip" + "S3Key": "d320874294f5d626406d5f86087c2a2c8e6efc0aab690c5105572555dc445fd4.zip" }, "Description": "AWS CDK resource provider framework - onTimeout (aws-cdk-dynamodb-global-replicas-provisioned/@aws-cdk--aws-dynamodb.ReplicaProvider/Provider)", "Environment": { diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-dynamodb/test/integ.global-replicas-provisioned.js.snapshot/manifest.json b/packages/@aws-cdk-testing/framework-integ/test/aws-dynamodb/test/integ.global-replicas-provisioned.js.snapshot/manifest.json index 52c15c94cfc0c..4f48158260277 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-dynamodb/test/integ.global-replicas-provisioned.js.snapshot/manifest.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-dynamodb/test/integ.global-replicas-provisioned.js.snapshot/manifest.json @@ -19,7 +19,7 @@ "notificationArns": [], "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-deploy-role-${AWS::AccountId}-${AWS::Region}", "cloudFormationExecutionRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-cfn-exec-role-${AWS::AccountId}-${AWS::Region}", - "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/2c0d537771a44b83794935ded4940b9ac48f44a91e7caafcca8eed4e3b1d64ce.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/84c4fa5bea6c554906e1b2fb1cbfcea6618b220ee39b213243898139fc28a697.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-dynamodb/test/integ.global-replicas-provisioned.js.snapshot/tree.json b/packages/@aws-cdk-testing/framework-integ/test/aws-dynamodb/test/integ.global-replicas-provisioned.js.snapshot/tree.json index cfe4c8d17492c..15120322bd4d9 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-dynamodb/test/integ.global-replicas-provisioned.js.snapshot/tree.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-dynamodb/test/integ.global-replicas-provisioned.js.snapshot/tree.json @@ -972,7 +972,7 @@ "s3Bucket": { "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" }, - "s3Key": "fe4094cd52f099e46f858f05efdde02f5de79288c9c783676b3fa53a494d04b5.zip" + "s3Key": "d320874294f5d626406d5f86087c2a2c8e6efc0aab690c5105572555dc445fd4.zip" }, "description": "AWS CDK resource provider framework - onEvent (aws-cdk-dynamodb-global-replicas-provisioned/@aws-cdk--aws-dynamodb.ReplicaProvider/Provider)", "environment": { @@ -1201,7 +1201,7 @@ "s3Bucket": { "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" }, - "s3Key": "fe4094cd52f099e46f858f05efdde02f5de79288c9c783676b3fa53a494d04b5.zip" + "s3Key": "d320874294f5d626406d5f86087c2a2c8e6efc0aab690c5105572555dc445fd4.zip" }, "description": "AWS CDK resource provider framework - isComplete (aws-cdk-dynamodb-global-replicas-provisioned/@aws-cdk--aws-dynamodb.ReplicaProvider/Provider)", "environment": { @@ -1427,7 +1427,7 @@ "s3Bucket": { "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" }, - "s3Key": "fe4094cd52f099e46f858f05efdde02f5de79288c9c783676b3fa53a494d04b5.zip" + "s3Key": "d320874294f5d626406d5f86087c2a2c8e6efc0aab690c5105572555dc445fd4.zip" }, "description": "AWS CDK resource provider framework - onTimeout (aws-cdk-dynamodb-global-replicas-provisioned/@aws-cdk--aws-dynamodb.ReplicaProvider/Provider)", "environment": { @@ -1793,7 +1793,7 @@ { "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" }, - "/5c0f7be02b4e69e39de079b2942aa05f6c48601e5bdca08cf1a5bf5cd237965a.json" + "/7b0c41732533f1cc5642dbc3ee13a4ecf0a9f7f9d6f78973320d5d430f270955.json" ] ] } diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-dynamodb/test/integ.global.js.snapshot/asset.fe4094cd52f099e46f858f05efdde02f5de79288c9c783676b3fa53a494d04b5/cfn-response.js b/packages/@aws-cdk-testing/framework-integ/test/aws-dynamodb/test/integ.global.js.snapshot/asset.d320874294f5d626406d5f86087c2a2c8e6efc0aab690c5105572555dc445fd4/cfn-response.js similarity index 73% rename from packages/@aws-cdk-testing/framework-integ/test/aws-dynamodb/test/integ.global.js.snapshot/asset.fe4094cd52f099e46f858f05efdde02f5de79288c9c783676b3fa53a494d04b5/cfn-response.js rename to packages/@aws-cdk-testing/framework-integ/test/aws-dynamodb/test/integ.global.js.snapshot/asset.d320874294f5d626406d5f86087c2a2c8e6efc0aab690c5105572555dc445fd4/cfn-response.js index 12f017f21494c..a8c8eff4a5a61 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-dynamodb/test/integ.global.js.snapshot/asset.fe4094cd52f099e46f858f05efdde02f5de79288c9c783676b3fa53a494d04b5/cfn-response.js +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-dynamodb/test/integ.global.js.snapshot/asset.d320874294f5d626406d5f86087c2a2c8e6efc0aab690c5105572555dc445fd4/cfn-response.js @@ -1,9 +1,6 @@ "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); -exports.Retry = exports.includeStackTraces = exports.MISSING_PHYSICAL_ID_MARKER = exports.CREATE_FAILED_PHYSICAL_ID_MARKER = void 0; -exports.submitResponse = submitResponse; -exports.safeHandler = safeHandler; -exports.redactDataFromPayload = redactDataFromPayload; +exports.Retry = exports.redactDataFromPayload = exports.safeHandler = exports.includeStackTraces = exports.submitResponse = exports.MISSING_PHYSICAL_ID_MARKER = exports.CREATE_FAILED_PHYSICAL_ID_MARKER = void 0; /* eslint-disable max-len */ /* eslint-disable no-console */ const url = require("url"); @@ -45,6 +42,7 @@ async function submitResponse(status, event, options = {}) { }, }, responseBody); } +exports.submitResponse = submitResponse; exports.includeStackTraces = true; // for unit tests function safeHandler(block) { return async (event) => { @@ -88,6 +86,7 @@ function safeHandler(block) { } }; } +exports.safeHandler = safeHandler; function redactDataFromPayload(payload) { // Create a deep copy of the payload object const redactedPayload = JSON.parse(JSON.stringify(payload)); @@ -100,7 +99,8 @@ function redactDataFromPayload(payload) { } return redactedPayload; } +exports.redactDataFromPayload = redactDataFromPayload; class Retry extends Error { } exports.Retry = Retry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YWx0b2dldGhlciBhbmQgZXhpc3QuXG4gICAgICBhd2FpdCBzdWJtaXRSZXNwb25zZSgnRkFJTEVEJywgZXZlbnQsIHtcbiAgICAgICAgcmVhc29uOiBpbmNsdWRlU3RhY2tUcmFjZXMgPyBlLnN0YWNrIDogZS5tZXNzYWdlLFxuICAgICAgfSk7XG4gICAgfVxuICB9O1xufVxuXG5leHBvcnQgZnVuY3Rpb24gcmVkYWN0RGF0YUZyb21QYXlsb2FkKHBheWxvYWQ6IE9uRXZlbnRSZXNwb25zZSkge1xuICAvLyBDcmVhdGUgYSBkZWVwIGNvcHkgb2YgdGhlIHBheWxvYWQgb2JqZWN0XG4gIGNvbnN0IHJlZGFjdGVkUGF5bG9hZDogT25FdmVudFJlc3BvbnNlID0gSlNPTi5wYXJzZShKU09OLnN0cmluZ2lmeShwYXlsb2FkKSk7XG5cbiAgLy8gUmVkYWN0IHRoZSBkYXRhIGluIHRoZSBjb3BpZWQgcGF5bG9hZCBvYmplY3RcbiAgaWYgKHJlZGFjdGVkUGF5bG9hZC5EYXRhKSB7XG4gICAgY29uc3Qga2V5cyA9IE9iamVjdC5rZXlzKHJlZGFjdGVkUGF5bG9hZC5EYXRhKTtcbiAgICBmb3IgKGNvbnN0IGtleSBvZiBrZXlzKSB7XG4gICAgICByZWRhY3RlZFBheWxvYWQuRGF0YVtrZXldID0gJyoqKioqJztcbiAgICB9XG4gIH1cbiAgcmV0dXJuIHJlZGFjdGVkUGF5bG9hZDtcbn1cblxuZXhwb3J0IGNsYXNzIFJldHJ5IGV4dGVuZHMgRXJyb3IgeyB9XG4iXX0= \ No newline at end of file diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-dynamodb/test/integ.global.js.snapshot/asset.fe4094cd52f099e46f858f05efdde02f5de79288c9c783676b3fa53a494d04b5/consts.js b/packages/@aws-cdk-testing/framework-integ/test/aws-dynamodb/test/integ.global.js.snapshot/asset.d320874294f5d626406d5f86087c2a2c8e6efc0aab690c5105572555dc445fd4/consts.js similarity index 100% rename from packages/@aws-cdk-testing/framework-integ/test/aws-dynamodb/test/integ.global.js.snapshot/asset.fe4094cd52f099e46f858f05efdde02f5de79288c9c783676b3fa53a494d04b5/consts.js rename to packages/@aws-cdk-testing/framework-integ/test/aws-dynamodb/test/integ.global.js.snapshot/asset.d320874294f5d626406d5f86087c2a2c8e6efc0aab690c5105572555dc445fd4/consts.js diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-dynamodb/test/integ.global.js.snapshot/asset.fe4094cd52f099e46f858f05efdde02f5de79288c9c783676b3fa53a494d04b5/framework.js b/packages/@aws-cdk-testing/framework-integ/test/aws-dynamodb/test/integ.global.js.snapshot/asset.d320874294f5d626406d5f86087c2a2c8e6efc0aab690c5105572555dc445fd4/framework.js similarity index 100% rename from packages/@aws-cdk-testing/framework-integ/test/aws-dynamodb/test/integ.global.js.snapshot/asset.fe4094cd52f099e46f858f05efdde02f5de79288c9c783676b3fa53a494d04b5/framework.js rename to packages/@aws-cdk-testing/framework-integ/test/aws-dynamodb/test/integ.global.js.snapshot/asset.d320874294f5d626406d5f86087c2a2c8e6efc0aab690c5105572555dc445fd4/framework.js diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-dynamodb/test/integ.global.js.snapshot/asset.fe4094cd52f099e46f858f05efdde02f5de79288c9c783676b3fa53a494d04b5/outbound.js b/packages/@aws-cdk-testing/framework-integ/test/aws-dynamodb/test/integ.global.js.snapshot/asset.d320874294f5d626406d5f86087c2a2c8e6efc0aab690c5105572555dc445fd4/outbound.js similarity index 100% rename from packages/@aws-cdk-testing/framework-integ/test/aws-dynamodb/test/integ.global.js.snapshot/asset.fe4094cd52f099e46f858f05efdde02f5de79288c9c783676b3fa53a494d04b5/outbound.js rename to packages/@aws-cdk-testing/framework-integ/test/aws-dynamodb/test/integ.global.js.snapshot/asset.d320874294f5d626406d5f86087c2a2c8e6efc0aab690c5105572555dc445fd4/outbound.js diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-dynamodb/test/integ.global.js.snapshot/asset.d320874294f5d626406d5f86087c2a2c8e6efc0aab690c5105572555dc445fd4/util.js b/packages/@aws-cdk-testing/framework-integ/test/aws-dynamodb/test/integ.global.js.snapshot/asset.d320874294f5d626406d5f86087c2a2c8e6efc0aab690c5105572555dc445fd4/util.js new file mode 100644 index 0000000000000..55b2075a3efc6 --- /dev/null +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-dynamodb/test/integ.global.js.snapshot/asset.d320874294f5d626406d5f86087c2a2c8e6efc0aab690c5105572555dc445fd4/util.js @@ -0,0 +1,54 @@ +"use strict"; +/* eslint-disable no-console */ +Object.defineProperty(exports, "__esModule", { value: true }); +exports.parseJsonPayload = exports.withRetries = exports.log = exports.getEnv = void 0; +function getEnv(name) { + const value = process.env[name]; + if (!value) { + throw new Error(`The environment variable "${name}" is not defined`); + } + return value; +} +exports.getEnv = getEnv; +function log(title, ...args) { + console.log('[provider-framework]', title, ...args.map(x => typeof (x) === 'object' ? JSON.stringify(x, undefined, 2) : x)); +} +exports.log = log; +function withRetries(options, fn) { + return async (...xs) => { + let attempts = options.attempts; + let ms = options.sleep; + while (true) { + try { + return await fn(...xs); + } + catch (e) { + if (attempts-- <= 0) { + throw e; + } + await sleep(Math.floor(Math.random() * ms)); + ms *= 2; + } + } + }; +} +exports.withRetries = withRetries; +async function sleep(ms) { + return new Promise((ok) => setTimeout(ok, ms)); +} +function parseJsonPayload(payload) { + // sdk v3 returns payloads in Uint8Array, either it or a string or Buffer + // can be cast into a buffer and then decoded. + const text = new TextDecoder().decode(Buffer.from(payload ?? '')); + if (!text) { + return {}; + } + try { + return JSON.parse(text); + } + catch { + throw new Error(`return values from user-handlers must be JSON objects. got: "${text}"`); + } +} +exports.parseJsonPayload = parseJsonPayload; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidXRpbC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbInV0aWwudHMiXSwibmFtZXMiOltdL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cm4gdmFsdWVzIGZyb20gdXNlci1oYW5kbGVycyBtdXN0IGJlIEpTT04gb2JqZWN0cy4gZ290OiBcIiR7dGV4dH1cImApO1xuICB9XG59XG4iXX0= \ No newline at end of file diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-dynamodb/test/integ.global.js.snapshot/asset.fe4094cd52f099e46f858f05efdde02f5de79288c9c783676b3fa53a494d04b5/util.js b/packages/@aws-cdk-testing/framework-integ/test/aws-dynamodb/test/integ.global.js.snapshot/asset.fe4094cd52f099e46f858f05efdde02f5de79288c9c783676b3fa53a494d04b5/util.js deleted file mode 100644 index 5d48e914660a6..0000000000000 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-dynamodb/test/integ.global.js.snapshot/asset.fe4094cd52f099e46f858f05efdde02f5de79288c9c783676b3fa53a494d04b5/util.js +++ /dev/null @@ -1,53 +0,0 @@ -"use strict"; -/* eslint-disable no-console */ -Object.defineProperty(exports, "__esModule", { value: true }); -exports.getEnv = getEnv; -exports.log = log; -exports.withRetries = withRetries; -exports.parseJsonPayload = parseJsonPayload; -function getEnv(name) { - const value = process.env[name]; - if (!value) { - throw new Error(`The environment variable "${name}" is not defined`); - } - return value; -} -function log(title, ...args) { - console.log('[provider-framework]', title, ...args.map(x => typeof (x) === 'object' ? JSON.stringify(x, undefined, 2) : x)); -} -function withRetries(options, fn) { - return async (...xs) => { - let attempts = options.attempts; - let ms = options.sleep; - while (true) { - try { - return await fn(...xs); - } - catch (e) { - if (attempts-- <= 0) { - throw e; - } - await sleep(Math.floor(Math.random() * ms)); - ms *= 2; - } - } - }; -} -async function sleep(ms) { - return new Promise((ok) => setTimeout(ok, ms)); -} -function parseJsonPayload(payload) { - // sdk v3 returns payloads in Uint8Array, either it or a string or Buffer - // can be cast into a buffer and then decoded. - const text = new TextDecoder().decode(Buffer.from(payload ?? '')); - if (!text) { - return {}; - } - try { - return JSON.parse(text); - } - catch { - throw new Error(`return values from user-handlers must be JSON objects. got: "${text}"`); - } -} -//# s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gIHJldHVybiBKU09OLnBhcnNlKHRleHQpO1xuICB9IGNhdGNoIHtcbiAgICB0aHJvdyBuZXcgRXJyb3IoYHJldHVybiB2YWx1ZXMgZnJvbSB1c2VyLWhhbmRsZXJzIG11c3QgYmUgSlNPTiBvYmplY3RzLiBnb3Q6IFwiJHt0ZXh0fVwiYCk7XG4gIH1cbn1cbiJdfQ== \ No newline at end of file diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-dynamodb/test/integ.global.js.snapshot/cdk-dynamodb-global-20191121.assets.json b/packages/@aws-cdk-testing/framework-integ/test/aws-dynamodb/test/integ.global.js.snapshot/cdk-dynamodb-global-20191121.assets.json index 0c61f39a46ea9..6b664160edc05 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-dynamodb/test/integ.global.js.snapshot/cdk-dynamodb-global-20191121.assets.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-dynamodb/test/integ.global.js.snapshot/cdk-dynamodb-global-20191121.assets.json @@ -15,21 +15,21 @@ } } }, - "fe4094cd52f099e46f858f05efdde02f5de79288c9c783676b3fa53a494d04b5": { + "d320874294f5d626406d5f86087c2a2c8e6efc0aab690c5105572555dc445fd4": { "source": { - "path": "asset.fe4094cd52f099e46f858f05efdde02f5de79288c9c783676b3fa53a494d04b5", + "path": "asset.d320874294f5d626406d5f86087c2a2c8e6efc0aab690c5105572555dc445fd4", "packaging": "zip" }, "destinations": { "current_account-eu-west-1": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-eu-west-1", - "objectKey": "fe4094cd52f099e46f858f05efdde02f5de79288c9c783676b3fa53a494d04b5.zip", + "objectKey": "d320874294f5d626406d5f86087c2a2c8e6efc0aab690c5105572555dc445fd4.zip", "region": "eu-west-1", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-eu-west-1" } } }, - "2a35e9c8867f6de99bc9f123e38349cd213903b06bcd5e9ad0245258c3202921": { + "f2907019fda9dfeb6fd40034153c5e79f8fc3b8a5646bd58c29c71642f9f952f": { "source": { "path": "cdkdynamodbglobal20191121awscdkawsdynamodbReplicaProviderB281C954.nested.template.json", "packaging": "file" @@ -37,13 +37,13 @@ "destinations": { "current_account-eu-west-1": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-eu-west-1", - "objectKey": "2a35e9c8867f6de99bc9f123e38349cd213903b06bcd5e9ad0245258c3202921.json", + "objectKey": "f2907019fda9dfeb6fd40034153c5e79f8fc3b8a5646bd58c29c71642f9f952f.json", "region": "eu-west-1", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-eu-west-1" } } }, - "4195866d888f5387343a45215b9e5793827b8e1fd03410a26fd965a2150fda16": { + "e1cdec1737e0f525c0443a4bf9cb7ea018ecadc8e727b7f18c0f8e1a76708582": { "source": { "path": "cdk-dynamodb-global-20191121.template.json", "packaging": "file" @@ -51,7 +51,7 @@ "destinations": { "current_account-eu-west-1": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-eu-west-1", - "objectKey": "4195866d888f5387343a45215b9e5793827b8e1fd03410a26fd965a2150fda16.json", + "objectKey": "e1cdec1737e0f525c0443a4bf9cb7ea018ecadc8e727b7f18c0f8e1a76708582.json", "region": "eu-west-1", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-eu-west-1" } diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-dynamodb/test/integ.global.js.snapshot/cdk-dynamodb-global-20191121.template.json b/packages/@aws-cdk-testing/framework-integ/test/aws-dynamodb/test/integ.global.js.snapshot/cdk-dynamodb-global-20191121.template.json index 91d96e6ce375d..d62f30b51f683 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-dynamodb/test/integ.global.js.snapshot/cdk-dynamodb-global-20191121.template.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-dynamodb/test/integ.global.js.snapshot/cdk-dynamodb-global-20191121.template.json @@ -246,7 +246,7 @@ { "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-eu-west-1" }, - "/2a35e9c8867f6de99bc9f123e38349cd213903b06bcd5e9ad0245258c3202921.json" + "/f2907019fda9dfeb6fd40034153c5e79f8fc3b8a5646bd58c29c71642f9f952f.json" ] ] } diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-dynamodb/test/integ.global.js.snapshot/cdkdynamodbglobal20191121awscdkawsdynamodbReplicaProviderB281C954.nested.template.json b/packages/@aws-cdk-testing/framework-integ/test/aws-dynamodb/test/integ.global.js.snapshot/cdkdynamodbglobal20191121awscdkawsdynamodbReplicaProviderB281C954.nested.template.json index 28064b82e2274..63da8d8984669 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-dynamodb/test/integ.global.js.snapshot/cdkdynamodbglobal20191121awscdkawsdynamodbReplicaProviderB281C954.nested.template.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-dynamodb/test/integ.global.js.snapshot/cdkdynamodbglobal20191121awscdkawsdynamodbReplicaProviderB281C954.nested.template.json @@ -300,7 +300,7 @@ "S3Bucket": { "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-eu-west-1" }, - "S3Key": "fe4094cd52f099e46f858f05efdde02f5de79288c9c783676b3fa53a494d04b5.zip" + "S3Key": "d320874294f5d626406d5f86087c2a2c8e6efc0aab690c5105572555dc445fd4.zip" }, "Description": "AWS CDK resource provider framework - onEvent (cdk-dynamodb-global-20191121/@aws-cdk--aws-dynamodb.ReplicaProvider/Provider)", "Environment": { @@ -437,7 +437,7 @@ "S3Bucket": { "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-eu-west-1" }, - "S3Key": "fe4094cd52f099e46f858f05efdde02f5de79288c9c783676b3fa53a494d04b5.zip" + "S3Key": "d320874294f5d626406d5f86087c2a2c8e6efc0aab690c5105572555dc445fd4.zip" }, "Description": "AWS CDK resource provider framework - isComplete (cdk-dynamodb-global-20191121/@aws-cdk--aws-dynamodb.ReplicaProvider/Provider)", "Environment": { @@ -571,7 +571,7 @@ "S3Bucket": { "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-eu-west-1" }, - "S3Key": "fe4094cd52f099e46f858f05efdde02f5de79288c9c783676b3fa53a494d04b5.zip" + "S3Key": "d320874294f5d626406d5f86087c2a2c8e6efc0aab690c5105572555dc445fd4.zip" }, "Description": "AWS CDK resource provider framework - onTimeout (cdk-dynamodb-global-20191121/@aws-cdk--aws-dynamodb.ReplicaProvider/Provider)", "Environment": { diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-dynamodb/test/integ.global.js.snapshot/manifest.json b/packages/@aws-cdk-testing/framework-integ/test/aws-dynamodb/test/integ.global.js.snapshot/manifest.json index 0d7a6c3151889..3f6a7cb24f382 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-dynamodb/test/integ.global.js.snapshot/manifest.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-dynamodb/test/integ.global.js.snapshot/manifest.json @@ -19,7 +19,7 @@ "notificationArns": [], "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-deploy-role-${AWS::AccountId}-eu-west-1", "cloudFormationExecutionRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-cfn-exec-role-${AWS::AccountId}-eu-west-1", - "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-eu-west-1/4195866d888f5387343a45215b9e5793827b8e1fd03410a26fd965a2150fda16.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-eu-west-1/e1cdec1737e0f525c0443a4bf9cb7ea018ecadc8e727b7f18c0f8e1a76708582.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-dynamodb/test/integ.global.js.snapshot/tree.json b/packages/@aws-cdk-testing/framework-integ/test/aws-dynamodb/test/integ.global.js.snapshot/tree.json index 7a63d191e14d5..9c9dca25a3df0 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-dynamodb/test/integ.global.js.snapshot/tree.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-dynamodb/test/integ.global.js.snapshot/tree.json @@ -859,7 +859,7 @@ "s3Bucket": { "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-eu-west-1" }, - "s3Key": "fe4094cd52f099e46f858f05efdde02f5de79288c9c783676b3fa53a494d04b5.zip" + "s3Key": "d320874294f5d626406d5f86087c2a2c8e6efc0aab690c5105572555dc445fd4.zip" }, "description": "AWS CDK resource provider framework - onEvent (cdk-dynamodb-global-20191121/@aws-cdk--aws-dynamodb.ReplicaProvider/Provider)", "environment": { @@ -1080,7 +1080,7 @@ "s3Bucket": { "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-eu-west-1" }, - "s3Key": "fe4094cd52f099e46f858f05efdde02f5de79288c9c783676b3fa53a494d04b5.zip" + "s3Key": "d320874294f5d626406d5f86087c2a2c8e6efc0aab690c5105572555dc445fd4.zip" }, "description": "AWS CDK resource provider framework - isComplete (cdk-dynamodb-global-20191121/@aws-cdk--aws-dynamodb.ReplicaProvider/Provider)", "environment": { @@ -1298,7 +1298,7 @@ "s3Bucket": { "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-eu-west-1" }, - "s3Key": "fe4094cd52f099e46f858f05efdde02f5de79288c9c783676b3fa53a494d04b5.zip" + "s3Key": "d320874294f5d626406d5f86087c2a2c8e6efc0aab690c5105572555dc445fd4.zip" }, "description": "AWS CDK resource provider framework - onTimeout (cdk-dynamodb-global-20191121/@aws-cdk--aws-dynamodb.ReplicaProvider/Provider)", "environment": { @@ -1652,7 +1652,7 @@ { "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-eu-west-1" }, - "/2a35e9c8867f6de99bc9f123e38349cd213903b06bcd5e9ad0245258c3202921.json" + "/f2907019fda9dfeb6fd40034153c5e79f8fc3b8a5646bd58c29c71642f9f952f.json" ] ] } diff --git a/tools/@aws-cdk/spec2cdk/temporary-schemas/us-east-1/aws-dynamodb-globaltable.json b/tools/@aws-cdk/spec2cdk/temporary-schemas/us-east-1/aws-dynamodb-globaltable.json new file mode 100644 index 0000000000000..948b867c866c0 --- /dev/null +++ b/tools/@aws-cdk/spec2cdk/temporary-schemas/us-east-1/aws-dynamodb-globaltable.json @@ -0,0 +1,643 @@ +{ + "typeName" : "AWS::DynamoDB::GlobalTable", + "description" : "Version: None. Resource Type definition for AWS::DynamoDB::GlobalTable", + "additionalProperties" : false, + "nonPublicProperties": [ + "/properties/WarmThroughput", + "/properties/GlobalSecondaryIndexes/items/properties/WarmThroughput" + ], + "nonPublicDefinitions": [ + "/definitions/WarmThroughput", + "/definitions/GlobalSecondaryIndex/properties/WarmThroughput" + ], + "properties" : { + "Arn" : { + "type" : "string" + }, + "StreamArn" : { + "type" : "string" + }, + "AttributeDefinitions" : { + "type" : "array", + "uniqueItems" : true, + "insertionOrder": false, + "items" : { + "$ref" : "#/definitions/AttributeDefinition" + }, + "minItems": 1 + }, + "BillingMode" : { + "type" : "string" + }, + "GlobalSecondaryIndexes" : { + "type" : "array", + "uniqueItems" : true, + "insertionOrder": false, + "items" : { + "$ref" : "#/definitions/GlobalSecondaryIndex" + } + }, + "KeySchema" : { + "type" : "array", + "uniqueItems" : true, + "items" : { + "$ref" : "#/definitions/KeySchema" + }, + "minItems": 1, + "maxItems": 2 + }, + "LocalSecondaryIndexes" : { + "type" : "array", + "uniqueItems" : true, + "insertionOrder": false, + "items" : { + "$ref" : "#/definitions/LocalSecondaryIndex" + } + }, + "WriteProvisionedThroughputSettings" : { + "$ref" : "#/definitions/WriteProvisionedThroughputSettings" + }, + "WriteOnDemandThroughputSettings" : { + "$ref" : "#/definitions/WriteOnDemandThroughputSettings" + }, + "WarmThroughput" : { + "$ref" : "#/definitions/WarmThroughput" + }, + "Replicas" : { + "type" : "array", + "uniqueItems" : true, + "insertionOrder": false, + "items" : { + "$ref" : "#/definitions/ReplicaSpecification" + }, + "minItems": 1 + }, + "SSESpecification" : { + "$ref" : "#/definitions/SSESpecification" + }, + "StreamSpecification" : { + "$ref" : "#/definitions/StreamSpecification" + }, + "TableName" : { + "type" : "string" + }, + "TableId" : { + "type" : "string" + }, + "TimeToLiveSpecification" : { + "$ref" : "#/definitions/TimeToLiveSpecification" + } + }, + "definitions" : { + "StreamSpecification" : { + "type" : "object", + "additionalProperties" : false, + "properties" : { + "StreamViewType" : { + "type" : "string" + } + }, + "required" : [ "StreamViewType" ] + }, + "ResourcePolicy" : { + "type" : "object", + "additionalProperties" : false, + "properties" : { + "PolicyDocument": { + "type": "object" + } + }, + "required" : [ "PolicyDocument" ] + }, + "ReplicaStreamSpecification" : { + "type" : "object", + "additionalProperties" : false, + "properties" : { + "ResourcePolicy": { + "$ref": "#/definitions/ResourcePolicy" + } + }, + "required" : [ "ResourcePolicy" ] + }, + "KinesisStreamSpecification" : { + "type" : "object", + "additionalProperties" : false, + "properties" : { + "StreamArn" : { + "type" : "string", + "relationshipRef": { + "typeName": "AWS::Kinesis::Stream", + "propertyPath": "/properties/Arn" + } + }, + "ApproximateCreationDateTimePrecision" : { + "type": "string", + "enum": [ + "MICROSECOND", + "MILLISECOND" + ] + } + }, + "required" : [ "StreamArn" ] + }, + "KeySchema" : { + "type" : "object", + "additionalProperties" : false, + "properties" : { + "AttributeName" : { + "type" : "string", + "minLength": 1, + "maxLength": 255 + }, + "KeyType" : { + "type" : "string" + } + }, + "required" : [ "KeyType", "AttributeName" ] + }, + "PointInTimeRecoverySpecification" : { + "type" : "object", + "additionalProperties" : false, + "properties" : { + "PointInTimeRecoveryEnabled" : { + "type" : "boolean" + } + } + }, + "ReplicaSpecification": { + "type" : "object", + "additionalProperties" : false, + "properties" : { + "Region" : { + "type" : "string" + }, + "GlobalSecondaryIndexes": { + "type" : "array", + "uniqueItems" : true, + "insertionOrder": false, + "items" : { + "$ref": "#/definitions/ReplicaGlobalSecondaryIndexSpecification" + } + }, + "ContributorInsightsSpecification": { + "$ref": "#/definitions/ContributorInsightsSpecification" + }, + "PointInTimeRecoverySpecification" : { + "$ref" : "#/definitions/PointInTimeRecoverySpecification" + }, + "TableClass" : { + "type" : "string" + }, + "DeletionProtectionEnabled" : { + "type" : "boolean" + }, + "SSESpecification": { + "$ref": "#/definitions/ReplicaSSESpecification" + }, + "Tags" : { + "type": "array", + "insertionOrder": false, + "uniqueItems": true, + "items": { + "$ref": "#/definitions/Tag" + } + }, + "ReadProvisionedThroughputSettings": { + "$ref": "#/definitions/ReadProvisionedThroughputSettings" + }, + "ReadOnDemandThroughputSettings": { + "$ref": "#/definitions/ReadOnDemandThroughputSettings" + }, + "KinesisStreamSpecification": { + "$ref": "#/definitions/KinesisStreamSpecification" + }, + "ResourcePolicy": { + "$ref": "#/definitions/ResourcePolicy" + }, + "ReplicaStreamSpecification": { + "$ref": "#/definitions/ReplicaStreamSpecification" + } + }, + "required" : [ "Region" ] + + }, + "TimeToLiveSpecification" : { + "type" : "object", + "additionalProperties" : false, + "properties" : { + "AttributeName" : { + "type" : "string" + }, + "Enabled" : { + "type" : "boolean" + } + }, + "required" : [ "Enabled" ] + }, + "LocalSecondaryIndex" : { + "type" : "object", + "additionalProperties" : false, + "properties" : { + "IndexName" : { + "type" : "string", + "minLength": 3, + "maxLength": 255 + }, + "KeySchema" : { + "type" : "array", + "uniqueItems" : true, + "items" : { + "$ref" : "#/definitions/KeySchema" + }, + "maxItems": 2 + }, + "Projection" : { + "$ref" : "#/definitions/Projection" + } + }, + "required" : [ "IndexName", "Projection", "KeySchema" ] + }, + "GlobalSecondaryIndex" : { + "type" : "object", + "additionalProperties" : false, + "properties" : { + "IndexName" : { + "type" : "string", + "minLength": 3, + "maxLength": 255 + }, + "KeySchema" : { + "type" : "array", + "uniqueItems" : true, + "items" : { + "$ref" : "#/definitions/KeySchema" + }, + "minItems": 1, + "maxItems": 2 + }, + "Projection" : { + "$ref" : "#/definitions/Projection" + }, + "WriteProvisionedThroughputSettings" : { + "$ref" : "#/definitions/WriteProvisionedThroughputSettings" + }, + "WriteOnDemandThroughputSettings" : { + "$ref" : "#/definitions/WriteOnDemandThroughputSettings" + }, + "WarmThroughput": { + "$ref": "#/definitions/WarmThroughput" + } + }, + "required" : [ "IndexName", "Projection", "KeySchema" ] + }, + "SSESpecification" : { + "type" : "object", + "additionalProperties" : false, + "properties" : { + "SSEEnabled" : { + "type" : "boolean" + }, + "SSEType" : { + "type" : "string" + } + }, + "required" : [ "SSEEnabled" ] + }, + "ReplicaSSESpecification" : { + "type" : "object", + "additionalProperties" : false, + "properties" : { + "KMSMasterKeyId" : { + "type" : "string", + "anyOf": [{ + "relationshipRef": { + "typeName": "AWS::KMS::Key", + "propertyPath": "/properties/Arn" + }},{ + "relationshipRef": { + "typeName": "AWS::KMS::Key", + "propertyPath": "/properties/KeyId" + }},{ + "relationshipRef": { + "typeName": "AWS::KMS::Alias", + "propertyPath": "/properties/AliasName" + } + }] + } + }, + "required" : [ "KMSMasterKeyId" ] + }, + "AttributeDefinition" : { + "type" : "object", + "additionalProperties" : false, + "properties" : { + "AttributeName" : { + "type" : "string", + "minLength": 1, + "maxLength": 255 + }, + "AttributeType" : { + "type" : "string" + } + }, + "required" : [ "AttributeName", "AttributeType" ] + }, + "Tag" : { + "type" : "object", + "additionalProperties" : false, + "properties" : { + "Key" : { + "type" : "string" + }, + "Value" : { + "type" : "string" + } + }, + "required" : [ "Value", "Key" ] + }, + "Projection" : { + "type" : "object", + "additionalProperties" : false, + "properties" : { + "NonKeyAttributes" : { + "type" : "array", + "uniqueItems" : true, + "insertionOrder": false, + "items" : { + "type" : "string" + }, + "maxItems": 20 + }, + "ProjectionType" : { + "type" : "string" + } + } + }, + "ReplicaGlobalSecondaryIndexSpecification": { + "type": "object", + "additionalProperties": false, + "properties": { + "IndexName" : { + "type" : "string", + "minLength": 3, + "maxLength": 255 + }, + "ContributorInsightsSpecification": { + "$ref": "#/definitions/ContributorInsightsSpecification" + }, + "ReadProvisionedThroughputSettings": { + "$ref": "#/definitions/ReadProvisionedThroughputSettings" + }, + "ReadOnDemandThroughputSettings": { + "$ref": "#/definitions/ReadOnDemandThroughputSettings" + } + }, + "required" : [ "IndexName" ] + }, + "ContributorInsightsSpecification": { + "type": "object", + "additionalProperties": false, + "properties": { + "Enabled": { + "type": "boolean" + } + }, + "required" : [ "Enabled" ] + }, + "ReadProvisionedThroughputSettings": { + "type": "object", + "additionalProperties": false, + "properties": { + "ReadCapacityUnits" : { + "type" : "integer", + "minimum": 1 + }, + "ReadCapacityAutoScalingSettings": { + "$ref" : "#/definitions/CapacityAutoScalingSettings" + } + } + }, + "WriteProvisionedThroughputSettings": { + "type": "object", + "additionalProperties": false, + "properties": { + "WriteCapacityAutoScalingSettings": { + "$ref": "#/definitions/CapacityAutoScalingSettings" + } + } + }, + "ReadOnDemandThroughputSettings": { + "type": "object", + "additionalProperties": false, + "properties": { + "MaxReadRequestUnits" : { + "type" : "integer", + "minimum": 1 + } + } + }, + "WriteOnDemandThroughputSettings": { + "type": "object", + "additionalProperties": false, + "properties": { + "MaxWriteRequestUnits" : { + "type" : "integer", + "minimum": 1 + } + } + }, + "CapacityAutoScalingSettings": { + "type": "object", + "additionalProperties": false, + "properties": { + "MinCapacity": { + "type": "integer", + "minimum": 1 + }, + "MaxCapacity": { + "type": "integer", + "minimum": 1 + }, + "SeedCapacity": { + "type": "integer", + "minimum": 1 + }, + "TargetTrackingScalingPolicyConfiguration" : { + "$ref": "#/definitions/TargetTrackingScalingPolicyConfiguration" + } + }, + "required": [ "MinCapacity", "MaxCapacity", "TargetTrackingScalingPolicyConfiguration" ] + }, + "TargetTrackingScalingPolicyConfiguration": { + "type": "object", + "additionalProperties": false, + "properties": { + "DisableScaleIn": { + "type": "boolean" + }, + "ScaleInCooldown": { + "type": "integer", + "minimum": 0 + }, + "ScaleOutCooldown": { + "type": "integer", + "minimum": 0 + }, + "TargetValue": { + "type": "number", + "format": "double" + } + }, + "required": [ "TargetValue" ] + }, + "WarmThroughput" : { + "type" : "object", + "additionalProperties" : false, + "properties" : { + "ReadUnitsPerSecond" : { + "type" : "integer", + "minimum": 1 + }, + "WriteUnitsPerSecond" : { + "type" : "integer", + "minimum": 1 + } + }, + "anyOf": [ + {"required": ["ReadUnitsPerSecond"]}, + {"required": ["WriteUnitsPerSecond"]} + ] + } + }, + "required" : [ "KeySchema", "AttributeDefinitions", "Replicas" ], + "readOnlyProperties" : [ "/properties/Arn", "/properties/StreamArn", "/properties/TableId" ], + "createOnlyProperties" : [ "/properties/LocalSecondaryIndexes", "/properties/TableName", "/properties/KeySchema" ], + "primaryIdentifier" : [ "/properties/TableName" ], + "additionalIdentifiers" : [[ "/properties/Arn"], ["/properties/StreamArn" ]], + "writeOnlyProperties": [ + "/properties/Replicas/*/ReadProvisionedThroughputSettings/ReadCapacityAutoScalingSettings/SeedCapacity", + "/properties/Replicas/*/GlobalSecondaryIndexes/*/ReadProvisionedThroughputSettings/ReadCapacityAutoScalingSettings/SeedCapacity", + "/properties/WriteProvisionedThroughputSettings/WriteCapacityAutoScalingSettings/SeedCapacity", + "/properties/GlobalSecondaryIndexes/*/WriteProvisionedThroughputSettings/WriteCapacityAutoScalingSettings/SeedCapacity" + ], + "handlers": { + "create": { + "permissions": [ + "dynamodb:CreateTable", + "dynamodb:CreateTableReplica", + "dynamodb:Describe*", + "dynamodb:UpdateTimeToLive", + "dynamodb:UpdateContributorInsights", + "dynamodb:UpdateContinuousBackups", + "dynamodb:ListTagsOfResource", + "dynamodb:Query", + "dynamodb:Scan", + "dynamodb:UpdateItem", + "dynamodb:PutItem", + "dynamodb:GetItem", + "dynamodb:DeleteItem", + "dynamodb:BatchWriteItem", + "dynamodb:TagResource", + "dynamodb:EnableKinesisStreamingDestination", + "dynamodb:DisableKinesisStreamingDestination", + "dynamodb:UpdateTableReplicaAutoScaling", + "dynamodb:TagResource", + "dynamodb:GetResourcePolicy", + "dynamodb:PutResourcePolicy", + "application-autoscaling:DeleteScalingPolicy", + "application-autoscaling:DeleteScheduledAction", + "application-autoscaling:DeregisterScalableTarget", + "application-autoscaling:Describe*", + "application-autoscaling:PutScalingPolicy", + "application-autoscaling:PutScheduledAction", + "application-autoscaling:RegisterScalableTarget", + "kinesis:ListStreams", + "kinesis:DescribeStream", + "kinesis:PutRecords", + "kms:CreateGrant", + "kms:DescribeKey", + "kms:ListAliases", + "kms:Decrypt", + "kms:RevokeGrant", + "cloudwatch:PutMetricData", + "iam:CreateServiceLinkedRole" + ] + }, + "read": { + "permissions": [ + "dynamodb:Describe*", + "dynamodb:GetResourcePolicy", + "application-autoscaling:Describe*", + "cloudwatch:PutMetricData", + "dynamodb:ListTagsOfResource", + "kms:DescribeKey" + ] + }, + "update": { + "permissions": [ + "dynamodb:Describe*", + "dynamodb:CreateTableReplica", + "dynamodb:UpdateTable", + "dynamodb:UpdateTimeToLive", + "dynamodb:UpdateContinuousBackups", + "dynamodb:UpdateContributorInsights", + "dynamodb:ListTagsOfResource", + "dynamodb:Query", + "dynamodb:Scan", + "dynamodb:UpdateItem", + "dynamodb:PutItem", + "dynamodb:GetItem", + "dynamodb:DeleteItem", + "dynamodb:BatchWriteItem", + "dynamodb:DeleteTable", + "dynamodb:DeleteTableReplica", + "dynamodb:UpdateItem", + "dynamodb:TagResource", + "dynamodb:UntagResource", + "dynamodb:EnableKinesisStreamingDestination", + "dynamodb:DisableKinesisStreamingDestination", + "dynamodb:UpdateTableReplicaAutoScaling", + "dynamodb:UpdateKinesisStreamingDestination", + "dynamodb:GetResourcePolicy", + "dynamodb:PutResourcePolicy", + "dynamodb:DeleteResourcePolicy", + "application-autoscaling:DeleteScalingPolicy", + "application-autoscaling:DeleteScheduledAction", + "application-autoscaling:DeregisterScalableTarget", + "application-autoscaling:Describe*", + "application-autoscaling:PutScalingPolicy", + "application-autoscaling:PutScheduledAction", + "application-autoscaling:RegisterScalableTarget", + "kinesis:ListStreams", + "kinesis:DescribeStream", + "kinesis:PutRecords", + "kms:CreateGrant", + "kms:DescribeKey", + "kms:ListAliases", + "kms:RevokeGrant", + "cloudwatch:PutMetricData" + ], + "timeoutInMinutes": 1200 + }, + "delete": { + "permissions": [ + "dynamodb:Describe*", + "dynamodb:DeleteTable", + "application-autoscaling:DeleteScalingPolicy", + "application-autoscaling:DeleteScheduledAction", + "application-autoscaling:DeregisterScalableTarget", + "application-autoscaling:Describe*", + "application-autoscaling:PutScalingPolicy", + "application-autoscaling:PutScheduledAction", + "application-autoscaling:RegisterScalableTarget" + ] + }, + "list": { + "permissions": [ + "dynamodb:ListTables", + "cloudwatch:PutMetricData" + ] + } + } + } + \ No newline at end of file diff --git a/tools/@aws-cdk/spec2cdk/temporary-schemas/us-east-1/aws-dynamodb-table.json b/tools/@aws-cdk/spec2cdk/temporary-schemas/us-east-1/aws-dynamodb-table.json new file mode 100644 index 0000000000000..ad9fe876c4bac --- /dev/null +++ b/tools/@aws-cdk/spec2cdk/temporary-schemas/us-east-1/aws-dynamodb-table.json @@ -0,0 +1,588 @@ +{ + "typeName" : "AWS::DynamoDB::Table", + "description" : "Version: None. Resource Type definition for AWS::DynamoDB::Table", + "additionalProperties" : false, + "nonPublicProperties": [ + "/properties/DynamoDBEndpoint", + "/properties/WarmThroughput", + "/properties/GlobalSecondaryIndexes/items/properties/WarmThroughput" + ], + "nonPublicDefinitions": [ + "/definitions/WarmThroughput", + "/definitions/GlobalSecondaryIndex/properties/WarmThroughput" + ], + "properties" : { + "Arn" : { + "type" : "string" + }, + "StreamArn" : { + "type" : "string" + }, + "AttributeDefinitions" : { + "type" : "array", + "uniqueItems" : true, + "items" : { + "$ref" : "#/definitions/AttributeDefinition" + } + }, + "BillingMode" : { + "type" : "string" + }, + "DynamoDBEndpoint" : { + "type" : "string" + }, + "DeletionProtectionEnabled" : { + "type" : "boolean" + }, + "GlobalSecondaryIndexes" : { + "type" : "array", + "uniqueItems" : false, + "items" : { + "$ref" : "#/definitions/GlobalSecondaryIndex" + } + }, + "KeySchema" : { + "oneOf": [ + { + "type" : "array", + "uniqueItems" : true, + "items" : { + "$ref" : "#/definitions/KeySchema" + } + }, + { + "type": "object" + } + ] + }, + "LocalSecondaryIndexes" : { + "type" : "array", + "uniqueItems" : false, + "items" : { + "$ref" : "#/definitions/LocalSecondaryIndex" + } + }, + "OnDemandThroughput" : { + "$ref" : "#/definitions/OnDemandThroughput" + }, + "WarmThroughput" : { + "$ref" : "#/definitions/WarmThroughput" + }, + "PointInTimeRecoverySpecification" : { + "$ref" : "#/definitions/PointInTimeRecoverySpecification" + }, + "TableClass" : { + "type" : "string" + }, + "ProvisionedThroughput" : { + "$ref" : "#/definitions/ProvisionedThroughput" + }, + "SSESpecification" : { + "$ref" : "#/definitions/SSESpecification" + }, + "StreamSpecification" : { + "$ref" : "#/definitions/StreamSpecification" + }, + "TableName" : { + "type" : "string" + }, + "Tags" : { + "type" : "array", + "uniqueItems" : false, + "items" : { + "$ref" : "#/definitions/Tag" + } + }, + "TimeToLiveSpecification" : { + "$ref" : "#/definitions/TimeToLiveSpecification" + }, + "ContributorInsightsSpecification": { + "$ref": "#/definitions/ContributorInsightsSpecification" + }, + "KinesisStreamSpecification": { + "$ref": "#/definitions/KinesisStreamSpecification" + }, + "ImportSourceSpecification" : { + "$ref": "#/definitions/ImportSourceSpecification" + }, + "ResourcePolicy": { + "$ref": "#/definitions/ResourcePolicy" + } + }, + "propertyTransform": { + "/properties/SSESpecification/KMSMasterKeyId": "$join([\"arn:aws(-[a-z]{1,4}){0,2}:kms:[a-z]{2,4}(-[a-z]{1,4})?-[a-z]{1,10}-[0-9]:[0-9]{12}:key\\/\", SSESpecification.KMSMasterKeyId]) $OR $join([\"arn:aws(-[a-z]{1,4}){0,2}:kms:[a-z]{2,4}(-[a-z]{1,4})?-[a-z]{1,10}-[0-9]:[0-9]{12}:key\\/\", KMSMasterKeyId])" + }, + "definitions" : { + "StreamSpecification" : { + "type" : "object", + "additionalProperties" : false, + "properties" : { + "StreamViewType" : { + "type" : "string" + }, + "ResourcePolicy": { + "$ref": "#/definitions/ResourcePolicy" + } + }, + "required" : [ "StreamViewType" ] + }, + "DeprecatedKeySchema" : { + "type" : "object", + "additionalProperties" : false, + "properties" : { + "HashKeyElement" : { + "$ref" : "#/definitions/DeprecatedHashKeyElement" + } + }, + "required" : [ "HashKeyElement" ] + }, + "DeprecatedHashKeyElement" : { + "type" : "object", + "additionalProperties" : false, + "properties" : { + "AttributeType" : { + "type" : "string" + }, + "AttributeName" : { + "type" : "string" + } + }, + "required" : [ "AttributeType", "AttributeName" ] + }, + "KeySchema" : { + "type" : "object", + "additionalProperties" : false, + "properties" : { + "AttributeName" : { + "type" : "string" + }, + "KeyType" : { + "type" : "string" + } + }, + "required" : [ "KeyType", "AttributeName" ] + }, + "PointInTimeRecoverySpecification" : { + "type" : "object", + "additionalProperties" : false, + "properties" : { + "PointInTimeRecoveryEnabled" : { + "type" : "boolean" + } + } + }, + "KinesisStreamSpecification" : { + "type" : "object", + "additionalProperties" : false, + "properties" : { + "StreamArn" : { + "type" : "string", + "relationshipRef": { + "typeName": "AWS::Kinesis::Stream", + "propertyPath": "/properties/Arn" + } + }, + "ApproximateCreationDateTimePrecision" : { + "type": "string", + "enum": [ + "MICROSECOND", + "MILLISECOND" + ] + } + }, + "required" : [ "StreamArn" ] + }, + "TimeToLiveSpecification" : { + "type" : "object", + "additionalProperties" : false, + "properties" : { + "AttributeName" : { + "type" : "string" + }, + "Enabled" : { + "type" : "boolean" + } + }, + "required" : [ "Enabled" ] + }, + "LocalSecondaryIndex" : { + "type" : "object", + "additionalProperties" : false, + "properties" : { + "IndexName" : { + "type" : "string" + }, + "KeySchema" : { + "type" : "array", + "uniqueItems" : true, + "items" : { + "$ref" : "#/definitions/KeySchema" + } + }, + "Projection" : { + "$ref" : "#/definitions/Projection" + } + }, + "required" : [ "IndexName", "Projection", "KeySchema" ] + }, + "GlobalSecondaryIndex" : { + "type" : "object", + "additionalProperties" : false, + "properties" : { + "IndexName" : { + "type" : "string" + }, + "KeySchema" : { + "type" : "array", + "uniqueItems" : true, + "items" : { + "$ref" : "#/definitions/KeySchema" + } + }, + "Projection" : { + "$ref" : "#/definitions/Projection" + }, + "ProvisionedThroughput" : { + "$ref" : "#/definitions/ProvisionedThroughput" + }, + "OnDemandThroughput" : { + "$ref" : "#/definitions/OnDemandThroughput" + }, + "WarmThroughput" : { + "$ref" : "#/definitions/WarmThroughput" + }, + "ContributorInsightsSpecification": { + "$ref": "#/definitions/ContributorInsightsSpecification" + } + }, + "required" : [ "IndexName", "Projection", "KeySchema" ] + }, + "OnDemandThroughput" : { + "type" : "object", + "additionalProperties" : false, + "properties" : { + "MaxReadRequestUnits" : { + "type" : "integer", + "minimum": 1 + }, + "MaxWriteRequestUnits" : { + "type" : "integer", + "minimum": 1 + } + } + }, + "WarmThroughput" : { + "type" : "object", + "additionalProperties" : false, + "properties" : { + "ReadUnitsPerSecond" : { + "type" : "integer", + "minimum": 1 + }, + "WriteUnitsPerSecond" : { + "type" : "integer", + "minimum": 1 + } + }, + "anyOf": [ + {"required": ["ReadUnitsPerSecond"]}, + {"required": ["WriteUnitsPerSecond"]} + ] + }, + "SSESpecification" : { + "type" : "object", + "additionalProperties" : false, + "properties" : { + "KMSMasterKeyId" : { + "type" : "string", + "anyOf": [{ + "relationshipRef": { + "typeName": "AWS::KMS::Key", + "propertyPath": "/properties/Arn" + }},{ + "relationshipRef": { + "typeName": "AWS::KMS::Key", + "propertyPath": "/properties/KeyId" + }}, { + "relationshipRef": { + "typeName": "AWS::KMS::Alias", + "propertyPath": "/properties/AliasName" + } + }] + }, + "SSEEnabled" : { + "type" : "boolean" + }, + "SSEType" : { + "type" : "string" + } + }, + "required" : [ "SSEEnabled" ] + }, + "AttributeDefinition" : { + "type" : "object", + "additionalProperties" : false, + "properties" : { + "AttributeName" : { + "type" : "string" + }, + "AttributeType" : { + "type" : "string" + } + }, + "required" : [ "AttributeName", "AttributeType" ] + }, + "ProvisionedThroughput" : { + "type" : "object", + "additionalProperties" : false, + "properties" : { + "ReadCapacityUnits" : { + "type" : "integer" + }, + "WriteCapacityUnits" : { + "type" : "integer" + } + }, + "required" : [ "WriteCapacityUnits", "ReadCapacityUnits" ] + }, + "Tag" : { + "type" : "object", + "additionalProperties" : false, + "properties" : { + "Key" : { + "type" : "string" + }, + "Value" : { + "type" : "string" + } + }, + "required" : [ "Value", "Key" ] + }, + "Projection" : { + "type" : "object", + "additionalProperties" : false, + "properties" : { + "NonKeyAttributes" : { + "type" : "array", + "uniqueItems" : false, + "items" : { + "type" : "string" + } + }, + "ProjectionType" : { + "type" : "string" + } + } + }, + "ContributorInsightsSpecification": { + "type": "object", + "additionalProperties": false, + "properties": { + "Enabled": { + "type": "boolean" + } + }, + "required" : [ "Enabled" ] + }, + "ImportSourceSpecification" : { + "type" : "object", + "additionalProperties" : false, + "properties" : { + "S3BucketSource" : { + "$ref" : "#/definitions/S3BucketSource" + }, + "InputFormat" : { + "type" : "string" + }, + "InputFormatOptions" : { + "$ref" : "#/definitions/InputFormatOptions" + }, + "InputCompressionType" : { + "type" : "string" + } + }, + "required" : [ + "S3BucketSource", + "InputFormat" + ] + }, + "S3BucketSource" : { + "type" : "object", + "additionalProperties" : false, + "properties" : { + "S3BucketOwner" : { + "type" : "string" + }, + "S3Bucket" : { + "type" : "string", + "relationshipRef": { + "typeName": "AWS::S3::Bucket", + "propertyPath": "/properties/BucketName" + } + }, + "S3KeyPrefix" : { + "type" : "string" + } + }, + "required" : [ + "S3Bucket" + ] + }, + "InputFormatOptions" : { + "type" : "object", + "additionalProperties" : false, + "properties" : { + "Csv" : { + "$ref" : "#/definitions/Csv" + } + } + }, + "Csv" : { + "type" : "object", + "additionalProperties" : false, + "properties" : { + "HeaderList" : { + "type" : "array", + "uniqueItems" : true, + "items" : { + "type" : "string" + } + }, + "Delimiter" : { + "type" : "string" + } + } + }, + "ResourcePolicy": { + "type": "object", + "additionalProperties": false, + "properties": { + "PolicyDocument": { + "type": "object" + } + }, + "required": [ + "PolicyDocument" + ] + } + }, + "tagging": { + "taggable": true, + "tagOnCreate": true, + "tagUpdatable": true, + "cloudFormationSystemTags": false, + "tagProperty": "/properties/Tags", + "permissions": [ + "dynamodb:TagResource", + "dynamodb:UntagResource", + "dynamodb:ListTagsOfResource" + ] + }, + "required" : [ "KeySchema" ], + "readOnlyProperties" : [ "/properties/Arn", "/properties/StreamArn" ], + "createOnlyProperties" : [ + "/properties/TableName", + "/properties/DynamoDBEndpoint", + "/properties/ImportSourceSpecification" + ], + "primaryIdentifier" : [ "/properties/TableName" ], + "writeOnlyProperties": [ + "/properties/ImportSourceSpecification" + ], + "handlers": { + "create": { + "permissions": [ + "dynamodb:CreateTable", + "dynamodb:DescribeImport", + "dynamodb:DescribeTable", + "dynamodb:DescribeTimeToLive", + "dynamodb:UpdateTimeToLive", + "dynamodb:UpdateContributorInsights", + "dynamodb:UpdateContinuousBackups", + "dynamodb:DescribeContinuousBackups", + "dynamodb:DescribeContributorInsights", + "dynamodb:EnableKinesisStreamingDestination", + "dynamodb:DisableKinesisStreamingDestination", + "dynamodb:DescribeKinesisStreamingDestination", + "dynamodb:ImportTable", + "dynamodb:ListTagsOfResource", + "dynamodb:TagResource", + "dynamodb:UpdateTable", + "dynamodb:GetResourcePolicy", + "dynamodb:PutResourcePolicy", + "kinesis:DescribeStream", + "kinesis:PutRecords", + "iam:CreateServiceLinkedRole", + "kms:CreateGrant", + "kms:Decrypt", + "kms:DescribeKey", + "kms:ListAliases", + "kms:Encrypt", + "kms:RevokeGrant", + "logs:CreateLogGroup", + "logs:CreateLogStream", + "logs:DescribeLogGroups", + "logs:DescribeLogStreams", + "logs:PutLogEvents", + "logs:PutRetentionPolicy", + "s3:GetObject", + "s3:GetObjectMetadata", + "s3:ListBucket" + ], + "timeoutInMinutes": 720 + }, + "read": { + "permissions": [ + "dynamodb:DescribeTable", + "dynamodb:DescribeContinuousBackups", + "dynamodb:DescribeContributorInsights", + "dynamodb:DescribeKinesisStreamingDestination", + "dynamodb:ListTagsOfResource", + "dynamodb:GetResourcePolicy" + ] + }, + "update": { + "permissions": [ + "dynamodb:UpdateTable", + "dynamodb:DescribeTable", + "dynamodb:DescribeTimeToLive", + "dynamodb:UpdateTimeToLive", + "dynamodb:UpdateContinuousBackups", + "dynamodb:UpdateContributorInsights", + "dynamodb:UpdateKinesisStreamingDestination", + "dynamodb:DescribeContinuousBackups", + "dynamodb:DescribeKinesisStreamingDestination", + "dynamodb:ListTagsOfResource", + "dynamodb:TagResource", + "dynamodb:UntagResource", + "dynamodb:DescribeContributorInsights", + "dynamodb:EnableKinesisStreamingDestination", + "dynamodb:DisableKinesisStreamingDestination", + "dynamodb:GetResourcePolicy", + "dynamodb:PutResourcePolicy", + "dynamodb:DeleteResourcePolicy", + "kinesis:DescribeStream", + "kinesis:PutRecords", + "iam:CreateServiceLinkedRole", + "kms:CreateGrant", + "kms:DescribeKey", + "kms:ListAliases", + "kms:RevokeGrant" + ], + "timeoutInMinutes": 720 + }, + "delete": { + "permissions": [ + "dynamodb:DeleteTable", + "dynamodb:DescribeTable" + ], + "timeoutInMinutes": 720 + }, + "list": { + "permissions": [ + "dynamodb:ListTables" + ] + } + } + } + \ No newline at end of file From 92d6f2fb20e1c3c46090ad699d6897814d367d1a Mon Sep 17 00:00:00 2001 From: Lee Hannigan Date: Thu, 14 Nov 2024 23:26:25 +0000 Subject: [PATCH 3/4] remove temp schema --- .../us-east-1/aws-dynamodb-globaltable.json | 643 ------------------ .../us-east-1/aws-dynamodb-table.json | 588 ---------------- 2 files changed, 1231 deletions(-) delete mode 100644 tools/@aws-cdk/spec2cdk/temporary-schemas/us-east-1/aws-dynamodb-globaltable.json delete mode 100644 tools/@aws-cdk/spec2cdk/temporary-schemas/us-east-1/aws-dynamodb-table.json diff --git a/tools/@aws-cdk/spec2cdk/temporary-schemas/us-east-1/aws-dynamodb-globaltable.json b/tools/@aws-cdk/spec2cdk/temporary-schemas/us-east-1/aws-dynamodb-globaltable.json deleted file mode 100644 index 948b867c866c0..0000000000000 --- a/tools/@aws-cdk/spec2cdk/temporary-schemas/us-east-1/aws-dynamodb-globaltable.json +++ /dev/null @@ -1,643 +0,0 @@ -{ - "typeName" : "AWS::DynamoDB::GlobalTable", - "description" : "Version: None. Resource Type definition for AWS::DynamoDB::GlobalTable", - "additionalProperties" : false, - "nonPublicProperties": [ - "/properties/WarmThroughput", - "/properties/GlobalSecondaryIndexes/items/properties/WarmThroughput" - ], - "nonPublicDefinitions": [ - "/definitions/WarmThroughput", - "/definitions/GlobalSecondaryIndex/properties/WarmThroughput" - ], - "properties" : { - "Arn" : { - "type" : "string" - }, - "StreamArn" : { - "type" : "string" - }, - "AttributeDefinitions" : { - "type" : "array", - "uniqueItems" : true, - "insertionOrder": false, - "items" : { - "$ref" : "#/definitions/AttributeDefinition" - }, - "minItems": 1 - }, - "BillingMode" : { - "type" : "string" - }, - "GlobalSecondaryIndexes" : { - "type" : "array", - "uniqueItems" : true, - "insertionOrder": false, - "items" : { - "$ref" : "#/definitions/GlobalSecondaryIndex" - } - }, - "KeySchema" : { - "type" : "array", - "uniqueItems" : true, - "items" : { - "$ref" : "#/definitions/KeySchema" - }, - "minItems": 1, - "maxItems": 2 - }, - "LocalSecondaryIndexes" : { - "type" : "array", - "uniqueItems" : true, - "insertionOrder": false, - "items" : { - "$ref" : "#/definitions/LocalSecondaryIndex" - } - }, - "WriteProvisionedThroughputSettings" : { - "$ref" : "#/definitions/WriteProvisionedThroughputSettings" - }, - "WriteOnDemandThroughputSettings" : { - "$ref" : "#/definitions/WriteOnDemandThroughputSettings" - }, - "WarmThroughput" : { - "$ref" : "#/definitions/WarmThroughput" - }, - "Replicas" : { - "type" : "array", - "uniqueItems" : true, - "insertionOrder": false, - "items" : { - "$ref" : "#/definitions/ReplicaSpecification" - }, - "minItems": 1 - }, - "SSESpecification" : { - "$ref" : "#/definitions/SSESpecification" - }, - "StreamSpecification" : { - "$ref" : "#/definitions/StreamSpecification" - }, - "TableName" : { - "type" : "string" - }, - "TableId" : { - "type" : "string" - }, - "TimeToLiveSpecification" : { - "$ref" : "#/definitions/TimeToLiveSpecification" - } - }, - "definitions" : { - "StreamSpecification" : { - "type" : "object", - "additionalProperties" : false, - "properties" : { - "StreamViewType" : { - "type" : "string" - } - }, - "required" : [ "StreamViewType" ] - }, - "ResourcePolicy" : { - "type" : "object", - "additionalProperties" : false, - "properties" : { - "PolicyDocument": { - "type": "object" - } - }, - "required" : [ "PolicyDocument" ] - }, - "ReplicaStreamSpecification" : { - "type" : "object", - "additionalProperties" : false, - "properties" : { - "ResourcePolicy": { - "$ref": "#/definitions/ResourcePolicy" - } - }, - "required" : [ "ResourcePolicy" ] - }, - "KinesisStreamSpecification" : { - "type" : "object", - "additionalProperties" : false, - "properties" : { - "StreamArn" : { - "type" : "string", - "relationshipRef": { - "typeName": "AWS::Kinesis::Stream", - "propertyPath": "/properties/Arn" - } - }, - "ApproximateCreationDateTimePrecision" : { - "type": "string", - "enum": [ - "MICROSECOND", - "MILLISECOND" - ] - } - }, - "required" : [ "StreamArn" ] - }, - "KeySchema" : { - "type" : "object", - "additionalProperties" : false, - "properties" : { - "AttributeName" : { - "type" : "string", - "minLength": 1, - "maxLength": 255 - }, - "KeyType" : { - "type" : "string" - } - }, - "required" : [ "KeyType", "AttributeName" ] - }, - "PointInTimeRecoverySpecification" : { - "type" : "object", - "additionalProperties" : false, - "properties" : { - "PointInTimeRecoveryEnabled" : { - "type" : "boolean" - } - } - }, - "ReplicaSpecification": { - "type" : "object", - "additionalProperties" : false, - "properties" : { - "Region" : { - "type" : "string" - }, - "GlobalSecondaryIndexes": { - "type" : "array", - "uniqueItems" : true, - "insertionOrder": false, - "items" : { - "$ref": "#/definitions/ReplicaGlobalSecondaryIndexSpecification" - } - }, - "ContributorInsightsSpecification": { - "$ref": "#/definitions/ContributorInsightsSpecification" - }, - "PointInTimeRecoverySpecification" : { - "$ref" : "#/definitions/PointInTimeRecoverySpecification" - }, - "TableClass" : { - "type" : "string" - }, - "DeletionProtectionEnabled" : { - "type" : "boolean" - }, - "SSESpecification": { - "$ref": "#/definitions/ReplicaSSESpecification" - }, - "Tags" : { - "type": "array", - "insertionOrder": false, - "uniqueItems": true, - "items": { - "$ref": "#/definitions/Tag" - } - }, - "ReadProvisionedThroughputSettings": { - "$ref": "#/definitions/ReadProvisionedThroughputSettings" - }, - "ReadOnDemandThroughputSettings": { - "$ref": "#/definitions/ReadOnDemandThroughputSettings" - }, - "KinesisStreamSpecification": { - "$ref": "#/definitions/KinesisStreamSpecification" - }, - "ResourcePolicy": { - "$ref": "#/definitions/ResourcePolicy" - }, - "ReplicaStreamSpecification": { - "$ref": "#/definitions/ReplicaStreamSpecification" - } - }, - "required" : [ "Region" ] - - }, - "TimeToLiveSpecification" : { - "type" : "object", - "additionalProperties" : false, - "properties" : { - "AttributeName" : { - "type" : "string" - }, - "Enabled" : { - "type" : "boolean" - } - }, - "required" : [ "Enabled" ] - }, - "LocalSecondaryIndex" : { - "type" : "object", - "additionalProperties" : false, - "properties" : { - "IndexName" : { - "type" : "string", - "minLength": 3, - "maxLength": 255 - }, - "KeySchema" : { - "type" : "array", - "uniqueItems" : true, - "items" : { - "$ref" : "#/definitions/KeySchema" - }, - "maxItems": 2 - }, - "Projection" : { - "$ref" : "#/definitions/Projection" - } - }, - "required" : [ "IndexName", "Projection", "KeySchema" ] - }, - "GlobalSecondaryIndex" : { - "type" : "object", - "additionalProperties" : false, - "properties" : { - "IndexName" : { - "type" : "string", - "minLength": 3, - "maxLength": 255 - }, - "KeySchema" : { - "type" : "array", - "uniqueItems" : true, - "items" : { - "$ref" : "#/definitions/KeySchema" - }, - "minItems": 1, - "maxItems": 2 - }, - "Projection" : { - "$ref" : "#/definitions/Projection" - }, - "WriteProvisionedThroughputSettings" : { - "$ref" : "#/definitions/WriteProvisionedThroughputSettings" - }, - "WriteOnDemandThroughputSettings" : { - "$ref" : "#/definitions/WriteOnDemandThroughputSettings" - }, - "WarmThroughput": { - "$ref": "#/definitions/WarmThroughput" - } - }, - "required" : [ "IndexName", "Projection", "KeySchema" ] - }, - "SSESpecification" : { - "type" : "object", - "additionalProperties" : false, - "properties" : { - "SSEEnabled" : { - "type" : "boolean" - }, - "SSEType" : { - "type" : "string" - } - }, - "required" : [ "SSEEnabled" ] - }, - "ReplicaSSESpecification" : { - "type" : "object", - "additionalProperties" : false, - "properties" : { - "KMSMasterKeyId" : { - "type" : "string", - "anyOf": [{ - "relationshipRef": { - "typeName": "AWS::KMS::Key", - "propertyPath": "/properties/Arn" - }},{ - "relationshipRef": { - "typeName": "AWS::KMS::Key", - "propertyPath": "/properties/KeyId" - }},{ - "relationshipRef": { - "typeName": "AWS::KMS::Alias", - "propertyPath": "/properties/AliasName" - } - }] - } - }, - "required" : [ "KMSMasterKeyId" ] - }, - "AttributeDefinition" : { - "type" : "object", - "additionalProperties" : false, - "properties" : { - "AttributeName" : { - "type" : "string", - "minLength": 1, - "maxLength": 255 - }, - "AttributeType" : { - "type" : "string" - } - }, - "required" : [ "AttributeName", "AttributeType" ] - }, - "Tag" : { - "type" : "object", - "additionalProperties" : false, - "properties" : { - "Key" : { - "type" : "string" - }, - "Value" : { - "type" : "string" - } - }, - "required" : [ "Value", "Key" ] - }, - "Projection" : { - "type" : "object", - "additionalProperties" : false, - "properties" : { - "NonKeyAttributes" : { - "type" : "array", - "uniqueItems" : true, - "insertionOrder": false, - "items" : { - "type" : "string" - }, - "maxItems": 20 - }, - "ProjectionType" : { - "type" : "string" - } - } - }, - "ReplicaGlobalSecondaryIndexSpecification": { - "type": "object", - "additionalProperties": false, - "properties": { - "IndexName" : { - "type" : "string", - "minLength": 3, - "maxLength": 255 - }, - "ContributorInsightsSpecification": { - "$ref": "#/definitions/ContributorInsightsSpecification" - }, - "ReadProvisionedThroughputSettings": { - "$ref": "#/definitions/ReadProvisionedThroughputSettings" - }, - "ReadOnDemandThroughputSettings": { - "$ref": "#/definitions/ReadOnDemandThroughputSettings" - } - }, - "required" : [ "IndexName" ] - }, - "ContributorInsightsSpecification": { - "type": "object", - "additionalProperties": false, - "properties": { - "Enabled": { - "type": "boolean" - } - }, - "required" : [ "Enabled" ] - }, - "ReadProvisionedThroughputSettings": { - "type": "object", - "additionalProperties": false, - "properties": { - "ReadCapacityUnits" : { - "type" : "integer", - "minimum": 1 - }, - "ReadCapacityAutoScalingSettings": { - "$ref" : "#/definitions/CapacityAutoScalingSettings" - } - } - }, - "WriteProvisionedThroughputSettings": { - "type": "object", - "additionalProperties": false, - "properties": { - "WriteCapacityAutoScalingSettings": { - "$ref": "#/definitions/CapacityAutoScalingSettings" - } - } - }, - "ReadOnDemandThroughputSettings": { - "type": "object", - "additionalProperties": false, - "properties": { - "MaxReadRequestUnits" : { - "type" : "integer", - "minimum": 1 - } - } - }, - "WriteOnDemandThroughputSettings": { - "type": "object", - "additionalProperties": false, - "properties": { - "MaxWriteRequestUnits" : { - "type" : "integer", - "minimum": 1 - } - } - }, - "CapacityAutoScalingSettings": { - "type": "object", - "additionalProperties": false, - "properties": { - "MinCapacity": { - "type": "integer", - "minimum": 1 - }, - "MaxCapacity": { - "type": "integer", - "minimum": 1 - }, - "SeedCapacity": { - "type": "integer", - "minimum": 1 - }, - "TargetTrackingScalingPolicyConfiguration" : { - "$ref": "#/definitions/TargetTrackingScalingPolicyConfiguration" - } - }, - "required": [ "MinCapacity", "MaxCapacity", "TargetTrackingScalingPolicyConfiguration" ] - }, - "TargetTrackingScalingPolicyConfiguration": { - "type": "object", - "additionalProperties": false, - "properties": { - "DisableScaleIn": { - "type": "boolean" - }, - "ScaleInCooldown": { - "type": "integer", - "minimum": 0 - }, - "ScaleOutCooldown": { - "type": "integer", - "minimum": 0 - }, - "TargetValue": { - "type": "number", - "format": "double" - } - }, - "required": [ "TargetValue" ] - }, - "WarmThroughput" : { - "type" : "object", - "additionalProperties" : false, - "properties" : { - "ReadUnitsPerSecond" : { - "type" : "integer", - "minimum": 1 - }, - "WriteUnitsPerSecond" : { - "type" : "integer", - "minimum": 1 - } - }, - "anyOf": [ - {"required": ["ReadUnitsPerSecond"]}, - {"required": ["WriteUnitsPerSecond"]} - ] - } - }, - "required" : [ "KeySchema", "AttributeDefinitions", "Replicas" ], - "readOnlyProperties" : [ "/properties/Arn", "/properties/StreamArn", "/properties/TableId" ], - "createOnlyProperties" : [ "/properties/LocalSecondaryIndexes", "/properties/TableName", "/properties/KeySchema" ], - "primaryIdentifier" : [ "/properties/TableName" ], - "additionalIdentifiers" : [[ "/properties/Arn"], ["/properties/StreamArn" ]], - "writeOnlyProperties": [ - "/properties/Replicas/*/ReadProvisionedThroughputSettings/ReadCapacityAutoScalingSettings/SeedCapacity", - "/properties/Replicas/*/GlobalSecondaryIndexes/*/ReadProvisionedThroughputSettings/ReadCapacityAutoScalingSettings/SeedCapacity", - "/properties/WriteProvisionedThroughputSettings/WriteCapacityAutoScalingSettings/SeedCapacity", - "/properties/GlobalSecondaryIndexes/*/WriteProvisionedThroughputSettings/WriteCapacityAutoScalingSettings/SeedCapacity" - ], - "handlers": { - "create": { - "permissions": [ - "dynamodb:CreateTable", - "dynamodb:CreateTableReplica", - "dynamodb:Describe*", - "dynamodb:UpdateTimeToLive", - "dynamodb:UpdateContributorInsights", - "dynamodb:UpdateContinuousBackups", - "dynamodb:ListTagsOfResource", - "dynamodb:Query", - "dynamodb:Scan", - "dynamodb:UpdateItem", - "dynamodb:PutItem", - "dynamodb:GetItem", - "dynamodb:DeleteItem", - "dynamodb:BatchWriteItem", - "dynamodb:TagResource", - "dynamodb:EnableKinesisStreamingDestination", - "dynamodb:DisableKinesisStreamingDestination", - "dynamodb:UpdateTableReplicaAutoScaling", - "dynamodb:TagResource", - "dynamodb:GetResourcePolicy", - "dynamodb:PutResourcePolicy", - "application-autoscaling:DeleteScalingPolicy", - "application-autoscaling:DeleteScheduledAction", - "application-autoscaling:DeregisterScalableTarget", - "application-autoscaling:Describe*", - "application-autoscaling:PutScalingPolicy", - "application-autoscaling:PutScheduledAction", - "application-autoscaling:RegisterScalableTarget", - "kinesis:ListStreams", - "kinesis:DescribeStream", - "kinesis:PutRecords", - "kms:CreateGrant", - "kms:DescribeKey", - "kms:ListAliases", - "kms:Decrypt", - "kms:RevokeGrant", - "cloudwatch:PutMetricData", - "iam:CreateServiceLinkedRole" - ] - }, - "read": { - "permissions": [ - "dynamodb:Describe*", - "dynamodb:GetResourcePolicy", - "application-autoscaling:Describe*", - "cloudwatch:PutMetricData", - "dynamodb:ListTagsOfResource", - "kms:DescribeKey" - ] - }, - "update": { - "permissions": [ - "dynamodb:Describe*", - "dynamodb:CreateTableReplica", - "dynamodb:UpdateTable", - "dynamodb:UpdateTimeToLive", - "dynamodb:UpdateContinuousBackups", - "dynamodb:UpdateContributorInsights", - "dynamodb:ListTagsOfResource", - "dynamodb:Query", - "dynamodb:Scan", - "dynamodb:UpdateItem", - "dynamodb:PutItem", - "dynamodb:GetItem", - "dynamodb:DeleteItem", - "dynamodb:BatchWriteItem", - "dynamodb:DeleteTable", - "dynamodb:DeleteTableReplica", - "dynamodb:UpdateItem", - "dynamodb:TagResource", - "dynamodb:UntagResource", - "dynamodb:EnableKinesisStreamingDestination", - "dynamodb:DisableKinesisStreamingDestination", - "dynamodb:UpdateTableReplicaAutoScaling", - "dynamodb:UpdateKinesisStreamingDestination", - "dynamodb:GetResourcePolicy", - "dynamodb:PutResourcePolicy", - "dynamodb:DeleteResourcePolicy", - "application-autoscaling:DeleteScalingPolicy", - "application-autoscaling:DeleteScheduledAction", - "application-autoscaling:DeregisterScalableTarget", - "application-autoscaling:Describe*", - "application-autoscaling:PutScalingPolicy", - "application-autoscaling:PutScheduledAction", - "application-autoscaling:RegisterScalableTarget", - "kinesis:ListStreams", - "kinesis:DescribeStream", - "kinesis:PutRecords", - "kms:CreateGrant", - "kms:DescribeKey", - "kms:ListAliases", - "kms:RevokeGrant", - "cloudwatch:PutMetricData" - ], - "timeoutInMinutes": 1200 - }, - "delete": { - "permissions": [ - "dynamodb:Describe*", - "dynamodb:DeleteTable", - "application-autoscaling:DeleteScalingPolicy", - "application-autoscaling:DeleteScheduledAction", - "application-autoscaling:DeregisterScalableTarget", - "application-autoscaling:Describe*", - "application-autoscaling:PutScalingPolicy", - "application-autoscaling:PutScheduledAction", - "application-autoscaling:RegisterScalableTarget" - ] - }, - "list": { - "permissions": [ - "dynamodb:ListTables", - "cloudwatch:PutMetricData" - ] - } - } - } - \ No newline at end of file diff --git a/tools/@aws-cdk/spec2cdk/temporary-schemas/us-east-1/aws-dynamodb-table.json b/tools/@aws-cdk/spec2cdk/temporary-schemas/us-east-1/aws-dynamodb-table.json deleted file mode 100644 index ad9fe876c4bac..0000000000000 --- a/tools/@aws-cdk/spec2cdk/temporary-schemas/us-east-1/aws-dynamodb-table.json +++ /dev/null @@ -1,588 +0,0 @@ -{ - "typeName" : "AWS::DynamoDB::Table", - "description" : "Version: None. Resource Type definition for AWS::DynamoDB::Table", - "additionalProperties" : false, - "nonPublicProperties": [ - "/properties/DynamoDBEndpoint", - "/properties/WarmThroughput", - "/properties/GlobalSecondaryIndexes/items/properties/WarmThroughput" - ], - "nonPublicDefinitions": [ - "/definitions/WarmThroughput", - "/definitions/GlobalSecondaryIndex/properties/WarmThroughput" - ], - "properties" : { - "Arn" : { - "type" : "string" - }, - "StreamArn" : { - "type" : "string" - }, - "AttributeDefinitions" : { - "type" : "array", - "uniqueItems" : true, - "items" : { - "$ref" : "#/definitions/AttributeDefinition" - } - }, - "BillingMode" : { - "type" : "string" - }, - "DynamoDBEndpoint" : { - "type" : "string" - }, - "DeletionProtectionEnabled" : { - "type" : "boolean" - }, - "GlobalSecondaryIndexes" : { - "type" : "array", - "uniqueItems" : false, - "items" : { - "$ref" : "#/definitions/GlobalSecondaryIndex" - } - }, - "KeySchema" : { - "oneOf": [ - { - "type" : "array", - "uniqueItems" : true, - "items" : { - "$ref" : "#/definitions/KeySchema" - } - }, - { - "type": "object" - } - ] - }, - "LocalSecondaryIndexes" : { - "type" : "array", - "uniqueItems" : false, - "items" : { - "$ref" : "#/definitions/LocalSecondaryIndex" - } - }, - "OnDemandThroughput" : { - "$ref" : "#/definitions/OnDemandThroughput" - }, - "WarmThroughput" : { - "$ref" : "#/definitions/WarmThroughput" - }, - "PointInTimeRecoverySpecification" : { - "$ref" : "#/definitions/PointInTimeRecoverySpecification" - }, - "TableClass" : { - "type" : "string" - }, - "ProvisionedThroughput" : { - "$ref" : "#/definitions/ProvisionedThroughput" - }, - "SSESpecification" : { - "$ref" : "#/definitions/SSESpecification" - }, - "StreamSpecification" : { - "$ref" : "#/definitions/StreamSpecification" - }, - "TableName" : { - "type" : "string" - }, - "Tags" : { - "type" : "array", - "uniqueItems" : false, - "items" : { - "$ref" : "#/definitions/Tag" - } - }, - "TimeToLiveSpecification" : { - "$ref" : "#/definitions/TimeToLiveSpecification" - }, - "ContributorInsightsSpecification": { - "$ref": "#/definitions/ContributorInsightsSpecification" - }, - "KinesisStreamSpecification": { - "$ref": "#/definitions/KinesisStreamSpecification" - }, - "ImportSourceSpecification" : { - "$ref": "#/definitions/ImportSourceSpecification" - }, - "ResourcePolicy": { - "$ref": "#/definitions/ResourcePolicy" - } - }, - "propertyTransform": { - "/properties/SSESpecification/KMSMasterKeyId": "$join([\"arn:aws(-[a-z]{1,4}){0,2}:kms:[a-z]{2,4}(-[a-z]{1,4})?-[a-z]{1,10}-[0-9]:[0-9]{12}:key\\/\", SSESpecification.KMSMasterKeyId]) $OR $join([\"arn:aws(-[a-z]{1,4}){0,2}:kms:[a-z]{2,4}(-[a-z]{1,4})?-[a-z]{1,10}-[0-9]:[0-9]{12}:key\\/\", KMSMasterKeyId])" - }, - "definitions" : { - "StreamSpecification" : { - "type" : "object", - "additionalProperties" : false, - "properties" : { - "StreamViewType" : { - "type" : "string" - }, - "ResourcePolicy": { - "$ref": "#/definitions/ResourcePolicy" - } - }, - "required" : [ "StreamViewType" ] - }, - "DeprecatedKeySchema" : { - "type" : "object", - "additionalProperties" : false, - "properties" : { - "HashKeyElement" : { - "$ref" : "#/definitions/DeprecatedHashKeyElement" - } - }, - "required" : [ "HashKeyElement" ] - }, - "DeprecatedHashKeyElement" : { - "type" : "object", - "additionalProperties" : false, - "properties" : { - "AttributeType" : { - "type" : "string" - }, - "AttributeName" : { - "type" : "string" - } - }, - "required" : [ "AttributeType", "AttributeName" ] - }, - "KeySchema" : { - "type" : "object", - "additionalProperties" : false, - "properties" : { - "AttributeName" : { - "type" : "string" - }, - "KeyType" : { - "type" : "string" - } - }, - "required" : [ "KeyType", "AttributeName" ] - }, - "PointInTimeRecoverySpecification" : { - "type" : "object", - "additionalProperties" : false, - "properties" : { - "PointInTimeRecoveryEnabled" : { - "type" : "boolean" - } - } - }, - "KinesisStreamSpecification" : { - "type" : "object", - "additionalProperties" : false, - "properties" : { - "StreamArn" : { - "type" : "string", - "relationshipRef": { - "typeName": "AWS::Kinesis::Stream", - "propertyPath": "/properties/Arn" - } - }, - "ApproximateCreationDateTimePrecision" : { - "type": "string", - "enum": [ - "MICROSECOND", - "MILLISECOND" - ] - } - }, - "required" : [ "StreamArn" ] - }, - "TimeToLiveSpecification" : { - "type" : "object", - "additionalProperties" : false, - "properties" : { - "AttributeName" : { - "type" : "string" - }, - "Enabled" : { - "type" : "boolean" - } - }, - "required" : [ "Enabled" ] - }, - "LocalSecondaryIndex" : { - "type" : "object", - "additionalProperties" : false, - "properties" : { - "IndexName" : { - "type" : "string" - }, - "KeySchema" : { - "type" : "array", - "uniqueItems" : true, - "items" : { - "$ref" : "#/definitions/KeySchema" - } - }, - "Projection" : { - "$ref" : "#/definitions/Projection" - } - }, - "required" : [ "IndexName", "Projection", "KeySchema" ] - }, - "GlobalSecondaryIndex" : { - "type" : "object", - "additionalProperties" : false, - "properties" : { - "IndexName" : { - "type" : "string" - }, - "KeySchema" : { - "type" : "array", - "uniqueItems" : true, - "items" : { - "$ref" : "#/definitions/KeySchema" - } - }, - "Projection" : { - "$ref" : "#/definitions/Projection" - }, - "ProvisionedThroughput" : { - "$ref" : "#/definitions/ProvisionedThroughput" - }, - "OnDemandThroughput" : { - "$ref" : "#/definitions/OnDemandThroughput" - }, - "WarmThroughput" : { - "$ref" : "#/definitions/WarmThroughput" - }, - "ContributorInsightsSpecification": { - "$ref": "#/definitions/ContributorInsightsSpecification" - } - }, - "required" : [ "IndexName", "Projection", "KeySchema" ] - }, - "OnDemandThroughput" : { - "type" : "object", - "additionalProperties" : false, - "properties" : { - "MaxReadRequestUnits" : { - "type" : "integer", - "minimum": 1 - }, - "MaxWriteRequestUnits" : { - "type" : "integer", - "minimum": 1 - } - } - }, - "WarmThroughput" : { - "type" : "object", - "additionalProperties" : false, - "properties" : { - "ReadUnitsPerSecond" : { - "type" : "integer", - "minimum": 1 - }, - "WriteUnitsPerSecond" : { - "type" : "integer", - "minimum": 1 - } - }, - "anyOf": [ - {"required": ["ReadUnitsPerSecond"]}, - {"required": ["WriteUnitsPerSecond"]} - ] - }, - "SSESpecification" : { - "type" : "object", - "additionalProperties" : false, - "properties" : { - "KMSMasterKeyId" : { - "type" : "string", - "anyOf": [{ - "relationshipRef": { - "typeName": "AWS::KMS::Key", - "propertyPath": "/properties/Arn" - }},{ - "relationshipRef": { - "typeName": "AWS::KMS::Key", - "propertyPath": "/properties/KeyId" - }}, { - "relationshipRef": { - "typeName": "AWS::KMS::Alias", - "propertyPath": "/properties/AliasName" - } - }] - }, - "SSEEnabled" : { - "type" : "boolean" - }, - "SSEType" : { - "type" : "string" - } - }, - "required" : [ "SSEEnabled" ] - }, - "AttributeDefinition" : { - "type" : "object", - "additionalProperties" : false, - "properties" : { - "AttributeName" : { - "type" : "string" - }, - "AttributeType" : { - "type" : "string" - } - }, - "required" : [ "AttributeName", "AttributeType" ] - }, - "ProvisionedThroughput" : { - "type" : "object", - "additionalProperties" : false, - "properties" : { - "ReadCapacityUnits" : { - "type" : "integer" - }, - "WriteCapacityUnits" : { - "type" : "integer" - } - }, - "required" : [ "WriteCapacityUnits", "ReadCapacityUnits" ] - }, - "Tag" : { - "type" : "object", - "additionalProperties" : false, - "properties" : { - "Key" : { - "type" : "string" - }, - "Value" : { - "type" : "string" - } - }, - "required" : [ "Value", "Key" ] - }, - "Projection" : { - "type" : "object", - "additionalProperties" : false, - "properties" : { - "NonKeyAttributes" : { - "type" : "array", - "uniqueItems" : false, - "items" : { - "type" : "string" - } - }, - "ProjectionType" : { - "type" : "string" - } - } - }, - "ContributorInsightsSpecification": { - "type": "object", - "additionalProperties": false, - "properties": { - "Enabled": { - "type": "boolean" - } - }, - "required" : [ "Enabled" ] - }, - "ImportSourceSpecification" : { - "type" : "object", - "additionalProperties" : false, - "properties" : { - "S3BucketSource" : { - "$ref" : "#/definitions/S3BucketSource" - }, - "InputFormat" : { - "type" : "string" - }, - "InputFormatOptions" : { - "$ref" : "#/definitions/InputFormatOptions" - }, - "InputCompressionType" : { - "type" : "string" - } - }, - "required" : [ - "S3BucketSource", - "InputFormat" - ] - }, - "S3BucketSource" : { - "type" : "object", - "additionalProperties" : false, - "properties" : { - "S3BucketOwner" : { - "type" : "string" - }, - "S3Bucket" : { - "type" : "string", - "relationshipRef": { - "typeName": "AWS::S3::Bucket", - "propertyPath": "/properties/BucketName" - } - }, - "S3KeyPrefix" : { - "type" : "string" - } - }, - "required" : [ - "S3Bucket" - ] - }, - "InputFormatOptions" : { - "type" : "object", - "additionalProperties" : false, - "properties" : { - "Csv" : { - "$ref" : "#/definitions/Csv" - } - } - }, - "Csv" : { - "type" : "object", - "additionalProperties" : false, - "properties" : { - "HeaderList" : { - "type" : "array", - "uniqueItems" : true, - "items" : { - "type" : "string" - } - }, - "Delimiter" : { - "type" : "string" - } - } - }, - "ResourcePolicy": { - "type": "object", - "additionalProperties": false, - "properties": { - "PolicyDocument": { - "type": "object" - } - }, - "required": [ - "PolicyDocument" - ] - } - }, - "tagging": { - "taggable": true, - "tagOnCreate": true, - "tagUpdatable": true, - "cloudFormationSystemTags": false, - "tagProperty": "/properties/Tags", - "permissions": [ - "dynamodb:TagResource", - "dynamodb:UntagResource", - "dynamodb:ListTagsOfResource" - ] - }, - "required" : [ "KeySchema" ], - "readOnlyProperties" : [ "/properties/Arn", "/properties/StreamArn" ], - "createOnlyProperties" : [ - "/properties/TableName", - "/properties/DynamoDBEndpoint", - "/properties/ImportSourceSpecification" - ], - "primaryIdentifier" : [ "/properties/TableName" ], - "writeOnlyProperties": [ - "/properties/ImportSourceSpecification" - ], - "handlers": { - "create": { - "permissions": [ - "dynamodb:CreateTable", - "dynamodb:DescribeImport", - "dynamodb:DescribeTable", - "dynamodb:DescribeTimeToLive", - "dynamodb:UpdateTimeToLive", - "dynamodb:UpdateContributorInsights", - "dynamodb:UpdateContinuousBackups", - "dynamodb:DescribeContinuousBackups", - "dynamodb:DescribeContributorInsights", - "dynamodb:EnableKinesisStreamingDestination", - "dynamodb:DisableKinesisStreamingDestination", - "dynamodb:DescribeKinesisStreamingDestination", - "dynamodb:ImportTable", - "dynamodb:ListTagsOfResource", - "dynamodb:TagResource", - "dynamodb:UpdateTable", - "dynamodb:GetResourcePolicy", - "dynamodb:PutResourcePolicy", - "kinesis:DescribeStream", - "kinesis:PutRecords", - "iam:CreateServiceLinkedRole", - "kms:CreateGrant", - "kms:Decrypt", - "kms:DescribeKey", - "kms:ListAliases", - "kms:Encrypt", - "kms:RevokeGrant", - "logs:CreateLogGroup", - "logs:CreateLogStream", - "logs:DescribeLogGroups", - "logs:DescribeLogStreams", - "logs:PutLogEvents", - "logs:PutRetentionPolicy", - "s3:GetObject", - "s3:GetObjectMetadata", - "s3:ListBucket" - ], - "timeoutInMinutes": 720 - }, - "read": { - "permissions": [ - "dynamodb:DescribeTable", - "dynamodb:DescribeContinuousBackups", - "dynamodb:DescribeContributorInsights", - "dynamodb:DescribeKinesisStreamingDestination", - "dynamodb:ListTagsOfResource", - "dynamodb:GetResourcePolicy" - ] - }, - "update": { - "permissions": [ - "dynamodb:UpdateTable", - "dynamodb:DescribeTable", - "dynamodb:DescribeTimeToLive", - "dynamodb:UpdateTimeToLive", - "dynamodb:UpdateContinuousBackups", - "dynamodb:UpdateContributorInsights", - "dynamodb:UpdateKinesisStreamingDestination", - "dynamodb:DescribeContinuousBackups", - "dynamodb:DescribeKinesisStreamingDestination", - "dynamodb:ListTagsOfResource", - "dynamodb:TagResource", - "dynamodb:UntagResource", - "dynamodb:DescribeContributorInsights", - "dynamodb:EnableKinesisStreamingDestination", - "dynamodb:DisableKinesisStreamingDestination", - "dynamodb:GetResourcePolicy", - "dynamodb:PutResourcePolicy", - "dynamodb:DeleteResourcePolicy", - "kinesis:DescribeStream", - "kinesis:PutRecords", - "iam:CreateServiceLinkedRole", - "kms:CreateGrant", - "kms:DescribeKey", - "kms:ListAliases", - "kms:RevokeGrant" - ], - "timeoutInMinutes": 720 - }, - "delete": { - "permissions": [ - "dynamodb:DeleteTable", - "dynamodb:DescribeTable" - ], - "timeoutInMinutes": 720 - }, - "list": { - "permissions": [ - "dynamodb:ListTables" - ] - } - } - } - \ No newline at end of file From 331e3c27b5c54212b3273d7e5a8df75d919cf444 Mon Sep 17 00:00:00 2001 From: Lee Hannigan Date: Sat, 16 Nov 2024 11:46:07 +0000 Subject: [PATCH 4/4] add temp schema for testing --- .../test/integ.global.js.snapshot/tree.json | 336 ++++----- .../us-east-1/aws-dynamodb-globaltable.json | 643 ++++++++++++++++++ .../us-east-1/aws-dynamodb-table.json | 588 ++++++++++++++++ 3 files changed, 1399 insertions(+), 168 deletions(-) create mode 100644 tools/@aws-cdk/spec2cdk/temporary-schemas/us-east-1/aws-dynamodb-globaltable.json create mode 100644 tools/@aws-cdk/spec2cdk/temporary-schemas/us-east-1/aws-dynamodb-table.json diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-dynamodb/test/integ.global.js.snapshot/tree.json b/packages/@aws-cdk-testing/framework-integ/test/aws-dynamodb/test/integ.global.js.snapshot/tree.json index 9c9dca25a3df0..c8223d1ddadfa 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-dynamodb/test/integ.global.js.snapshot/tree.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-dynamodb/test/integ.global.js.snapshot/tree.json @@ -55,16 +55,16 @@ } }, "constructInfo": { - "fqn": "aws-cdk-lib.aws_dynamodb.CfnTable", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.4.2" } }, "ScalingRole": { "id": "ScalingRole", "path": "cdk-dynamodb-global-20191121/Table/ScalingRole", "constructInfo": { - "fqn": "aws-cdk-lib.Resource", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.4.2" } }, "SourceTableAttachedManagedPolicy-cdkdynamodbglobal20191121awscdkawsdynamodbReplicaProviderOnEventHandlerServiceRole6F43DF4A": { @@ -79,8 +79,8 @@ "id": "ImportedResource", "path": "cdk-dynamodb-global-20191121/Table/SourceTableAttachedManagedPolicy-cdkdynamodbglobal20191121awscdkawsdynamodbReplicaProviderOnEventHandlerServiceRole6F43DF4A/Resource/ImportedResource", "constructInfo": { - "fqn": "aws-cdk-lib.Resource", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.4.2" } }, "Resource": { @@ -173,14 +173,14 @@ } }, "constructInfo": { - "fqn": "aws-cdk-lib.aws_iam.CfnManagedPolicy", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.4.2" } } }, "constructInfo": { - "fqn": "aws-cdk-lib.aws_iam.ManagedPolicy", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.4.2" } } }, @@ -201,8 +201,8 @@ "id": "ImportedResource", "path": "cdk-dynamodb-global-20191121/Table/SourceTableAttachedManagedPolicy-cdkdynamodbglobal20191121awscdkawsdynamodbReplicaProviderIsCompleteHandlerServiceRole39716128/Resource/ImportedResource", "constructInfo": { - "fqn": "aws-cdk-lib.Resource", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.4.2" } }, "Resource": { @@ -265,14 +265,14 @@ } }, "constructInfo": { - "fqn": "aws-cdk-lib.aws_iam.CfnManagedPolicy", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.4.2" } } }, "constructInfo": { - "fqn": "aws-cdk-lib.aws_iam.ManagedPolicy", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.4.2" } } }, @@ -289,14 +289,14 @@ "id": "Default", "path": "cdk-dynamodb-global-20191121/Table/Replicaeu-west-2/Default", "constructInfo": { - "fqn": "aws-cdk-lib.CfnResource", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.4.2" } } }, "constructInfo": { - "fqn": "aws-cdk-lib.CustomResource", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.4.2" } }, "Replicaeu-central-1": { @@ -307,20 +307,20 @@ "id": "Default", "path": "cdk-dynamodb-global-20191121/Table/Replicaeu-central-1/Default", "constructInfo": { - "fqn": "aws-cdk-lib.CfnResource", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.4.2" } } }, "constructInfo": { - "fqn": "aws-cdk-lib.CustomResource", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.4.2" } } }, "constructInfo": { - "fqn": "aws-cdk-lib.aws_dynamodb.Table", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.4.2" } }, "@aws-cdk--aws-dynamodb.ReplicaProvider": { @@ -339,8 +339,8 @@ "id": "ImportServiceRole", "path": "cdk-dynamodb-global-20191121/@aws-cdk--aws-dynamodb.ReplicaProvider/OnEventHandler/ServiceRole/ImportServiceRole", "constructInfo": { - "fqn": "aws-cdk-lib.Resource", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.4.2" } }, "Resource": { @@ -378,8 +378,8 @@ } }, "constructInfo": { - "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.4.2" } }, "DefaultPolicy": { @@ -474,20 +474,20 @@ } }, "constructInfo": { - "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.4.2" } } }, "constructInfo": { - "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.4.2" } } }, "constructInfo": { - "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.4.2" } }, "Code": { @@ -498,22 +498,22 @@ "id": "Stage", "path": "cdk-dynamodb-global-20191121/@aws-cdk--aws-dynamodb.ReplicaProvider/OnEventHandler/Code/Stage", "constructInfo": { - "fqn": "aws-cdk-lib.AssetStaging", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.4.2" } }, "AssetBucket": { "id": "AssetBucket", "path": "cdk-dynamodb-global-20191121/@aws-cdk--aws-dynamodb.ReplicaProvider/OnEventHandler/Code/AssetBucket", "constructInfo": { - "fqn": "aws-cdk-lib.aws_s3.BucketBase", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.4.2" } } }, "constructInfo": { - "fqn": "aws-cdk-lib.aws_s3_assets.Asset", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.4.2" } }, "Resource": { @@ -540,14 +540,14 @@ } }, "constructInfo": { - "fqn": "aws-cdk-lib.aws_lambda.CfnFunction", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.4.2" } } }, "constructInfo": { - "fqn": "aws-cdk-lib.aws_lambda.Function", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.4.2" } }, "IsCompleteHandler": { @@ -562,8 +562,8 @@ "id": "ImportServiceRole", "path": "cdk-dynamodb-global-20191121/@aws-cdk--aws-dynamodb.ReplicaProvider/IsCompleteHandler/ServiceRole/ImportServiceRole", "constructInfo": { - "fqn": "aws-cdk-lib.Resource", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.4.2" } }, "Resource": { @@ -601,14 +601,14 @@ } }, "constructInfo": { - "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.4.2" } } }, "constructInfo": { - "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.4.2" } }, "Code": { @@ -619,22 +619,22 @@ "id": "Stage", "path": "cdk-dynamodb-global-20191121/@aws-cdk--aws-dynamodb.ReplicaProvider/IsCompleteHandler/Code/Stage", "constructInfo": { - "fqn": "aws-cdk-lib.AssetStaging", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.4.2" } }, "AssetBucket": { "id": "AssetBucket", "path": "cdk-dynamodb-global-20191121/@aws-cdk--aws-dynamodb.ReplicaProvider/IsCompleteHandler/Code/AssetBucket", "constructInfo": { - "fqn": "aws-cdk-lib.aws_s3.BucketBase", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.4.2" } } }, "constructInfo": { - "fqn": "aws-cdk-lib.aws_s3_assets.Asset", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.4.2" } }, "Resource": { @@ -661,14 +661,14 @@ } }, "constructInfo": { - "fqn": "aws-cdk-lib.aws_lambda.CfnFunction", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.4.2" } } }, "constructInfo": { - "fqn": "aws-cdk-lib.aws_lambda.Function", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.4.2" } }, "Provider": { @@ -687,8 +687,8 @@ "id": "ImportServiceRole", "path": "cdk-dynamodb-global-20191121/@aws-cdk--aws-dynamodb.ReplicaProvider/Provider/framework-onEvent/ServiceRole/ImportServiceRole", "constructInfo": { - "fqn": "aws-cdk-lib.Resource", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.4.2" } }, "Resource": { @@ -726,8 +726,8 @@ } }, "constructInfo": { - "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.4.2" } }, "DefaultPolicy": { @@ -807,20 +807,20 @@ } }, "constructInfo": { - "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.4.2" } } }, "constructInfo": { - "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.4.2" } } }, "constructInfo": { - "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.4.2" } }, "Code": { @@ -831,22 +831,22 @@ "id": "Stage", "path": "cdk-dynamodb-global-20191121/@aws-cdk--aws-dynamodb.ReplicaProvider/Provider/framework-onEvent/Code/Stage", "constructInfo": { - "fqn": "aws-cdk-lib.AssetStaging", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.4.2" } }, "AssetBucket": { "id": "AssetBucket", "path": "cdk-dynamodb-global-20191121/@aws-cdk--aws-dynamodb.ReplicaProvider/Provider/framework-onEvent/Code/AssetBucket", "constructInfo": { - "fqn": "aws-cdk-lib.aws_s3.BucketBase", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.4.2" } } }, "constructInfo": { - "fqn": "aws-cdk-lib.aws_s3_assets.Asset", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.4.2" } }, "Resource": { @@ -893,14 +893,14 @@ } }, "constructInfo": { - "fqn": "aws-cdk-lib.aws_lambda.CfnFunction", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.4.2" } } }, "constructInfo": { - "fqn": "aws-cdk-lib.aws_lambda.Function", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.4.2" } }, "framework-isComplete": { @@ -915,8 +915,8 @@ "id": "ImportServiceRole", "path": "cdk-dynamodb-global-20191121/@aws-cdk--aws-dynamodb.ReplicaProvider/Provider/framework-isComplete/ServiceRole/ImportServiceRole", "constructInfo": { - "fqn": "aws-cdk-lib.Resource", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.4.2" } }, "Resource": { @@ -954,8 +954,8 @@ } }, "constructInfo": { - "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.4.2" } }, "DefaultPolicy": { @@ -1028,20 +1028,20 @@ } }, "constructInfo": { - "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.4.2" } } }, "constructInfo": { - "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.4.2" } } }, "constructInfo": { - "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.4.2" } }, "Code": { @@ -1052,22 +1052,22 @@ "id": "Stage", "path": "cdk-dynamodb-global-20191121/@aws-cdk--aws-dynamodb.ReplicaProvider/Provider/framework-isComplete/Code/Stage", "constructInfo": { - "fqn": "aws-cdk-lib.AssetStaging", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.4.2" } }, "AssetBucket": { "id": "AssetBucket", "path": "cdk-dynamodb-global-20191121/@aws-cdk--aws-dynamodb.ReplicaProvider/Provider/framework-isComplete/Code/AssetBucket", "constructInfo": { - "fqn": "aws-cdk-lib.aws_s3.BucketBase", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.4.2" } } }, "constructInfo": { - "fqn": "aws-cdk-lib.aws_s3_assets.Asset", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.4.2" } }, "Resource": { @@ -1111,14 +1111,14 @@ } }, "constructInfo": { - "fqn": "aws-cdk-lib.aws_lambda.CfnFunction", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.4.2" } } }, "constructInfo": { - "fqn": "aws-cdk-lib.aws_lambda.Function", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.4.2" } }, "framework-onTimeout": { @@ -1133,8 +1133,8 @@ "id": "ImportServiceRole", "path": "cdk-dynamodb-global-20191121/@aws-cdk--aws-dynamodb.ReplicaProvider/Provider/framework-onTimeout/ServiceRole/ImportServiceRole", "constructInfo": { - "fqn": "aws-cdk-lib.Resource", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.4.2" } }, "Resource": { @@ -1172,8 +1172,8 @@ } }, "constructInfo": { - "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.4.2" } }, "DefaultPolicy": { @@ -1246,20 +1246,20 @@ } }, "constructInfo": { - "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.4.2" } } }, "constructInfo": { - "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.4.2" } } }, "constructInfo": { - "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.4.2" } }, "Code": { @@ -1270,22 +1270,22 @@ "id": "Stage", "path": "cdk-dynamodb-global-20191121/@aws-cdk--aws-dynamodb.ReplicaProvider/Provider/framework-onTimeout/Code/Stage", "constructInfo": { - "fqn": "aws-cdk-lib.AssetStaging", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.4.2" } }, "AssetBucket": { "id": "AssetBucket", "path": "cdk-dynamodb-global-20191121/@aws-cdk--aws-dynamodb.ReplicaProvider/Provider/framework-onTimeout/Code/AssetBucket", "constructInfo": { - "fqn": "aws-cdk-lib.aws_s3.BucketBase", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.4.2" } } }, "constructInfo": { - "fqn": "aws-cdk-lib.aws_s3_assets.Asset", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.4.2" } }, "Resource": { @@ -1329,14 +1329,14 @@ } }, "constructInfo": { - "fqn": "aws-cdk-lib.aws_lambda.CfnFunction", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.4.2" } } }, "constructInfo": { - "fqn": "aws-cdk-lib.aws_lambda.Function", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.4.2" } }, "waiter-state-machine": { @@ -1351,8 +1351,8 @@ "id": "ImportRole", "path": "cdk-dynamodb-global-20191121/@aws-cdk--aws-dynamodb.ReplicaProvider/Provider/waiter-state-machine/Role/ImportRole", "constructInfo": { - "fqn": "aws-cdk-lib.Resource", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.4.2" } }, "Resource": { @@ -1376,8 +1376,8 @@ } }, "constructInfo": { - "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.4.2" } }, "DefaultPolicy": { @@ -1466,20 +1466,20 @@ } }, "constructInfo": { - "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.4.2" } } }, "constructInfo": { - "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.4.2" } } }, "constructInfo": { - "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.4.2" } }, "LogGroup": { @@ -1508,14 +1508,14 @@ } }, "constructInfo": { - "fqn": "aws-cdk-lib.aws_logs.CfnLogGroup", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.4.2" } } }, "constructInfo": { - "fqn": "aws-cdk-lib.aws_logs.LogGroup", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.4.2" } }, "Resource": { @@ -1571,58 +1571,58 @@ } }, "constructInfo": { - "fqn": "aws-cdk-lib.aws_stepfunctions.CfnStateMachine", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.4.2" } } }, "constructInfo": { - "fqn": "aws-cdk-lib.custom_resources.WaiterStateMachine", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.4.2" } } }, "constructInfo": { - "fqn": "aws-cdk-lib.custom_resources.Provider", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.4.2" } }, "cdkdynamodbglobal20191121awscdkawsdynamodbReplicaProviderOnEventHandlerServiceRole3E8625F3Ref": { "id": "cdkdynamodbglobal20191121awscdkawsdynamodbReplicaProviderOnEventHandlerServiceRole3E8625F3Ref", "path": "cdk-dynamodb-global-20191121/@aws-cdk--aws-dynamodb.ReplicaProvider/cdkdynamodbglobal20191121awscdkawsdynamodbReplicaProviderOnEventHandlerServiceRole3E8625F3Ref", "constructInfo": { - "fqn": "aws-cdk-lib.CfnOutput", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.4.2" } }, "cdkdynamodbglobal20191121awscdkawsdynamodbReplicaProviderIsCompleteHandlerServiceRole2F936EC4Ref": { "id": "cdkdynamodbglobal20191121awscdkawsdynamodbReplicaProviderIsCompleteHandlerServiceRole2F936EC4Ref", "path": "cdk-dynamodb-global-20191121/@aws-cdk--aws-dynamodb.ReplicaProvider/cdkdynamodbglobal20191121awscdkawsdynamodbReplicaProviderIsCompleteHandlerServiceRole2F936EC4Ref", "constructInfo": { - "fqn": "aws-cdk-lib.CfnOutput", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.4.2" } }, "cdkdynamodbglobal20191121awscdkawsdynamodbReplicaProviderframeworkonEventCFDD0BA0Arn": { "id": "cdkdynamodbglobal20191121awscdkawsdynamodbReplicaProviderframeworkonEventCFDD0BA0Arn", "path": "cdk-dynamodb-global-20191121/@aws-cdk--aws-dynamodb.ReplicaProvider/cdkdynamodbglobal20191121awscdkawsdynamodbReplicaProviderframeworkonEventCFDD0BA0Arn", "constructInfo": { - "fqn": "aws-cdk-lib.CfnOutput", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.4.2" } }, "reference-to-cdkdynamodbglobal20191121TableB640876BRef": { "id": "reference-to-cdkdynamodbglobal20191121TableB640876BRef", "path": "cdk-dynamodb-global-20191121/@aws-cdk--aws-dynamodb.ReplicaProvider/reference-to-cdkdynamodbglobal20191121TableB640876BRef", "constructInfo": { - "fqn": "aws-cdk-lib.CfnParameter", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.4.2" } } }, "constructInfo": { - "fqn": "aws-cdk-lib.NestedStack", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.4.2" } }, "@aws-cdk--aws-dynamodb.ReplicaProvider.NestedStack": { @@ -1659,8 +1659,8 @@ } }, "constructInfo": { - "fqn": "aws-cdk-lib.CfnStack", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.4.2" } } }, @@ -1673,22 +1673,22 @@ "id": "BootstrapVersion", "path": "cdk-dynamodb-global-20191121/BootstrapVersion", "constructInfo": { - "fqn": "aws-cdk-lib.CfnParameter", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.4.2" } }, "CheckBootstrapVersion": { "id": "CheckBootstrapVersion", "path": "cdk-dynamodb-global-20191121/CheckBootstrapVersion", "constructInfo": { - "fqn": "aws-cdk-lib.CfnRule", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.4.2" } } }, "constructInfo": { - "fqn": "aws-cdk-lib.Stack", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.4.2" } }, "cdk-dynamodb-global-20191121-test": { @@ -1715,22 +1715,22 @@ "id": "BootstrapVersion", "path": "cdk-dynamodb-global-20191121-test/DefaultTest/DeployAssert/BootstrapVersion", "constructInfo": { - "fqn": "aws-cdk-lib.CfnParameter", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.4.2" } }, "CheckBootstrapVersion": { "id": "CheckBootstrapVersion", "path": "cdk-dynamodb-global-20191121-test/DefaultTest/DeployAssert/CheckBootstrapVersion", "constructInfo": { - "fqn": "aws-cdk-lib.CfnRule", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.4.2" } } }, "constructInfo": { - "fqn": "aws-cdk-lib.Stack", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.4.2" } } }, @@ -1755,8 +1755,8 @@ } }, "constructInfo": { - "fqn": "aws-cdk-lib.App", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.4.2" } } } \ No newline at end of file diff --git a/tools/@aws-cdk/spec2cdk/temporary-schemas/us-east-1/aws-dynamodb-globaltable.json b/tools/@aws-cdk/spec2cdk/temporary-schemas/us-east-1/aws-dynamodb-globaltable.json new file mode 100644 index 0000000000000..948b867c866c0 --- /dev/null +++ b/tools/@aws-cdk/spec2cdk/temporary-schemas/us-east-1/aws-dynamodb-globaltable.json @@ -0,0 +1,643 @@ +{ + "typeName" : "AWS::DynamoDB::GlobalTable", + "description" : "Version: None. Resource Type definition for AWS::DynamoDB::GlobalTable", + "additionalProperties" : false, + "nonPublicProperties": [ + "/properties/WarmThroughput", + "/properties/GlobalSecondaryIndexes/items/properties/WarmThroughput" + ], + "nonPublicDefinitions": [ + "/definitions/WarmThroughput", + "/definitions/GlobalSecondaryIndex/properties/WarmThroughput" + ], + "properties" : { + "Arn" : { + "type" : "string" + }, + "StreamArn" : { + "type" : "string" + }, + "AttributeDefinitions" : { + "type" : "array", + "uniqueItems" : true, + "insertionOrder": false, + "items" : { + "$ref" : "#/definitions/AttributeDefinition" + }, + "minItems": 1 + }, + "BillingMode" : { + "type" : "string" + }, + "GlobalSecondaryIndexes" : { + "type" : "array", + "uniqueItems" : true, + "insertionOrder": false, + "items" : { + "$ref" : "#/definitions/GlobalSecondaryIndex" + } + }, + "KeySchema" : { + "type" : "array", + "uniqueItems" : true, + "items" : { + "$ref" : "#/definitions/KeySchema" + }, + "minItems": 1, + "maxItems": 2 + }, + "LocalSecondaryIndexes" : { + "type" : "array", + "uniqueItems" : true, + "insertionOrder": false, + "items" : { + "$ref" : "#/definitions/LocalSecondaryIndex" + } + }, + "WriteProvisionedThroughputSettings" : { + "$ref" : "#/definitions/WriteProvisionedThroughputSettings" + }, + "WriteOnDemandThroughputSettings" : { + "$ref" : "#/definitions/WriteOnDemandThroughputSettings" + }, + "WarmThroughput" : { + "$ref" : "#/definitions/WarmThroughput" + }, + "Replicas" : { + "type" : "array", + "uniqueItems" : true, + "insertionOrder": false, + "items" : { + "$ref" : "#/definitions/ReplicaSpecification" + }, + "minItems": 1 + }, + "SSESpecification" : { + "$ref" : "#/definitions/SSESpecification" + }, + "StreamSpecification" : { + "$ref" : "#/definitions/StreamSpecification" + }, + "TableName" : { + "type" : "string" + }, + "TableId" : { + "type" : "string" + }, + "TimeToLiveSpecification" : { + "$ref" : "#/definitions/TimeToLiveSpecification" + } + }, + "definitions" : { + "StreamSpecification" : { + "type" : "object", + "additionalProperties" : false, + "properties" : { + "StreamViewType" : { + "type" : "string" + } + }, + "required" : [ "StreamViewType" ] + }, + "ResourcePolicy" : { + "type" : "object", + "additionalProperties" : false, + "properties" : { + "PolicyDocument": { + "type": "object" + } + }, + "required" : [ "PolicyDocument" ] + }, + "ReplicaStreamSpecification" : { + "type" : "object", + "additionalProperties" : false, + "properties" : { + "ResourcePolicy": { + "$ref": "#/definitions/ResourcePolicy" + } + }, + "required" : [ "ResourcePolicy" ] + }, + "KinesisStreamSpecification" : { + "type" : "object", + "additionalProperties" : false, + "properties" : { + "StreamArn" : { + "type" : "string", + "relationshipRef": { + "typeName": "AWS::Kinesis::Stream", + "propertyPath": "/properties/Arn" + } + }, + "ApproximateCreationDateTimePrecision" : { + "type": "string", + "enum": [ + "MICROSECOND", + "MILLISECOND" + ] + } + }, + "required" : [ "StreamArn" ] + }, + "KeySchema" : { + "type" : "object", + "additionalProperties" : false, + "properties" : { + "AttributeName" : { + "type" : "string", + "minLength": 1, + "maxLength": 255 + }, + "KeyType" : { + "type" : "string" + } + }, + "required" : [ "KeyType", "AttributeName" ] + }, + "PointInTimeRecoverySpecification" : { + "type" : "object", + "additionalProperties" : false, + "properties" : { + "PointInTimeRecoveryEnabled" : { + "type" : "boolean" + } + } + }, + "ReplicaSpecification": { + "type" : "object", + "additionalProperties" : false, + "properties" : { + "Region" : { + "type" : "string" + }, + "GlobalSecondaryIndexes": { + "type" : "array", + "uniqueItems" : true, + "insertionOrder": false, + "items" : { + "$ref": "#/definitions/ReplicaGlobalSecondaryIndexSpecification" + } + }, + "ContributorInsightsSpecification": { + "$ref": "#/definitions/ContributorInsightsSpecification" + }, + "PointInTimeRecoverySpecification" : { + "$ref" : "#/definitions/PointInTimeRecoverySpecification" + }, + "TableClass" : { + "type" : "string" + }, + "DeletionProtectionEnabled" : { + "type" : "boolean" + }, + "SSESpecification": { + "$ref": "#/definitions/ReplicaSSESpecification" + }, + "Tags" : { + "type": "array", + "insertionOrder": false, + "uniqueItems": true, + "items": { + "$ref": "#/definitions/Tag" + } + }, + "ReadProvisionedThroughputSettings": { + "$ref": "#/definitions/ReadProvisionedThroughputSettings" + }, + "ReadOnDemandThroughputSettings": { + "$ref": "#/definitions/ReadOnDemandThroughputSettings" + }, + "KinesisStreamSpecification": { + "$ref": "#/definitions/KinesisStreamSpecification" + }, + "ResourcePolicy": { + "$ref": "#/definitions/ResourcePolicy" + }, + "ReplicaStreamSpecification": { + "$ref": "#/definitions/ReplicaStreamSpecification" + } + }, + "required" : [ "Region" ] + + }, + "TimeToLiveSpecification" : { + "type" : "object", + "additionalProperties" : false, + "properties" : { + "AttributeName" : { + "type" : "string" + }, + "Enabled" : { + "type" : "boolean" + } + }, + "required" : [ "Enabled" ] + }, + "LocalSecondaryIndex" : { + "type" : "object", + "additionalProperties" : false, + "properties" : { + "IndexName" : { + "type" : "string", + "minLength": 3, + "maxLength": 255 + }, + "KeySchema" : { + "type" : "array", + "uniqueItems" : true, + "items" : { + "$ref" : "#/definitions/KeySchema" + }, + "maxItems": 2 + }, + "Projection" : { + "$ref" : "#/definitions/Projection" + } + }, + "required" : [ "IndexName", "Projection", "KeySchema" ] + }, + "GlobalSecondaryIndex" : { + "type" : "object", + "additionalProperties" : false, + "properties" : { + "IndexName" : { + "type" : "string", + "minLength": 3, + "maxLength": 255 + }, + "KeySchema" : { + "type" : "array", + "uniqueItems" : true, + "items" : { + "$ref" : "#/definitions/KeySchema" + }, + "minItems": 1, + "maxItems": 2 + }, + "Projection" : { + "$ref" : "#/definitions/Projection" + }, + "WriteProvisionedThroughputSettings" : { + "$ref" : "#/definitions/WriteProvisionedThroughputSettings" + }, + "WriteOnDemandThroughputSettings" : { + "$ref" : "#/definitions/WriteOnDemandThroughputSettings" + }, + "WarmThroughput": { + "$ref": "#/definitions/WarmThroughput" + } + }, + "required" : [ "IndexName", "Projection", "KeySchema" ] + }, + "SSESpecification" : { + "type" : "object", + "additionalProperties" : false, + "properties" : { + "SSEEnabled" : { + "type" : "boolean" + }, + "SSEType" : { + "type" : "string" + } + }, + "required" : [ "SSEEnabled" ] + }, + "ReplicaSSESpecification" : { + "type" : "object", + "additionalProperties" : false, + "properties" : { + "KMSMasterKeyId" : { + "type" : "string", + "anyOf": [{ + "relationshipRef": { + "typeName": "AWS::KMS::Key", + "propertyPath": "/properties/Arn" + }},{ + "relationshipRef": { + "typeName": "AWS::KMS::Key", + "propertyPath": "/properties/KeyId" + }},{ + "relationshipRef": { + "typeName": "AWS::KMS::Alias", + "propertyPath": "/properties/AliasName" + } + }] + } + }, + "required" : [ "KMSMasterKeyId" ] + }, + "AttributeDefinition" : { + "type" : "object", + "additionalProperties" : false, + "properties" : { + "AttributeName" : { + "type" : "string", + "minLength": 1, + "maxLength": 255 + }, + "AttributeType" : { + "type" : "string" + } + }, + "required" : [ "AttributeName", "AttributeType" ] + }, + "Tag" : { + "type" : "object", + "additionalProperties" : false, + "properties" : { + "Key" : { + "type" : "string" + }, + "Value" : { + "type" : "string" + } + }, + "required" : [ "Value", "Key" ] + }, + "Projection" : { + "type" : "object", + "additionalProperties" : false, + "properties" : { + "NonKeyAttributes" : { + "type" : "array", + "uniqueItems" : true, + "insertionOrder": false, + "items" : { + "type" : "string" + }, + "maxItems": 20 + }, + "ProjectionType" : { + "type" : "string" + } + } + }, + "ReplicaGlobalSecondaryIndexSpecification": { + "type": "object", + "additionalProperties": false, + "properties": { + "IndexName" : { + "type" : "string", + "minLength": 3, + "maxLength": 255 + }, + "ContributorInsightsSpecification": { + "$ref": "#/definitions/ContributorInsightsSpecification" + }, + "ReadProvisionedThroughputSettings": { + "$ref": "#/definitions/ReadProvisionedThroughputSettings" + }, + "ReadOnDemandThroughputSettings": { + "$ref": "#/definitions/ReadOnDemandThroughputSettings" + } + }, + "required" : [ "IndexName" ] + }, + "ContributorInsightsSpecification": { + "type": "object", + "additionalProperties": false, + "properties": { + "Enabled": { + "type": "boolean" + } + }, + "required" : [ "Enabled" ] + }, + "ReadProvisionedThroughputSettings": { + "type": "object", + "additionalProperties": false, + "properties": { + "ReadCapacityUnits" : { + "type" : "integer", + "minimum": 1 + }, + "ReadCapacityAutoScalingSettings": { + "$ref" : "#/definitions/CapacityAutoScalingSettings" + } + } + }, + "WriteProvisionedThroughputSettings": { + "type": "object", + "additionalProperties": false, + "properties": { + "WriteCapacityAutoScalingSettings": { + "$ref": "#/definitions/CapacityAutoScalingSettings" + } + } + }, + "ReadOnDemandThroughputSettings": { + "type": "object", + "additionalProperties": false, + "properties": { + "MaxReadRequestUnits" : { + "type" : "integer", + "minimum": 1 + } + } + }, + "WriteOnDemandThroughputSettings": { + "type": "object", + "additionalProperties": false, + "properties": { + "MaxWriteRequestUnits" : { + "type" : "integer", + "minimum": 1 + } + } + }, + "CapacityAutoScalingSettings": { + "type": "object", + "additionalProperties": false, + "properties": { + "MinCapacity": { + "type": "integer", + "minimum": 1 + }, + "MaxCapacity": { + "type": "integer", + "minimum": 1 + }, + "SeedCapacity": { + "type": "integer", + "minimum": 1 + }, + "TargetTrackingScalingPolicyConfiguration" : { + "$ref": "#/definitions/TargetTrackingScalingPolicyConfiguration" + } + }, + "required": [ "MinCapacity", "MaxCapacity", "TargetTrackingScalingPolicyConfiguration" ] + }, + "TargetTrackingScalingPolicyConfiguration": { + "type": "object", + "additionalProperties": false, + "properties": { + "DisableScaleIn": { + "type": "boolean" + }, + "ScaleInCooldown": { + "type": "integer", + "minimum": 0 + }, + "ScaleOutCooldown": { + "type": "integer", + "minimum": 0 + }, + "TargetValue": { + "type": "number", + "format": "double" + } + }, + "required": [ "TargetValue" ] + }, + "WarmThroughput" : { + "type" : "object", + "additionalProperties" : false, + "properties" : { + "ReadUnitsPerSecond" : { + "type" : "integer", + "minimum": 1 + }, + "WriteUnitsPerSecond" : { + "type" : "integer", + "minimum": 1 + } + }, + "anyOf": [ + {"required": ["ReadUnitsPerSecond"]}, + {"required": ["WriteUnitsPerSecond"]} + ] + } + }, + "required" : [ "KeySchema", "AttributeDefinitions", "Replicas" ], + "readOnlyProperties" : [ "/properties/Arn", "/properties/StreamArn", "/properties/TableId" ], + "createOnlyProperties" : [ "/properties/LocalSecondaryIndexes", "/properties/TableName", "/properties/KeySchema" ], + "primaryIdentifier" : [ "/properties/TableName" ], + "additionalIdentifiers" : [[ "/properties/Arn"], ["/properties/StreamArn" ]], + "writeOnlyProperties": [ + "/properties/Replicas/*/ReadProvisionedThroughputSettings/ReadCapacityAutoScalingSettings/SeedCapacity", + "/properties/Replicas/*/GlobalSecondaryIndexes/*/ReadProvisionedThroughputSettings/ReadCapacityAutoScalingSettings/SeedCapacity", + "/properties/WriteProvisionedThroughputSettings/WriteCapacityAutoScalingSettings/SeedCapacity", + "/properties/GlobalSecondaryIndexes/*/WriteProvisionedThroughputSettings/WriteCapacityAutoScalingSettings/SeedCapacity" + ], + "handlers": { + "create": { + "permissions": [ + "dynamodb:CreateTable", + "dynamodb:CreateTableReplica", + "dynamodb:Describe*", + "dynamodb:UpdateTimeToLive", + "dynamodb:UpdateContributorInsights", + "dynamodb:UpdateContinuousBackups", + "dynamodb:ListTagsOfResource", + "dynamodb:Query", + "dynamodb:Scan", + "dynamodb:UpdateItem", + "dynamodb:PutItem", + "dynamodb:GetItem", + "dynamodb:DeleteItem", + "dynamodb:BatchWriteItem", + "dynamodb:TagResource", + "dynamodb:EnableKinesisStreamingDestination", + "dynamodb:DisableKinesisStreamingDestination", + "dynamodb:UpdateTableReplicaAutoScaling", + "dynamodb:TagResource", + "dynamodb:GetResourcePolicy", + "dynamodb:PutResourcePolicy", + "application-autoscaling:DeleteScalingPolicy", + "application-autoscaling:DeleteScheduledAction", + "application-autoscaling:DeregisterScalableTarget", + "application-autoscaling:Describe*", + "application-autoscaling:PutScalingPolicy", + "application-autoscaling:PutScheduledAction", + "application-autoscaling:RegisterScalableTarget", + "kinesis:ListStreams", + "kinesis:DescribeStream", + "kinesis:PutRecords", + "kms:CreateGrant", + "kms:DescribeKey", + "kms:ListAliases", + "kms:Decrypt", + "kms:RevokeGrant", + "cloudwatch:PutMetricData", + "iam:CreateServiceLinkedRole" + ] + }, + "read": { + "permissions": [ + "dynamodb:Describe*", + "dynamodb:GetResourcePolicy", + "application-autoscaling:Describe*", + "cloudwatch:PutMetricData", + "dynamodb:ListTagsOfResource", + "kms:DescribeKey" + ] + }, + "update": { + "permissions": [ + "dynamodb:Describe*", + "dynamodb:CreateTableReplica", + "dynamodb:UpdateTable", + "dynamodb:UpdateTimeToLive", + "dynamodb:UpdateContinuousBackups", + "dynamodb:UpdateContributorInsights", + "dynamodb:ListTagsOfResource", + "dynamodb:Query", + "dynamodb:Scan", + "dynamodb:UpdateItem", + "dynamodb:PutItem", + "dynamodb:GetItem", + "dynamodb:DeleteItem", + "dynamodb:BatchWriteItem", + "dynamodb:DeleteTable", + "dynamodb:DeleteTableReplica", + "dynamodb:UpdateItem", + "dynamodb:TagResource", + "dynamodb:UntagResource", + "dynamodb:EnableKinesisStreamingDestination", + "dynamodb:DisableKinesisStreamingDestination", + "dynamodb:UpdateTableReplicaAutoScaling", + "dynamodb:UpdateKinesisStreamingDestination", + "dynamodb:GetResourcePolicy", + "dynamodb:PutResourcePolicy", + "dynamodb:DeleteResourcePolicy", + "application-autoscaling:DeleteScalingPolicy", + "application-autoscaling:DeleteScheduledAction", + "application-autoscaling:DeregisterScalableTarget", + "application-autoscaling:Describe*", + "application-autoscaling:PutScalingPolicy", + "application-autoscaling:PutScheduledAction", + "application-autoscaling:RegisterScalableTarget", + "kinesis:ListStreams", + "kinesis:DescribeStream", + "kinesis:PutRecords", + "kms:CreateGrant", + "kms:DescribeKey", + "kms:ListAliases", + "kms:RevokeGrant", + "cloudwatch:PutMetricData" + ], + "timeoutInMinutes": 1200 + }, + "delete": { + "permissions": [ + "dynamodb:Describe*", + "dynamodb:DeleteTable", + "application-autoscaling:DeleteScalingPolicy", + "application-autoscaling:DeleteScheduledAction", + "application-autoscaling:DeregisterScalableTarget", + "application-autoscaling:Describe*", + "application-autoscaling:PutScalingPolicy", + "application-autoscaling:PutScheduledAction", + "application-autoscaling:RegisterScalableTarget" + ] + }, + "list": { + "permissions": [ + "dynamodb:ListTables", + "cloudwatch:PutMetricData" + ] + } + } + } + \ No newline at end of file diff --git a/tools/@aws-cdk/spec2cdk/temporary-schemas/us-east-1/aws-dynamodb-table.json b/tools/@aws-cdk/spec2cdk/temporary-schemas/us-east-1/aws-dynamodb-table.json new file mode 100644 index 0000000000000..ad9fe876c4bac --- /dev/null +++ b/tools/@aws-cdk/spec2cdk/temporary-schemas/us-east-1/aws-dynamodb-table.json @@ -0,0 +1,588 @@ +{ + "typeName" : "AWS::DynamoDB::Table", + "description" : "Version: None. Resource Type definition for AWS::DynamoDB::Table", + "additionalProperties" : false, + "nonPublicProperties": [ + "/properties/DynamoDBEndpoint", + "/properties/WarmThroughput", + "/properties/GlobalSecondaryIndexes/items/properties/WarmThroughput" + ], + "nonPublicDefinitions": [ + "/definitions/WarmThroughput", + "/definitions/GlobalSecondaryIndex/properties/WarmThroughput" + ], + "properties" : { + "Arn" : { + "type" : "string" + }, + "StreamArn" : { + "type" : "string" + }, + "AttributeDefinitions" : { + "type" : "array", + "uniqueItems" : true, + "items" : { + "$ref" : "#/definitions/AttributeDefinition" + } + }, + "BillingMode" : { + "type" : "string" + }, + "DynamoDBEndpoint" : { + "type" : "string" + }, + "DeletionProtectionEnabled" : { + "type" : "boolean" + }, + "GlobalSecondaryIndexes" : { + "type" : "array", + "uniqueItems" : false, + "items" : { + "$ref" : "#/definitions/GlobalSecondaryIndex" + } + }, + "KeySchema" : { + "oneOf": [ + { + "type" : "array", + "uniqueItems" : true, + "items" : { + "$ref" : "#/definitions/KeySchema" + } + }, + { + "type": "object" + } + ] + }, + "LocalSecondaryIndexes" : { + "type" : "array", + "uniqueItems" : false, + "items" : { + "$ref" : "#/definitions/LocalSecondaryIndex" + } + }, + "OnDemandThroughput" : { + "$ref" : "#/definitions/OnDemandThroughput" + }, + "WarmThroughput" : { + "$ref" : "#/definitions/WarmThroughput" + }, + "PointInTimeRecoverySpecification" : { + "$ref" : "#/definitions/PointInTimeRecoverySpecification" + }, + "TableClass" : { + "type" : "string" + }, + "ProvisionedThroughput" : { + "$ref" : "#/definitions/ProvisionedThroughput" + }, + "SSESpecification" : { + "$ref" : "#/definitions/SSESpecification" + }, + "StreamSpecification" : { + "$ref" : "#/definitions/StreamSpecification" + }, + "TableName" : { + "type" : "string" + }, + "Tags" : { + "type" : "array", + "uniqueItems" : false, + "items" : { + "$ref" : "#/definitions/Tag" + } + }, + "TimeToLiveSpecification" : { + "$ref" : "#/definitions/TimeToLiveSpecification" + }, + "ContributorInsightsSpecification": { + "$ref": "#/definitions/ContributorInsightsSpecification" + }, + "KinesisStreamSpecification": { + "$ref": "#/definitions/KinesisStreamSpecification" + }, + "ImportSourceSpecification" : { + "$ref": "#/definitions/ImportSourceSpecification" + }, + "ResourcePolicy": { + "$ref": "#/definitions/ResourcePolicy" + } + }, + "propertyTransform": { + "/properties/SSESpecification/KMSMasterKeyId": "$join([\"arn:aws(-[a-z]{1,4}){0,2}:kms:[a-z]{2,4}(-[a-z]{1,4})?-[a-z]{1,10}-[0-9]:[0-9]{12}:key\\/\", SSESpecification.KMSMasterKeyId]) $OR $join([\"arn:aws(-[a-z]{1,4}){0,2}:kms:[a-z]{2,4}(-[a-z]{1,4})?-[a-z]{1,10}-[0-9]:[0-9]{12}:key\\/\", KMSMasterKeyId])" + }, + "definitions" : { + "StreamSpecification" : { + "type" : "object", + "additionalProperties" : false, + "properties" : { + "StreamViewType" : { + "type" : "string" + }, + "ResourcePolicy": { + "$ref": "#/definitions/ResourcePolicy" + } + }, + "required" : [ "StreamViewType" ] + }, + "DeprecatedKeySchema" : { + "type" : "object", + "additionalProperties" : false, + "properties" : { + "HashKeyElement" : { + "$ref" : "#/definitions/DeprecatedHashKeyElement" + } + }, + "required" : [ "HashKeyElement" ] + }, + "DeprecatedHashKeyElement" : { + "type" : "object", + "additionalProperties" : false, + "properties" : { + "AttributeType" : { + "type" : "string" + }, + "AttributeName" : { + "type" : "string" + } + }, + "required" : [ "AttributeType", "AttributeName" ] + }, + "KeySchema" : { + "type" : "object", + "additionalProperties" : false, + "properties" : { + "AttributeName" : { + "type" : "string" + }, + "KeyType" : { + "type" : "string" + } + }, + "required" : [ "KeyType", "AttributeName" ] + }, + "PointInTimeRecoverySpecification" : { + "type" : "object", + "additionalProperties" : false, + "properties" : { + "PointInTimeRecoveryEnabled" : { + "type" : "boolean" + } + } + }, + "KinesisStreamSpecification" : { + "type" : "object", + "additionalProperties" : false, + "properties" : { + "StreamArn" : { + "type" : "string", + "relationshipRef": { + "typeName": "AWS::Kinesis::Stream", + "propertyPath": "/properties/Arn" + } + }, + "ApproximateCreationDateTimePrecision" : { + "type": "string", + "enum": [ + "MICROSECOND", + "MILLISECOND" + ] + } + }, + "required" : [ "StreamArn" ] + }, + "TimeToLiveSpecification" : { + "type" : "object", + "additionalProperties" : false, + "properties" : { + "AttributeName" : { + "type" : "string" + }, + "Enabled" : { + "type" : "boolean" + } + }, + "required" : [ "Enabled" ] + }, + "LocalSecondaryIndex" : { + "type" : "object", + "additionalProperties" : false, + "properties" : { + "IndexName" : { + "type" : "string" + }, + "KeySchema" : { + "type" : "array", + "uniqueItems" : true, + "items" : { + "$ref" : "#/definitions/KeySchema" + } + }, + "Projection" : { + "$ref" : "#/definitions/Projection" + } + }, + "required" : [ "IndexName", "Projection", "KeySchema" ] + }, + "GlobalSecondaryIndex" : { + "type" : "object", + "additionalProperties" : false, + "properties" : { + "IndexName" : { + "type" : "string" + }, + "KeySchema" : { + "type" : "array", + "uniqueItems" : true, + "items" : { + "$ref" : "#/definitions/KeySchema" + } + }, + "Projection" : { + "$ref" : "#/definitions/Projection" + }, + "ProvisionedThroughput" : { + "$ref" : "#/definitions/ProvisionedThroughput" + }, + "OnDemandThroughput" : { + "$ref" : "#/definitions/OnDemandThroughput" + }, + "WarmThroughput" : { + "$ref" : "#/definitions/WarmThroughput" + }, + "ContributorInsightsSpecification": { + "$ref": "#/definitions/ContributorInsightsSpecification" + } + }, + "required" : [ "IndexName", "Projection", "KeySchema" ] + }, + "OnDemandThroughput" : { + "type" : "object", + "additionalProperties" : false, + "properties" : { + "MaxReadRequestUnits" : { + "type" : "integer", + "minimum": 1 + }, + "MaxWriteRequestUnits" : { + "type" : "integer", + "minimum": 1 + } + } + }, + "WarmThroughput" : { + "type" : "object", + "additionalProperties" : false, + "properties" : { + "ReadUnitsPerSecond" : { + "type" : "integer", + "minimum": 1 + }, + "WriteUnitsPerSecond" : { + "type" : "integer", + "minimum": 1 + } + }, + "anyOf": [ + {"required": ["ReadUnitsPerSecond"]}, + {"required": ["WriteUnitsPerSecond"]} + ] + }, + "SSESpecification" : { + "type" : "object", + "additionalProperties" : false, + "properties" : { + "KMSMasterKeyId" : { + "type" : "string", + "anyOf": [{ + "relationshipRef": { + "typeName": "AWS::KMS::Key", + "propertyPath": "/properties/Arn" + }},{ + "relationshipRef": { + "typeName": "AWS::KMS::Key", + "propertyPath": "/properties/KeyId" + }}, { + "relationshipRef": { + "typeName": "AWS::KMS::Alias", + "propertyPath": "/properties/AliasName" + } + }] + }, + "SSEEnabled" : { + "type" : "boolean" + }, + "SSEType" : { + "type" : "string" + } + }, + "required" : [ "SSEEnabled" ] + }, + "AttributeDefinition" : { + "type" : "object", + "additionalProperties" : false, + "properties" : { + "AttributeName" : { + "type" : "string" + }, + "AttributeType" : { + "type" : "string" + } + }, + "required" : [ "AttributeName", "AttributeType" ] + }, + "ProvisionedThroughput" : { + "type" : "object", + "additionalProperties" : false, + "properties" : { + "ReadCapacityUnits" : { + "type" : "integer" + }, + "WriteCapacityUnits" : { + "type" : "integer" + } + }, + "required" : [ "WriteCapacityUnits", "ReadCapacityUnits" ] + }, + "Tag" : { + "type" : "object", + "additionalProperties" : false, + "properties" : { + "Key" : { + "type" : "string" + }, + "Value" : { + "type" : "string" + } + }, + "required" : [ "Value", "Key" ] + }, + "Projection" : { + "type" : "object", + "additionalProperties" : false, + "properties" : { + "NonKeyAttributes" : { + "type" : "array", + "uniqueItems" : false, + "items" : { + "type" : "string" + } + }, + "ProjectionType" : { + "type" : "string" + } + } + }, + "ContributorInsightsSpecification": { + "type": "object", + "additionalProperties": false, + "properties": { + "Enabled": { + "type": "boolean" + } + }, + "required" : [ "Enabled" ] + }, + "ImportSourceSpecification" : { + "type" : "object", + "additionalProperties" : false, + "properties" : { + "S3BucketSource" : { + "$ref" : "#/definitions/S3BucketSource" + }, + "InputFormat" : { + "type" : "string" + }, + "InputFormatOptions" : { + "$ref" : "#/definitions/InputFormatOptions" + }, + "InputCompressionType" : { + "type" : "string" + } + }, + "required" : [ + "S3BucketSource", + "InputFormat" + ] + }, + "S3BucketSource" : { + "type" : "object", + "additionalProperties" : false, + "properties" : { + "S3BucketOwner" : { + "type" : "string" + }, + "S3Bucket" : { + "type" : "string", + "relationshipRef": { + "typeName": "AWS::S3::Bucket", + "propertyPath": "/properties/BucketName" + } + }, + "S3KeyPrefix" : { + "type" : "string" + } + }, + "required" : [ + "S3Bucket" + ] + }, + "InputFormatOptions" : { + "type" : "object", + "additionalProperties" : false, + "properties" : { + "Csv" : { + "$ref" : "#/definitions/Csv" + } + } + }, + "Csv" : { + "type" : "object", + "additionalProperties" : false, + "properties" : { + "HeaderList" : { + "type" : "array", + "uniqueItems" : true, + "items" : { + "type" : "string" + } + }, + "Delimiter" : { + "type" : "string" + } + } + }, + "ResourcePolicy": { + "type": "object", + "additionalProperties": false, + "properties": { + "PolicyDocument": { + "type": "object" + } + }, + "required": [ + "PolicyDocument" + ] + } + }, + "tagging": { + "taggable": true, + "tagOnCreate": true, + "tagUpdatable": true, + "cloudFormationSystemTags": false, + "tagProperty": "/properties/Tags", + "permissions": [ + "dynamodb:TagResource", + "dynamodb:UntagResource", + "dynamodb:ListTagsOfResource" + ] + }, + "required" : [ "KeySchema" ], + "readOnlyProperties" : [ "/properties/Arn", "/properties/StreamArn" ], + "createOnlyProperties" : [ + "/properties/TableName", + "/properties/DynamoDBEndpoint", + "/properties/ImportSourceSpecification" + ], + "primaryIdentifier" : [ "/properties/TableName" ], + "writeOnlyProperties": [ + "/properties/ImportSourceSpecification" + ], + "handlers": { + "create": { + "permissions": [ + "dynamodb:CreateTable", + "dynamodb:DescribeImport", + "dynamodb:DescribeTable", + "dynamodb:DescribeTimeToLive", + "dynamodb:UpdateTimeToLive", + "dynamodb:UpdateContributorInsights", + "dynamodb:UpdateContinuousBackups", + "dynamodb:DescribeContinuousBackups", + "dynamodb:DescribeContributorInsights", + "dynamodb:EnableKinesisStreamingDestination", + "dynamodb:DisableKinesisStreamingDestination", + "dynamodb:DescribeKinesisStreamingDestination", + "dynamodb:ImportTable", + "dynamodb:ListTagsOfResource", + "dynamodb:TagResource", + "dynamodb:UpdateTable", + "dynamodb:GetResourcePolicy", + "dynamodb:PutResourcePolicy", + "kinesis:DescribeStream", + "kinesis:PutRecords", + "iam:CreateServiceLinkedRole", + "kms:CreateGrant", + "kms:Decrypt", + "kms:DescribeKey", + "kms:ListAliases", + "kms:Encrypt", + "kms:RevokeGrant", + "logs:CreateLogGroup", + "logs:CreateLogStream", + "logs:DescribeLogGroups", + "logs:DescribeLogStreams", + "logs:PutLogEvents", + "logs:PutRetentionPolicy", + "s3:GetObject", + "s3:GetObjectMetadata", + "s3:ListBucket" + ], + "timeoutInMinutes": 720 + }, + "read": { + "permissions": [ + "dynamodb:DescribeTable", + "dynamodb:DescribeContinuousBackups", + "dynamodb:DescribeContributorInsights", + "dynamodb:DescribeKinesisStreamingDestination", + "dynamodb:ListTagsOfResource", + "dynamodb:GetResourcePolicy" + ] + }, + "update": { + "permissions": [ + "dynamodb:UpdateTable", + "dynamodb:DescribeTable", + "dynamodb:DescribeTimeToLive", + "dynamodb:UpdateTimeToLive", + "dynamodb:UpdateContinuousBackups", + "dynamodb:UpdateContributorInsights", + "dynamodb:UpdateKinesisStreamingDestination", + "dynamodb:DescribeContinuousBackups", + "dynamodb:DescribeKinesisStreamingDestination", + "dynamodb:ListTagsOfResource", + "dynamodb:TagResource", + "dynamodb:UntagResource", + "dynamodb:DescribeContributorInsights", + "dynamodb:EnableKinesisStreamingDestination", + "dynamodb:DisableKinesisStreamingDestination", + "dynamodb:GetResourcePolicy", + "dynamodb:PutResourcePolicy", + "dynamodb:DeleteResourcePolicy", + "kinesis:DescribeStream", + "kinesis:PutRecords", + "iam:CreateServiceLinkedRole", + "kms:CreateGrant", + "kms:DescribeKey", + "kms:ListAliases", + "kms:RevokeGrant" + ], + "timeoutInMinutes": 720 + }, + "delete": { + "permissions": [ + "dynamodb:DeleteTable", + "dynamodb:DescribeTable" + ], + "timeoutInMinutes": 720 + }, + "list": { + "permissions": [ + "dynamodb:ListTables" + ] + } + } + } + \ No newline at end of file