awscdk-dynamodb-global-tables
Advanced tools
Comparing version 0.0.2 to 0.0.3
193
API.md
@@ -49,2 +49,6 @@ # API Reference <a name="API Reference" id="api-reference"></a> | ||
| <code><a href="#awscdk-dynamodb-global-tables.GlobalTable.applyRemovalPolicy">applyRemovalPolicy</a></code> | Apply the given removal policy to this resource. | | ||
| <code><a href="#awscdk-dynamodb-global-tables.GlobalTable.grant">grant</a></code> | Adds an IAM policy statement associated with this table to an IAM principal's policy. | | ||
| <code><a href="#awscdk-dynamodb-global-tables.GlobalTable.grantReadData">grantReadData</a></code> | Permits an IAM principal all data read operations from this table: BatchGetItem, Query, GetItem, Scan, ConditionCheckItem, DescribeTable. | | ||
| <code><a href="#awscdk-dynamodb-global-tables.GlobalTable.grantReadWriteData">grantReadWriteData</a></code> | Permits an IAM principal to all data read/write operations to this table. BatchGetItem, Query, GetItem, Scan, ConditionCheckItem, DescribeTable, PutItem. | | ||
| <code><a href="#awscdk-dynamodb-global-tables.GlobalTable.grantWriteData">grantWriteData</a></code> | Permits an IAM principal all data write operations to this table: PutItem. | | ||
@@ -83,2 +87,70 @@ --- | ||
##### `grant` <a name="grant" id="awscdk-dynamodb-global-tables.GlobalTable.grant"></a> | ||
```typescript | ||
public grant(grantee: IGrantable, actions: string): Grant | ||
``` | ||
Adds an IAM policy statement associated with this table to an IAM principal's policy. | ||
###### `grantee`<sup>Required</sup> <a name="grantee" id="awscdk-dynamodb-global-tables.GlobalTable.grant.parameter.grantee"></a> | ||
- *Type:* aws-cdk-lib.aws_iam.IGrantable | ||
--- | ||
###### `actions`<sup>Required</sup> <a name="actions" id="awscdk-dynamodb-global-tables.GlobalTable.grant.parameter.actions"></a> | ||
- *Type:* string | ||
--- | ||
##### `grantReadData` <a name="grantReadData" id="awscdk-dynamodb-global-tables.GlobalTable.grantReadData"></a> | ||
```typescript | ||
public grantReadData(identity: IGrantable): Grant | ||
``` | ||
Permits an IAM principal all data read operations from this table: BatchGetItem, Query, GetItem, Scan, ConditionCheckItem, DescribeTable. | ||
###### `identity`<sup>Required</sup> <a name="identity" id="awscdk-dynamodb-global-tables.GlobalTable.grantReadData.parameter.identity"></a> | ||
- *Type:* aws-cdk-lib.aws_iam.IGrantable | ||
--- | ||
##### `grantReadWriteData` <a name="grantReadWriteData" id="awscdk-dynamodb-global-tables.GlobalTable.grantReadWriteData"></a> | ||
```typescript | ||
public grantReadWriteData(grantee: IGrantable): Grant | ||
``` | ||
Permits an IAM principal to all data read/write operations to this table. BatchGetItem, Query, GetItem, Scan, ConditionCheckItem, DescribeTable, PutItem. | ||
Appropriate grants will also be added to the customer-managed KMS key | ||
if one was configured. | ||
###### `grantee`<sup>Required</sup> <a name="grantee" id="awscdk-dynamodb-global-tables.GlobalTable.grantReadWriteData.parameter.grantee"></a> | ||
- *Type:* aws-cdk-lib.aws_iam.IGrantable | ||
--- | ||
##### `grantWriteData` <a name="grantWriteData" id="awscdk-dynamodb-global-tables.GlobalTable.grantWriteData"></a> | ||
```typescript | ||
public grantWriteData(grantee: IGrantable): Grant | ||
``` | ||
Permits an IAM principal all data write operations to this table: PutItem. | ||
Appropriate grants will also be added to the customer-managed KMS key | ||
if one was configured. | ||
###### `grantee`<sup>Required</sup> <a name="grantee" id="awscdk-dynamodb-global-tables.GlobalTable.grantWriteData.parameter.grantee"></a> | ||
- *Type:* aws-cdk-lib.aws_iam.IGrantable | ||
--- | ||
#### Static Functions <a name="Static Functions" id="Static Functions"></a> | ||
@@ -151,2 +223,4 @@ | ||
| <code><a href="#awscdk-dynamodb-global-tables.GlobalTable.property.stack">stack</a></code> | <code>aws-cdk-lib.Stack</code> | The stack in which this resource is defined. | | ||
| <code><a href="#awscdk-dynamodb-global-tables.GlobalTable.property.tableArn">tableArn</a></code> | <code>string</code> | *No description.* | | ||
| <code><a href="#awscdk-dynamodb-global-tables.GlobalTable.property.tableName">tableName</a></code> | <code>string</code> | *No description.* | | ||
@@ -198,3 +272,23 @@ --- | ||
##### `tableArn`<sup>Required</sup> <a name="tableArn" id="awscdk-dynamodb-global-tables.GlobalTable.property.tableArn"></a> | ||
```typescript | ||
public readonly tableArn: string; | ||
``` | ||
- *Type:* string | ||
--- | ||
##### `tableName`<sup>Required</sup> <a name="tableName" id="awscdk-dynamodb-global-tables.GlobalTable.property.tableName"></a> | ||
```typescript | ||
public readonly tableName: string; | ||
``` | ||
- *Type:* string | ||
--- | ||
## Structs <a name="Structs" id="Structs"></a> | ||
@@ -217,2 +311,3 @@ | ||
| <code><a href="#awscdk-dynamodb-global-tables.GlobalTableProps.property.partitionKey">partitionKey</a></code> | <code>aws-cdk-lib.aws_dynamodb.Attribute</code> | *No description.* | | ||
| <code><a href="#awscdk-dynamodb-global-tables.GlobalTableProps.property.tableName">tableName</a></code> | <code>string</code> | *No description.* | | ||
@@ -231,3 +326,13 @@ --- | ||
##### `tableName`<sup>Optional</sup> <a name="tableName" id="awscdk-dynamodb-global-tables.GlobalTableProps.property.tableName"></a> | ||
```typescript | ||
public readonly tableName: string; | ||
``` | ||
- *Type:* string | ||
--- | ||
## Protocols <a name="Protocols" id="Protocols"></a> | ||
@@ -241,3 +346,91 @@ | ||
#### Methods <a name="Methods" id="Methods"></a> | ||
| **Name** | **Description** | | ||
| --- | --- | | ||
| <code><a href="#awscdk-dynamodb-global-tables.IGlobalTable.grant">grant</a></code> | Adds an IAM policy statement associated with this table to an IAM principal's policy. | | ||
| <code><a href="#awscdk-dynamodb-global-tables.IGlobalTable.grantReadData">grantReadData</a></code> | Permits an IAM principal all data read operations from this table: BatchGetItem, Query, GetItem, Scan, ConditionCheckItem, DescribeTable. | | ||
| <code><a href="#awscdk-dynamodb-global-tables.IGlobalTable.grantReadWriteData">grantReadWriteData</a></code> | Permits an IAM principal to all data read/write operations to this table. BatchGetItem, Query, GetItem, Scan, ConditionCheckItem, DescribeTable, PutItem. | | ||
| <code><a href="#awscdk-dynamodb-global-tables.IGlobalTable.grantWriteData">grantWriteData</a></code> | Permits an IAM principal all data write operations to this table: PutItem. | | ||
--- | ||
##### `grant` <a name="grant" id="awscdk-dynamodb-global-tables.IGlobalTable.grant"></a> | ||
```typescript | ||
public grant(grantee: IGrantable, actions: string): Grant | ||
``` | ||
Adds an IAM policy statement associated with this table to an IAM principal's policy. | ||
###### `grantee`<sup>Required</sup> <a name="grantee" id="awscdk-dynamodb-global-tables.IGlobalTable.grant.parameter.grantee"></a> | ||
- *Type:* aws-cdk-lib.aws_iam.IGrantable | ||
The principal. | ||
--- | ||
###### `actions`<sup>Required</sup> <a name="actions" id="awscdk-dynamodb-global-tables.IGlobalTable.grant.parameter.actions"></a> | ||
- *Type:* string | ||
The set of actions to allow (i.e. "dynamodb:PutItem", "dynamodb:GetItem", ...). | ||
--- | ||
##### `grantReadData` <a name="grantReadData" id="awscdk-dynamodb-global-tables.IGlobalTable.grantReadData"></a> | ||
```typescript | ||
public grantReadData(grantee: IGrantable): Grant | ||
``` | ||
Permits an IAM principal all data read operations from this table: BatchGetItem, Query, GetItem, Scan, ConditionCheckItem, DescribeTable. | ||
###### `grantee`<sup>Required</sup> <a name="grantee" id="awscdk-dynamodb-global-tables.IGlobalTable.grantReadData.parameter.grantee"></a> | ||
- *Type:* aws-cdk-lib.aws_iam.IGrantable | ||
The principal to grant access to. | ||
--- | ||
##### `grantReadWriteData` <a name="grantReadWriteData" id="awscdk-dynamodb-global-tables.IGlobalTable.grantReadWriteData"></a> | ||
```typescript | ||
public grantReadWriteData(grantee: IGrantable): Grant | ||
``` | ||
Permits an IAM principal to all data read/write operations to this table. BatchGetItem, Query, GetItem, Scan, ConditionCheckItem, DescribeTable, PutItem. | ||
Appropriate grants will also be added to the customer-managed KMS key | ||
if one was configured. | ||
###### `grantee`<sup>Required</sup> <a name="grantee" id="awscdk-dynamodb-global-tables.IGlobalTable.grantReadWriteData.parameter.grantee"></a> | ||
- *Type:* aws-cdk-lib.aws_iam.IGrantable | ||
The principal to grant access to. | ||
--- | ||
##### `grantWriteData` <a name="grantWriteData" id="awscdk-dynamodb-global-tables.IGlobalTable.grantWriteData"></a> | ||
```typescript | ||
public grantWriteData(grantee: IGrantable): Grant | ||
``` | ||
Permits an IAM principal all data write operations to this table: PutItem. | ||
Appropriate grants will also be added to the customer-managed KMS key | ||
if one was configured. | ||
###### `grantee`<sup>Required</sup> <a name="grantee" id="awscdk-dynamodb-global-tables.IGlobalTable.grantWriteData.parameter.grantee"></a> | ||
- *Type:* aws-cdk-lib.aws_iam.IGrantable | ||
The principal to grant access to. | ||
--- | ||
#### Properties <a name="Properties" id="Properties"></a> | ||
@@ -244,0 +437,0 @@ |
import { IResource, Resource } from 'aws-cdk-lib'; | ||
import * as ddb from 'aws-cdk-lib/aws-dynamodb'; | ||
import * as iam from 'aws-cdk-lib/aws-iam'; | ||
import { Construct } from 'constructs'; | ||
export interface IGlobalTable extends IResource { | ||
/** | ||
* Adds an IAM policy statement associated with this table to an IAM | ||
* principal's policy. | ||
* @param grantee The principal | ||
* @param actions The set of actions to allow (i.e. "dynamodb:PutItem", "dynamodb:GetItem", ...) | ||
*/ | ||
grant(grantee: iam.IGrantable, ...actions: string[]): iam.Grant; | ||
/** | ||
* Permits an IAM principal all data read operations from this table: | ||
* BatchGetItem, Query, GetItem, Scan, ConditionCheckItem, DescribeTable. | ||
* @param grantee The principal to grant access to | ||
*/ | ||
grantReadData(grantee: iam.IGrantable): iam.Grant; | ||
/** | ||
* Permits an IAM principal all data write operations to this table: | ||
* PutItem. | ||
* | ||
* Appropriate grants will also be added to the customer-managed KMS key | ||
* if one was configured. | ||
* | ||
* @param grantee The principal to grant access to | ||
*/ | ||
grantWriteData(grantee: iam.IGrantable): iam.Grant; | ||
/** | ||
* Permits an IAM principal to all data read/write operations to this table. | ||
* BatchGetItem, Query, GetItem, Scan, ConditionCheckItem, DescribeTable, | ||
* PutItem | ||
* | ||
* Appropriate grants will also be added to the customer-managed KMS key | ||
* if one was configured. | ||
* | ||
* @param grantee The principal to grant access to | ||
*/ | ||
grantReadWriteData(grantee: iam.IGrantable): iam.Grant; | ||
} | ||
declare abstract class GlobalTableBase extends Resource implements IGlobalTable { | ||
abstract readonly tableArn: string; | ||
abstract readonly tableName: string; | ||
protected readonly regionalArns: string[]; | ||
grant(grantee: iam.IGrantable, ...actions: string[]): iam.Grant; | ||
grantReadData(identity: iam.IGrantable): iam.Grant; | ||
grantWriteData(grantee: iam.IGrantable): iam.Grant; | ||
grantReadWriteData(grantee: iam.IGrantable): iam.Grant; | ||
} | ||
export interface GlobalTableProps { | ||
readonly partitionKey: ddb.Attribute; | ||
readonly tableName?: string; | ||
} | ||
export declare class GlobalTable extends GlobalTableBase { | ||
readonly tableArn: string; | ||
readonly tableName: string; | ||
constructor(scope: Construct, id: string, props: GlobalTableProps); | ||
} | ||
export {}; |
@@ -8,8 +8,41 @@ "use strict"; | ||
const ddb = require("aws-cdk-lib/aws-dynamodb"); | ||
const iam = require("aws-cdk-lib/aws-iam"); | ||
const perms = require("./perms"); | ||
class GlobalTableBase extends aws_cdk_lib_1.Resource { | ||
constructor() { | ||
super(...arguments); | ||
this.regionalArns = new Array(); | ||
} | ||
grant(grantee, ...actions) { | ||
return iam.Grant.addToPrincipal({ | ||
grantee, | ||
actions, | ||
resourceArns: [ | ||
this.tableArn, | ||
], | ||
scope: this, | ||
}); | ||
} | ||
grantReadData(identity) { | ||
return this.grant(identity, ...perms.READ_DATA_ACTIONS.concat(perms.DESCRIBE_TABLE)); | ||
} | ||
grantWriteData(grantee) { | ||
return this.grant(grantee, ...perms.WRITE_DATA_ACTIONS.concat(perms.DESCRIBE_TABLE)); | ||
} | ||
grantReadWriteData(grantee) { | ||
return this.grant(grantee, ...perms.READ_DATA_ACTIONS.concat(perms.WRITE_DATA_ACTIONS).concat(perms.DESCRIBE_TABLE)); | ||
} | ||
} | ||
class GlobalTable extends GlobalTableBase { | ||
constructor(scope, id, props) { | ||
super(scope, id); | ||
new ddb.CfnGlobalTable(this, 'Resource', { | ||
super(scope, id, { | ||
physicalName: props.tableName, | ||
}); | ||
if (props.tableName !== undefined && | ||
!aws_cdk_lib_1.Token.isUnresolved(props.tableName) && | ||
!/^[_a-zA-Z]+$/.test(props.tableName)) { | ||
throw new Error('tableName must be non-empty and contain only letters and underscores, ' + | ||
`got: '${props.tableName}'`); | ||
} | ||
const resource = new ddb.CfnGlobalTable(this, 'Resource', { | ||
attributeDefinitions: [{ | ||
@@ -27,4 +60,11 @@ attributeName: props.partitionKey.name, | ||
}], | ||
}).applyRemovalPolicy(aws_cdk_lib_1.RemovalPolicy.RETAIN); | ||
; | ||
tableName: this.physicalName, | ||
}); | ||
resource.applyRemovalPolicy(aws_cdk_lib_1.RemovalPolicy.DESTROY); | ||
this.tableArn = this.getResourceArnAttribute(resource.attrArn, { | ||
service: 'dynamodb', | ||
resource: 'GlobalTable', | ||
resourceName: this.physicalName, | ||
}); | ||
this.tableName = this.getResourceNameAttribute(resource.ref); | ||
} | ||
@@ -34,3 +74,3 @@ } | ||
_a = JSII_RTTI_SYMBOL_1; | ||
GlobalTable[_a] = { fqn: "awscdk-dynamodb-global-tables.GlobalTable", version: "0.0.2" }; | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZ2xvYmFsLXRhYmxlLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vc3JjL2dsb2JhbC10YWJsZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7OztBQUFBLDZDQUF3RTtBQUN4RSxnREFBZ0Q7QUFNaEQsTUFBZSxlQUFnQixTQUFRLHNCQUFRO0NBQzlDO0FBTUQsTUFBYSxXQUFZLFNBQVEsZUFBZTtJQUU5QyxZQUFZLEtBQWdCLEVBQUUsRUFBVSxFQUFFLEtBQXVCO1FBQy9ELEtBQUssQ0FBQyxLQUFLLEVBQUUsRUFBRSxDQUFDLENBQUM7UUFDakIsSUFBSSxHQUFHLENBQUMsY0FBYyxDQUFDLElBQUksRUFBRSxVQUFVLEVBQUU7WUFDdkMsb0JBQW9CLEVBQUUsQ0FBQztvQkFDckIsYUFBYS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zcyBHbG9iYWxUYWJsZSBleHRlbmRzIEdsb2JhbFRhYmxlQmFzZSB7XG5cbiAgY29uc3RydWN0b3Ioc2NvcGU6IENvbnN0cnVjdCwgaWQ6IHN0cmluZywgcHJvcHM6IEdsb2JhbFRhYmxlUHJvcHMpIHtcbiAgICBzdXBlcihzY29wZSwgaWQpO1xuICAgIG5ldyBkZGIuQ2ZuR2xvYmFsVGFibGUodGhpcywgJ1Jlc291cmNlJywge1xuICAgICAgYXR0cmlidXRlRGVmaW5pdGlvbnM6IFt7XG4gICAgICAgIGF0dHJpYnV0ZU5hbWU6IHByb3BzLnBhcnRpdGlvbktleS5uYW1lLFxuICAgICAgICBhdHRyaWJ1dGVUeXBlOiBwcm9wcy5wYXJ0aXRpb25LZXkudHlwZSxcbiAgICAgIH1dLFxuICAgICAgYmlsbGluZ01vZGU6ICdQQVlfUEVSX1JFUVVFU1QnLFxuICAgICAga2V5U2NoZW1hOiBbe1xuICAgICAgICBhdHRyaWJ1dGVOYW1lOiBwcm9wcy5wYXJ0aXRpb25LZXkubmFtZSxcbiAgICAgICAga2V5VHlwZTogJ0hBU0gnLFxuICAgICAgfV0sXG4gICAgICByZXBsaWNhczogW3tcbiAgICAgICAgcmVnaW9uOiBTdGFjay5vZihzY29wZSkucmVnaW9uLFxuICAgICAgfV0sXG4gICAgfSkuYXBwbHlSZW1vdmFsUG9saWN5KFJlbW92YWxQb2xpY3kuUkVUQUlOKTs7XG4gIH1cbn0iXX0= | ||
GlobalTable[_a] = { fqn: "awscdk-dynamodb-global-tables.GlobalTable", version: "0.0.3" }; | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZ2xvYmFsLXRhYmxlLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vc3JjL2dsb2JhbC10YWJsZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7OztBQUFBLDZDQUErRTtBQUMvRSxnREFBZ0Q7QU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XNpY2FsTmFtZSxcbiAgICB9KTtcbiAgICByZXNvdXJjZS5hcHBseVJlbW92YWxQb2xpY3koUmVtb3ZhbFBvbGljeS5ERVNUUk9ZKTtcbiAgICB0aGlzLnRhYmxlQXJuID0gdGhpcy5nZXRSZXNvdXJjZUFybkF0dHJpYnV0ZShyZXNvdXJjZS5hdHRyQXJuLFxuICAgICAge1xuICAgICAgICBzZXJ2aWNlOiAnZHluYW1vZGInLFxuICAgICAgICByZXNvdXJjZTogJ0dsb2JhbFRhYmxlJyxcbiAgICAgICAgcmVzb3VyY2VOYW1lOiB0aGlzLnBoeXNpY2FsTmFtZSxcbiAgICAgIH0sXG4gICAgKTtcbiAgICB0aGlzLnRhYmxlTmFtZSA9IHRoaXMuZ2V0UmVzb3VyY2VOYW1lQXR0cmlidXRlKHJlc291cmNlLnJlZik7XG4gIH1cbn0iXX0= |
@@ -70,3 +70,3 @@ { | ||
"license": "Apache-2.0", | ||
"version": "0.0.2", | ||
"version": "0.0.3", | ||
"jest": { | ||
@@ -73,0 +73,0 @@ "testMatch": [ |
Sorry, the diff of this file is not supported yet
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
153454
15
180