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

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions packages/@aws-cdk/aws-s3tables-alpha/.npmignore
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,4 @@ jest.config.js
junit.xml
!*.lit.ts
**/*.snapshot
test/
14 changes: 9 additions & 5 deletions packages/@aws-cdk/aws-s3tables-alpha/README.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
# Amazon S3 Tables Construct Library

<!--BEGIN STABILITY BANNER-->

---

![cdk-constructs: Experimental](https://img.shields.io/badge/cdk--constructs-experimental-important.svg?style=for-the-badge)

> The APIs of higher level constructs in this module are experimental and under active development. They are subject to non-backward compatible changes or removal in any future version. These are not subject to the [Semantic Versioning](https://semver.org/) model and breaking changes will be announced in the release notes. This means that while you may use them, you may need to update your source code when upgrading to a newer version of this package.
> The APIs of higher level constructs in this module are experimental and under active development.
> They are subject to non-backward compatible changes or removal in any future version. These are
> not subject to the [Semantic Versioning](https://semver.org/) model and breaking changes will be
> announced in the release notes. This means that while you may use them, you may need to update
> your source code when upgrading to a newer version of this package.

---

Expand All @@ -25,7 +28,7 @@ Amazon S3 Tables deliver the first cloud object store with built-in Apache Icebe

```ts
// Build a Table bucket
const tableBucket = new TableBucket(scope, 'ExampleTableBucket', {
const sampleTableBucket = new TableBucket(scope, 'ExampleTableBucket', {
tableBucketName: 'example-bucket-1',
// optional fields:
unreferencedFileRemoval: {
Expand All @@ -45,7 +48,8 @@ Learn more about table buckets maintenance operations and default behavior from
const accountId = '123456789012'
tableBucket.grantRead(new iam.AccountPrincipal(accountId), '*');
// Grant the role write permissions to the bucket and all tables within
tableBucket.grantWrite(new iam.Role(stack, 'MyRole'), '*');
const role = new iam.Role(stack, 'MyRole', { assumedBy: new iam.ServicePrincipal('sample') });
tableBucket.grantWrite(role, '*');
// Grant the user read and write permissions to the bucket and all tables within
tableBucket.grantReadWrite(new iam.User(stack, 'MyUser'), '*');

Expand All @@ -55,7 +59,7 @@ tableBucket.grantReadWrite(new iam.AccountPrincipal(accountId), tableId);

// Add custom resource policy statements
const permissions = new iam.PolicyStatement({
effect: Effect.ALLOW,
effect: iam.Effect.ALLOW,
actions: ['s3tables:*'],
principals: [ new iam.ServicePrincipal('example.aws.internal') ],
resources: ['*']
Expand Down
10 changes: 10 additions & 0 deletions packages/@aws-cdk/aws-s3tables-alpha/awslint.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"exclude": [
"props-physical-name:@aws-cdk/aws-s3tables-alpha.TableBucketPolicyProps",
"duration-prop-type:@aws-cdk/aws-s3tables-alpha.UnreferencedFileRemoval.noncurrentDays",
"duration-prop-name:@aws-cdk/aws-s3tables-alpha.UnreferencedFileRemoval.noncurrentDays",
"duration-prop-type:@aws-cdk/aws-s3tables-alpha.UnreferencedFileRemoval.unreferencedDays",
"duration-prop-name:@aws-cdk/aws-s3tables-alpha.UnreferencedFileRemoval.unreferencedDays",
"attribute-tag:@aws-cdk/aws-s3tables-alpha.TableBucket.tableBucketPolicy"
]
}
4 changes: 2 additions & 2 deletions packages/@aws-cdk/aws-s3tables-alpha/lib/table-bucket.ts
Original file line number Diff line number Diff line change
Expand Up @@ -295,12 +295,12 @@ export interface TableBucketAttributes {
*
* @stateful
* @example
* const tableBucket = new TableBucket(scope, 'ExampleTableBucket', {
* const sampleTableBucket = new TableBucket(scope, 'ExampleTableBucket', {
* tableBucketName: 'example-bucket',
* // Optional fields:
* unreferencedFileRemoval: {
* noncurrentDays: 123,
* status: 'status',
* status: UnreferencedFileRemovalStatus.ENABLED,
* unreferencedDays: 123,
* },
* });
Expand Down
13 changes: 3 additions & 10 deletions packages/@aws-cdk/aws-s3tables-alpha/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@aws-cdk/aws-s3tables-alpha",
"private": true,
"private": false,
"version": "0.0.0",
"description": "CDK Constructs for S3 Tables",
"main": "lib/index.js",
Expand Down Expand Up @@ -103,14 +103,7 @@
"AWSLINT_BASE_CONSTRUCT": true
}
},
"awslint": {
"exclude": [
"props-physical-name:@aws-cdk/aws-s3tables-alpha.TableBucketPolicyProps",
"duration-prop-type:@aws-cdk/aws-s3tables-alpha.UnreferencedFileRemoval.noncurrentDays",
"duration-prop-name:@aws-cdk/aws-s3tables-alpha.UnreferencedFileRemoval.noncurrentDays",
"duration-prop-type:@aws-cdk/aws-s3tables-alpha.UnreferencedFileRemoval.unreferencedDays",
"duration-prop-name:@aws-cdk/aws-s3tables-alpha.UnreferencedFileRemoval.unreferencedDays",
"attribute-tag:@aws-cdk/aws-s3tables-alpha.TableBucket.tableBucketPolicy"
]
"publishConfig": {
"tag": "latest"
}
}
15 changes: 15 additions & 0 deletions packages/@aws-cdk/aws-s3tables-alpha/rosetta/default.ts-fixture
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import { Construct } from 'constructs';
import { Stack } from 'aws-cdk-lib';
import { TableBucket, UnreferencedFileRemovalStatus } from '@aws-cdk/aws-s3tables-alpha';
import * as iam from 'aws-cdk-lib/aws-iam';

class Fixture extends Stack {
constructor(scope: Construct, id: string) {
super(scope, id);
const tableBucket = new TableBucket(scope, 'ExampleTableBucket', {
tableBucketName: 'example-bucket-1'
});
const stack = this;
/// here
}
}