@aws-cdk/aws-dynamodb
Advanced tools
Comparing version 1.108.1 to 1.109.0
@@ -129,9 +129,7 @@ import * as cloudwatch from '@aws-cdk/aws-cloudwatch'; | ||
/** | ||
* Properties of a DynamoDB Table. | ||
* Represents the table schema attributes. | ||
* | ||
* Use {@link TableProps} for all table properties | ||
* | ||
* @stability stable | ||
*/ | ||
export interface TableOptions { | ||
export interface SchemaOptions { | ||
/** | ||
@@ -144,3 +142,3 @@ * Partition key attribute definition. | ||
/** | ||
* Table sort key attribute definition. | ||
* Sort key attribute definition. | ||
* | ||
@@ -151,2 +149,11 @@ * @default no sort key | ||
readonly sortKey?: Attribute; | ||
} | ||
/** | ||
* Properties of a DynamoDB Table. | ||
* | ||
* Use {@link TableProps} for all table properties | ||
* | ||
* @stability stable | ||
*/ | ||
export interface TableOptions extends SchemaOptions { | ||
/** | ||
@@ -308,17 +315,4 @@ * The read capacity for the table. | ||
*/ | ||
export interface GlobalSecondaryIndexProps extends SecondaryIndexProps { | ||
export interface GlobalSecondaryIndexProps extends SecondaryIndexProps, SchemaOptions { | ||
/** | ||
* The attribute of a partition key for the global secondary index. | ||
* | ||
* @stability stable | ||
*/ | ||
readonly partitionKey: Attribute; | ||
/** | ||
* The attribute of a sort key for the global secondary index. | ||
* | ||
* @default - No sort key | ||
* @stability stable | ||
*/ | ||
readonly sortKey?: Attribute; | ||
/** | ||
* The read capacity for the global secondary index. | ||
@@ -874,3 +868,3 @@ * | ||
private readonly localSecondaryIndexes; | ||
private readonly secondaryIndexNames; | ||
private readonly secondaryIndexSchemas; | ||
private readonly nonKeyAttributes; | ||
@@ -931,2 +925,9 @@ private readonly tablePartitionKey; | ||
/** | ||
* Get schema attributes of table or index. | ||
* | ||
* @returns Schema of table or index. | ||
* @stability stable | ||
*/ | ||
schema(indexName?: string): SchemaOptions; | ||
/** | ||
* Validate the table construct. | ||
@@ -933,0 +934,0 @@ * |
{ | ||
"name": "@aws-cdk/aws-dynamodb", | ||
"version": "1.108.1", | ||
"version": "1.109.0", | ||
"description": "The CDK Construct Library for AWS::DynamoDB", | ||
@@ -52,3 +52,5 @@ "main": "lib/index.js", | ||
"gen": "cfn2ts", | ||
"rosetta:extract": "yarn --silent jsii-rosetta extract" | ||
"rosetta:extract": "yarn --silent jsii-rosetta extract", | ||
"build+extract": "yarn build && yarn rosetta:extract", | ||
"build+test+extract": "yarn build+test && yarn rosetta:extract" | ||
}, | ||
@@ -80,19 +82,19 @@ "cdk-build": { | ||
"aws-sdk-mock": "^5.1.0", | ||
"cdk-build-tools": "1.108.1", | ||
"cdk-integ-tools": "1.108.1", | ||
"cfn2ts": "1.108.1", | ||
"cdk-build-tools": "1.109.0", | ||
"cdk-integ-tools": "1.109.0", | ||
"cfn2ts": "1.109.0", | ||
"jest": "^26.6.3", | ||
"pkglint": "1.108.1", | ||
"pkglint": "1.109.0", | ||
"sinon": "^9.2.4", | ||
"ts-jest": "^26.5.6", | ||
"@aws-cdk/assert-internal": "1.108.1" | ||
"@aws-cdk/assert-internal": "1.109.0" | ||
}, | ||
"dependencies": { | ||
"@aws-cdk/aws-applicationautoscaling": "1.108.1", | ||
"@aws-cdk/aws-cloudwatch": "1.108.1", | ||
"@aws-cdk/aws-iam": "1.108.1", | ||
"@aws-cdk/aws-kms": "1.108.1", | ||
"@aws-cdk/aws-lambda": "1.108.1", | ||
"@aws-cdk/core": "1.108.1", | ||
"@aws-cdk/custom-resources": "1.108.1", | ||
"@aws-cdk/aws-applicationautoscaling": "1.109.0", | ||
"@aws-cdk/aws-cloudwatch": "1.109.0", | ||
"@aws-cdk/aws-iam": "1.109.0", | ||
"@aws-cdk/aws-kms": "1.109.0", | ||
"@aws-cdk/aws-lambda": "1.109.0", | ||
"@aws-cdk/core": "1.109.0", | ||
"@aws-cdk/custom-resources": "1.109.0", | ||
"constructs": "^3.3.69" | ||
@@ -102,9 +104,9 @@ }, | ||
"peerDependencies": { | ||
"@aws-cdk/aws-applicationautoscaling": "1.108.1", | ||
"@aws-cdk/aws-cloudwatch": "1.108.1", | ||
"@aws-cdk/aws-iam": "1.108.1", | ||
"@aws-cdk/aws-kms": "1.108.1", | ||
"@aws-cdk/aws-lambda": "1.108.1", | ||
"@aws-cdk/core": "1.108.1", | ||
"@aws-cdk/custom-resources": "1.108.1", | ||
"@aws-cdk/aws-applicationautoscaling": "1.109.0", | ||
"@aws-cdk/aws-cloudwatch": "1.109.0", | ||
"@aws-cdk/aws-iam": "1.109.0", | ||
"@aws-cdk/aws-kms": "1.109.0", | ||
"@aws-cdk/aws-lambda": "1.109.0", | ||
"@aws-cdk/core": "1.109.0", | ||
"@aws-cdk/custom-resources": "1.109.0", | ||
"constructs": "^3.3.69" | ||
@@ -111,0 +113,0 @@ }, |
@@ -176,1 +176,13 @@ # Amazon DynamoDB Construct Library | ||
``` | ||
## Get schema of table or secondary indexes | ||
To get the partition key and sort key of the table or indexes you have configured: | ||
```ts | ||
const { partitionKey, sortKey } = table.schema(); | ||
// In case you want to get schema details for any secondary index | ||
const { partitionKey, sortKey } = table.schema(INDEX_NAME); | ||
``` |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
996826
6016
188
+ Added@aws-cdk/assets@1.109.0(transitive)
+ Added@aws-cdk/aws-applicationautoscaling@1.109.0(transitive)
+ Added@aws-cdk/aws-autoscaling-common@1.109.0(transitive)
+ Added@aws-cdk/aws-cloudformation@1.109.0(transitive)
+ Added@aws-cdk/aws-cloudwatch@1.109.0(transitive)
+ Added@aws-cdk/aws-codeguruprofiler@1.109.0(transitive)
+ Added@aws-cdk/aws-codestarnotifications@1.109.0(transitive)
+ Added@aws-cdk/aws-ec2@1.109.0(transitive)
+ Added@aws-cdk/aws-ecr@1.109.0(transitive)
+ Added@aws-cdk/aws-ecr-assets@1.109.0(transitive)
+ Added@aws-cdk/aws-efs@1.109.0(transitive)
+ Added@aws-cdk/aws-events@1.109.0(transitive)
+ Added@aws-cdk/aws-iam@1.109.0(transitive)
+ Added@aws-cdk/aws-kms@1.109.0(transitive)
+ Added@aws-cdk/aws-lambda@1.109.0(transitive)
+ Added@aws-cdk/aws-logs@1.109.0(transitive)
+ Added@aws-cdk/aws-s3@1.109.0(transitive)
+ Added@aws-cdk/aws-s3-assets@1.109.0(transitive)
+ Added@aws-cdk/aws-signer@1.109.0(transitive)
+ Added@aws-cdk/aws-sns@1.109.0(transitive)
+ Added@aws-cdk/aws-sqs@1.109.0(transitive)
+ Added@aws-cdk/aws-ssm@1.109.0(transitive)
+ Added@aws-cdk/cloud-assembly-schema@1.109.0(transitive)
+ Added@aws-cdk/core@1.109.0(transitive)
+ Added@aws-cdk/custom-resources@1.109.0(transitive)
+ Added@aws-cdk/cx-api@1.109.0(transitive)
+ Added@aws-cdk/region-info@1.109.0(transitive)
- Removed@aws-cdk/assets@1.108.1(transitive)
- Removed@aws-cdk/aws-applicationautoscaling@1.108.1(transitive)
- Removed@aws-cdk/aws-autoscaling-common@1.108.1(transitive)
- Removed@aws-cdk/aws-cloudformation@1.108.1(transitive)
- Removed@aws-cdk/aws-cloudwatch@1.108.1(transitive)
- Removed@aws-cdk/aws-codeguruprofiler@1.108.1(transitive)
- Removed@aws-cdk/aws-ec2@1.108.1(transitive)
- Removed@aws-cdk/aws-ecr@1.108.1(transitive)
- Removed@aws-cdk/aws-ecr-assets@1.108.1(transitive)
- Removed@aws-cdk/aws-efs@1.108.1(transitive)
- Removed@aws-cdk/aws-events@1.108.1(transitive)
- Removed@aws-cdk/aws-iam@1.108.1(transitive)
- Removed@aws-cdk/aws-kms@1.108.1(transitive)
- Removed@aws-cdk/aws-lambda@1.108.1(transitive)
- Removed@aws-cdk/aws-logs@1.108.1(transitive)
- Removed@aws-cdk/aws-s3@1.108.1(transitive)
- Removed@aws-cdk/aws-s3-assets@1.108.1(transitive)
- Removed@aws-cdk/aws-signer@1.108.1(transitive)
- Removed@aws-cdk/aws-sns@1.108.1(transitive)
- Removed@aws-cdk/aws-sqs@1.108.1(transitive)
- Removed@aws-cdk/aws-ssm@1.108.1(transitive)
- Removed@aws-cdk/cloud-assembly-schema@1.108.1(transitive)
- Removed@aws-cdk/core@1.108.1(transitive)
- Removed@aws-cdk/custom-resources@1.108.1(transitive)
- Removed@aws-cdk/cx-api@1.108.1(transitive)
- Removed@aws-cdk/region-info@1.108.1(transitive)
Updated@aws-cdk/aws-iam@1.109.0
Updated@aws-cdk/aws-kms@1.109.0
Updated@aws-cdk/aws-lambda@1.109.0
Updated@aws-cdk/core@1.109.0