aws-cdk.aws-s3tables-alpha 2.207.0a0__py3-none-any.whl → 2.223.0a0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- aws_cdk/aws_s3tables_alpha/__init__.py +2755 -508
- aws_cdk/aws_s3tables_alpha/_jsii/__init__.py +2 -2
- aws_cdk/aws_s3tables_alpha/_jsii/aws-s3tables-alpha@2.223.0-alpha.0.jsii.tgz +0 -0
- {aws_cdk_aws_s3tables_alpha-2.207.0a0.dist-info → aws_cdk_aws_s3tables_alpha-2.223.0a0.dist-info}/METADATA +86 -8
- aws_cdk_aws_s3tables_alpha-2.223.0a0.dist-info/RECORD +10 -0
- aws_cdk/aws_s3tables_alpha/_jsii/aws-s3tables-alpha@2.207.0-alpha.0.jsii.tgz +0 -0
- aws_cdk_aws_s3tables_alpha-2.207.0a0.dist-info/RECORD +0 -10
- {aws_cdk_aws_s3tables_alpha-2.207.0a0.dist-info → aws_cdk_aws_s3tables_alpha-2.223.0a0.dist-info}/LICENSE +0 -0
- {aws_cdk_aws_s3tables_alpha-2.207.0a0.dist-info → aws_cdk_aws_s3tables_alpha-2.223.0a0.dist-info}/NOTICE +0 -0
- {aws_cdk_aws_s3tables_alpha-2.207.0a0.dist-info → aws_cdk_aws_s3tables_alpha-2.223.0a0.dist-info}/WHEEL +0 -0
- {aws_cdk_aws_s3tables_alpha-2.207.0a0.dist-info → aws_cdk_aws_s3tables_alpha-2.223.0a0.dist-info}/top_level.txt +0 -0
|
@@ -38,6 +38,57 @@ sample_table_bucket = TableBucket(scope, "ExampleTableBucket",
|
|
|
38
38
|
)
|
|
39
39
|
```
|
|
40
40
|
|
|
41
|
+
### Define an S3 Tables Namespace
|
|
42
|
+
|
|
43
|
+
```python
|
|
44
|
+
# Build a namespace
|
|
45
|
+
sample_namespace = Namespace(scope, "ExampleNamespace",
|
|
46
|
+
namespace_name="example-namespace-1",
|
|
47
|
+
table_bucket=table_bucket
|
|
48
|
+
)
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
### Define an S3 Table
|
|
52
|
+
|
|
53
|
+
```python
|
|
54
|
+
# Build a table
|
|
55
|
+
sample_table = Table(scope, "ExampleTable",
|
|
56
|
+
table_name="example_table",
|
|
57
|
+
namespace=namespace,
|
|
58
|
+
open_table_format=OpenTableFormat.ICEBERG,
|
|
59
|
+
without_metadata=True
|
|
60
|
+
)
|
|
61
|
+
|
|
62
|
+
# Build a table with an Iceberg Schema
|
|
63
|
+
sample_table_with_schema = Table(scope, "ExampleSchemaTable",
|
|
64
|
+
table_name="example_table_with_schema",
|
|
65
|
+
namespace=namespace,
|
|
66
|
+
open_table_format=OpenTableFormat.ICEBERG,
|
|
67
|
+
iceberg_metadata=IcebergMetadataProperty(
|
|
68
|
+
iceberg_schema=IcebergSchemaProperty(
|
|
69
|
+
schema_field_list=[SchemaFieldProperty(
|
|
70
|
+
name="id",
|
|
71
|
+
type="int",
|
|
72
|
+
required=True
|
|
73
|
+
), SchemaFieldProperty(
|
|
74
|
+
name="name",
|
|
75
|
+
type="string"
|
|
76
|
+
)
|
|
77
|
+
]
|
|
78
|
+
)
|
|
79
|
+
),
|
|
80
|
+
compaction=CompactionProperty(
|
|
81
|
+
status=Status.ENABLED,
|
|
82
|
+
target_file_size_mb=128
|
|
83
|
+
),
|
|
84
|
+
snapshot_management=SnapshotManagementProperty(
|
|
85
|
+
status=Status.ENABLED,
|
|
86
|
+
max_snapshot_age_hours=48,
|
|
87
|
+
min_snapshots_to_keep=5
|
|
88
|
+
)
|
|
89
|
+
)
|
|
90
|
+
```
|
|
91
|
+
|
|
41
92
|
Learn more about table buckets maintenance operations and default behavior from the [S3 Tables User Guide](https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-table-buckets-maintenance.html)
|
|
42
93
|
|
|
43
94
|
### Controlling Table Bucket Permissions
|
|
@@ -105,12 +156,39 @@ encrypted_bucket_auto = TableBucket(scope, "EncryptedTableBucketAuto",
|
|
|
105
156
|
)
|
|
106
157
|
```
|
|
107
158
|
|
|
159
|
+
### Controlling Table Permissions
|
|
160
|
+
|
|
161
|
+
```python
|
|
162
|
+
# Grant the principal read permissions to the table
|
|
163
|
+
account_id = "123456789012"
|
|
164
|
+
table.grant_read(iam.AccountPrincipal(account_id))
|
|
165
|
+
|
|
166
|
+
# Grant the role write permissions to the table
|
|
167
|
+
role = iam.Role(stack, "MyRole", assumed_by=iam.ServicePrincipal("sample"))
|
|
168
|
+
table.grant_write(role)
|
|
169
|
+
|
|
170
|
+
# Grant the user read and write permissions to the table
|
|
171
|
+
table.grant_read_write(iam.User(stack, "MyUser"))
|
|
172
|
+
|
|
173
|
+
# Grant an account permissions to the table
|
|
174
|
+
table.grant_read_write(iam.AccountPrincipal(account_id))
|
|
175
|
+
|
|
176
|
+
# Add custom resource policy statements
|
|
177
|
+
permissions = iam.PolicyStatement(
|
|
178
|
+
effect=iam.Effect.ALLOW,
|
|
179
|
+
actions=["s3tables:*"],
|
|
180
|
+
principals=[iam.ServicePrincipal("example.aws.internal")],
|
|
181
|
+
resources=["*"]
|
|
182
|
+
)
|
|
183
|
+
|
|
184
|
+
table.add_to_resource_policy(permissions)
|
|
185
|
+
```
|
|
186
|
+
|
|
108
187
|
## Coming Soon
|
|
109
188
|
|
|
110
189
|
L2 Construct support for:
|
|
111
190
|
|
|
112
|
-
*
|
|
113
|
-
* Tables
|
|
191
|
+
* KMS encryption support for Tables
|
|
114
192
|
'''
|
|
115
193
|
from pkgutil import extend_path
|
|
116
194
|
__path__ = extend_path(__path__, __name__)
|
|
@@ -147,20 +225,118 @@ from ._jsii import *
|
|
|
147
225
|
import aws_cdk as _aws_cdk_ceddda9d
|
|
148
226
|
import aws_cdk.aws_iam as _aws_cdk_aws_iam_ceddda9d
|
|
149
227
|
import aws_cdk.aws_kms as _aws_cdk_aws_kms_ceddda9d
|
|
228
|
+
import aws_cdk.aws_s3tables as _aws_cdk_aws_s3tables_ceddda9d
|
|
150
229
|
import constructs as _constructs_77d1e7e8
|
|
151
230
|
|
|
152
231
|
|
|
153
|
-
@jsii.
|
|
154
|
-
|
|
155
|
-
|
|
232
|
+
@jsii.data_type(
|
|
233
|
+
jsii_type="@aws-cdk/aws-s3tables-alpha.CompactionProperty",
|
|
234
|
+
jsii_struct_bases=[],
|
|
235
|
+
name_mapping={"status": "status", "target_file_size_mb": "targetFileSizeMb"},
|
|
236
|
+
)
|
|
237
|
+
class CompactionProperty:
|
|
238
|
+
def __init__(self, *, status: "Status", target_file_size_mb: jsii.Number) -> None:
|
|
239
|
+
'''(experimental) Settings governing the Compaction maintenance action.
|
|
240
|
+
|
|
241
|
+
:param status: (experimental) Status of the compaction maintenance action.
|
|
242
|
+
:param target_file_size_mb: (experimental) Target file size in megabytes for compaction.
|
|
243
|
+
|
|
244
|
+
:default: - No compaction settings
|
|
245
|
+
|
|
246
|
+
:stability: experimental
|
|
247
|
+
:exampleMetadata: infused
|
|
248
|
+
|
|
249
|
+
Example::
|
|
250
|
+
|
|
251
|
+
# Build a table
|
|
252
|
+
sample_table = Table(scope, "ExampleTable",
|
|
253
|
+
table_name="example_table",
|
|
254
|
+
namespace=namespace,
|
|
255
|
+
open_table_format=OpenTableFormat.ICEBERG,
|
|
256
|
+
without_metadata=True
|
|
257
|
+
)
|
|
258
|
+
|
|
259
|
+
# Build a table with an Iceberg Schema
|
|
260
|
+
sample_table_with_schema = Table(scope, "ExampleSchemaTable",
|
|
261
|
+
table_name="example_table_with_schema",
|
|
262
|
+
namespace=namespace,
|
|
263
|
+
open_table_format=OpenTableFormat.ICEBERG,
|
|
264
|
+
iceberg_metadata=IcebergMetadataProperty(
|
|
265
|
+
iceberg_schema=IcebergSchemaProperty(
|
|
266
|
+
schema_field_list=[SchemaFieldProperty(
|
|
267
|
+
name="id",
|
|
268
|
+
type="int",
|
|
269
|
+
required=True
|
|
270
|
+
), SchemaFieldProperty(
|
|
271
|
+
name="name",
|
|
272
|
+
type="string"
|
|
273
|
+
)
|
|
274
|
+
]
|
|
275
|
+
)
|
|
276
|
+
),
|
|
277
|
+
compaction=CompactionProperty(
|
|
278
|
+
status=Status.ENABLED,
|
|
279
|
+
target_file_size_mb=128
|
|
280
|
+
),
|
|
281
|
+
snapshot_management=SnapshotManagementProperty(
|
|
282
|
+
status=Status.ENABLED,
|
|
283
|
+
max_snapshot_age_hours=48,
|
|
284
|
+
min_snapshots_to_keep=5
|
|
285
|
+
)
|
|
286
|
+
)
|
|
287
|
+
'''
|
|
288
|
+
if __debug__:
|
|
289
|
+
type_hints = typing.get_type_hints(_typecheckingstub__ea606cde59917b73fdb198d73eabdbbe686fdbd73e01ef72284a9061ea612d80)
|
|
290
|
+
check_type(argname="argument status", value=status, expected_type=type_hints["status"])
|
|
291
|
+
check_type(argname="argument target_file_size_mb", value=target_file_size_mb, expected_type=type_hints["target_file_size_mb"])
|
|
292
|
+
self._values: typing.Dict[builtins.str, typing.Any] = {
|
|
293
|
+
"status": status,
|
|
294
|
+
"target_file_size_mb": target_file_size_mb,
|
|
295
|
+
}
|
|
296
|
+
|
|
297
|
+
@builtins.property
|
|
298
|
+
def status(self) -> "Status":
|
|
299
|
+
'''(experimental) Status of the compaction maintenance action.
|
|
300
|
+
|
|
301
|
+
:stability: experimental
|
|
302
|
+
'''
|
|
303
|
+
result = self._values.get("status")
|
|
304
|
+
assert result is not None, "Required property 'status' is missing"
|
|
305
|
+
return typing.cast("Status", result)
|
|
306
|
+
|
|
307
|
+
@builtins.property
|
|
308
|
+
def target_file_size_mb(self) -> jsii.Number:
|
|
309
|
+
'''(experimental) Target file size in megabytes for compaction.
|
|
310
|
+
|
|
311
|
+
:stability: experimental
|
|
312
|
+
'''
|
|
313
|
+
result = self._values.get("target_file_size_mb")
|
|
314
|
+
assert result is not None, "Required property 'target_file_size_mb' is missing"
|
|
315
|
+
return typing.cast(jsii.Number, result)
|
|
316
|
+
|
|
317
|
+
def __eq__(self, rhs: typing.Any) -> builtins.bool:
|
|
318
|
+
return isinstance(rhs, self.__class__) and rhs._values == self._values
|
|
319
|
+
|
|
320
|
+
def __ne__(self, rhs: typing.Any) -> builtins.bool:
|
|
321
|
+
return not (rhs == self)
|
|
322
|
+
|
|
323
|
+
def __repr__(self) -> str:
|
|
324
|
+
return "CompactionProperty(%s)" % ", ".join(
|
|
325
|
+
k + "=" + repr(v) for k, v in self._values.items()
|
|
326
|
+
)
|
|
327
|
+
|
|
328
|
+
|
|
329
|
+
@jsii.interface(jsii_type="@aws-cdk/aws-s3tables-alpha.INamespace")
|
|
330
|
+
class INamespace(_aws_cdk_ceddda9d.IResource, typing_extensions.Protocol):
|
|
331
|
+
'''(experimental) Represents an S3 Tables Namespace.
|
|
156
332
|
|
|
157
333
|
:stability: experimental
|
|
158
334
|
'''
|
|
159
335
|
|
|
160
336
|
@builtins.property
|
|
161
|
-
@jsii.member(jsii_name="
|
|
162
|
-
def
|
|
163
|
-
'''(experimental) The
|
|
337
|
+
@jsii.member(jsii_name="namespaceName")
|
|
338
|
+
def namespace_name(self) -> builtins.str:
|
|
339
|
+
'''(experimental) The name of this namespace.
|
|
164
340
|
|
|
165
341
|
:stability: experimental
|
|
166
342
|
:attribute: true
|
|
@@ -168,19 +344,61 @@ class ITableBucket(_aws_cdk_ceddda9d.IResource, typing_extensions.Protocol):
|
|
|
168
344
|
...
|
|
169
345
|
|
|
170
346
|
@builtins.property
|
|
171
|
-
@jsii.member(jsii_name="
|
|
172
|
-
def
|
|
173
|
-
'''(experimental) The
|
|
347
|
+
@jsii.member(jsii_name="tableBucket")
|
|
348
|
+
def table_bucket(self) -> "ITableBucket":
|
|
349
|
+
'''(experimental) The table bucket which this namespace belongs to.
|
|
174
350
|
|
|
175
351
|
:stability: experimental
|
|
176
352
|
:attribute: true
|
|
177
353
|
'''
|
|
178
354
|
...
|
|
179
355
|
|
|
356
|
+
|
|
357
|
+
class _INamespaceProxy(
|
|
358
|
+
jsii.proxy_for(_aws_cdk_ceddda9d.IResource), # type: ignore[misc]
|
|
359
|
+
):
|
|
360
|
+
'''(experimental) Represents an S3 Tables Namespace.
|
|
361
|
+
|
|
362
|
+
:stability: experimental
|
|
363
|
+
'''
|
|
364
|
+
|
|
365
|
+
__jsii_type__: typing.ClassVar[str] = "@aws-cdk/aws-s3tables-alpha.INamespace"
|
|
366
|
+
|
|
180
367
|
@builtins.property
|
|
181
|
-
@jsii.member(jsii_name="
|
|
182
|
-
def
|
|
183
|
-
'''(experimental) The
|
|
368
|
+
@jsii.member(jsii_name="namespaceName")
|
|
369
|
+
def namespace_name(self) -> builtins.str:
|
|
370
|
+
'''(experimental) The name of this namespace.
|
|
371
|
+
|
|
372
|
+
:stability: experimental
|
|
373
|
+
:attribute: true
|
|
374
|
+
'''
|
|
375
|
+
return typing.cast(builtins.str, jsii.get(self, "namespaceName"))
|
|
376
|
+
|
|
377
|
+
@builtins.property
|
|
378
|
+
@jsii.member(jsii_name="tableBucket")
|
|
379
|
+
def table_bucket(self) -> "ITableBucket":
|
|
380
|
+
'''(experimental) The table bucket which this namespace belongs to.
|
|
381
|
+
|
|
382
|
+
:stability: experimental
|
|
383
|
+
:attribute: true
|
|
384
|
+
'''
|
|
385
|
+
return typing.cast("ITableBucket", jsii.get(self, "tableBucket"))
|
|
386
|
+
|
|
387
|
+
# Adding a "__jsii_proxy_class__(): typing.Type" function to the interface
|
|
388
|
+
typing.cast(typing.Any, INamespace).__jsii_proxy_class__ = lambda : _INamespaceProxy
|
|
389
|
+
|
|
390
|
+
|
|
391
|
+
@jsii.interface(jsii_type="@aws-cdk/aws-s3tables-alpha.ITable")
|
|
392
|
+
class ITable(_aws_cdk_ceddda9d.IResource, typing_extensions.Protocol):
|
|
393
|
+
'''(experimental) Represents an S3 Table.
|
|
394
|
+
|
|
395
|
+
:stability: experimental
|
|
396
|
+
'''
|
|
397
|
+
|
|
398
|
+
@builtins.property
|
|
399
|
+
@jsii.member(jsii_name="tableArn")
|
|
400
|
+
def table_arn(self) -> builtins.str:
|
|
401
|
+
'''(experimental) The ARN of this table.
|
|
184
402
|
|
|
185
403
|
:stability: experimental
|
|
186
404
|
:attribute: true
|
|
@@ -188,18 +406,29 @@ class ITableBucket(_aws_cdk_ceddda9d.IResource, typing_extensions.Protocol):
|
|
|
188
406
|
...
|
|
189
407
|
|
|
190
408
|
@builtins.property
|
|
191
|
-
@jsii.member(jsii_name="
|
|
192
|
-
def
|
|
193
|
-
'''(experimental)
|
|
409
|
+
@jsii.member(jsii_name="tableName")
|
|
410
|
+
def table_name(self) -> builtins.str:
|
|
411
|
+
'''(experimental) The name of this table.
|
|
412
|
+
|
|
413
|
+
:stability: experimental
|
|
414
|
+
:attribute: true
|
|
415
|
+
'''
|
|
416
|
+
...
|
|
417
|
+
|
|
418
|
+
@builtins.property
|
|
419
|
+
@jsii.member(jsii_name="account")
|
|
420
|
+
def account(self) -> typing.Optional[builtins.str]:
|
|
421
|
+
'''(experimental) The accountId containing this table.
|
|
194
422
|
|
|
195
423
|
:stability: experimental
|
|
424
|
+
:attribute: true
|
|
196
425
|
'''
|
|
197
426
|
...
|
|
198
427
|
|
|
199
428
|
@builtins.property
|
|
200
429
|
@jsii.member(jsii_name="region")
|
|
201
430
|
def region(self) -> typing.Optional[builtins.str]:
|
|
202
|
-
'''(experimental) The region containing
|
|
431
|
+
'''(experimental) The region containing this table.
|
|
203
432
|
|
|
204
433
|
:stability: experimental
|
|
205
434
|
:attribute: true
|
|
@@ -211,15 +440,15 @@ class ITableBucket(_aws_cdk_ceddda9d.IResource, typing_extensions.Protocol):
|
|
|
211
440
|
self,
|
|
212
441
|
statement: _aws_cdk_aws_iam_ceddda9d.PolicyStatement,
|
|
213
442
|
) -> _aws_cdk_aws_iam_ceddda9d.AddToResourcePolicyResult:
|
|
214
|
-
'''(experimental) Adds a statement to the resource policy for a principal (i.e. account/role/service) to perform actions on this table
|
|
443
|
+
'''(experimental) Adds a statement to the resource policy for a principal (i.e. account/role/service) to perform actions on this table.
|
|
215
444
|
|
|
216
445
|
Note that the policy statement may or may not be added to the policy.
|
|
217
|
-
For example, when an ``
|
|
218
|
-
it's not possible to tell whether the
|
|
446
|
+
For example, when an ``ITable`` is created from an existing table,
|
|
447
|
+
it's not possible to tell whether the table already has a policy
|
|
219
448
|
attached, let alone to re-use that policy to add more statements to it.
|
|
220
449
|
So it's safest to do nothing in these cases.
|
|
221
450
|
|
|
222
|
-
:param statement: the policy statement to be added to the
|
|
451
|
+
:param statement: the policy statement to be added to the table's policy.
|
|
223
452
|
|
|
224
453
|
:return:
|
|
225
454
|
|
|
@@ -237,15 +466,13 @@ class ITableBucket(_aws_cdk_ceddda9d.IResource, typing_extensions.Protocol):
|
|
|
237
466
|
def grant_read(
|
|
238
467
|
self,
|
|
239
468
|
identity: _aws_cdk_aws_iam_ceddda9d.IGrantable,
|
|
240
|
-
table_id: builtins.str,
|
|
241
469
|
) -> _aws_cdk_aws_iam_ceddda9d.Grant:
|
|
242
|
-
'''(experimental) Grant read permissions for this table
|
|
470
|
+
'''(experimental) Grant read permissions for this table to an IAM principal (Role/Group/User).
|
|
243
471
|
|
|
244
|
-
If
|
|
245
|
-
|
|
472
|
+
If the parent TableBucket of this table has encryption,
|
|
473
|
+
you should grant kms:Decrypt permission to use this key to the same principal.
|
|
246
474
|
|
|
247
475
|
:param identity: The principal to allow read permissions to.
|
|
248
|
-
:param table_id: Allow the permissions to all tables using '*' or to single table by its unique ID.
|
|
249
476
|
|
|
250
477
|
:stability: experimental
|
|
251
478
|
'''
|
|
@@ -255,15 +482,14 @@ class ITableBucket(_aws_cdk_ceddda9d.IResource, typing_extensions.Protocol):
|
|
|
255
482
|
def grant_read_write(
|
|
256
483
|
self,
|
|
257
484
|
identity: _aws_cdk_aws_iam_ceddda9d.IGrantable,
|
|
258
|
-
table_id: builtins.str,
|
|
259
485
|
) -> _aws_cdk_aws_iam_ceddda9d.Grant:
|
|
260
|
-
'''(experimental) Grant read and write permissions for this table
|
|
486
|
+
'''(experimental) Grant read and write permissions for this table to an IAM principal (Role/Group/User).
|
|
261
487
|
|
|
262
|
-
If
|
|
263
|
-
|
|
488
|
+
If the parent TableBucket of this table has encryption,
|
|
489
|
+
you should grant kms:GenerateDataKey and kms:Decrypt permission
|
|
490
|
+
to use this key to the same principal.
|
|
264
491
|
|
|
265
492
|
:param identity: The principal to allow read and write permissions to.
|
|
266
|
-
:param table_id: Allow the permissions to all tables using '*' or to single table by its unique ID.
|
|
267
493
|
|
|
268
494
|
:stability: experimental
|
|
269
495
|
'''
|
|
@@ -273,74 +499,64 @@ class ITableBucket(_aws_cdk_ceddda9d.IResource, typing_extensions.Protocol):
|
|
|
273
499
|
def grant_write(
|
|
274
500
|
self,
|
|
275
501
|
identity: _aws_cdk_aws_iam_ceddda9d.IGrantable,
|
|
276
|
-
table_id: builtins.str,
|
|
277
502
|
) -> _aws_cdk_aws_iam_ceddda9d.Grant:
|
|
278
|
-
'''(experimental) Grant write permissions for this table
|
|
503
|
+
'''(experimental) Grant write permissions for this table to an IAM principal (Role/Group/User).
|
|
279
504
|
|
|
280
|
-
If
|
|
281
|
-
|
|
505
|
+
If the parent TableBucket of this table has encryption,
|
|
506
|
+
you should grant kms:GenerateDataKey and kms:Decrypt permission
|
|
507
|
+
to use this key to the same principal.
|
|
282
508
|
|
|
283
509
|
:param identity: The principal to allow write permissions to.
|
|
284
|
-
:param table_id: Allow the permissions to all tables using '*' or to single table by its unique ID.
|
|
285
510
|
|
|
286
511
|
:stability: experimental
|
|
287
512
|
'''
|
|
288
513
|
...
|
|
289
514
|
|
|
290
515
|
|
|
291
|
-
class
|
|
516
|
+
class _ITableProxy(
|
|
292
517
|
jsii.proxy_for(_aws_cdk_ceddda9d.IResource), # type: ignore[misc]
|
|
293
518
|
):
|
|
294
|
-
'''(experimental)
|
|
519
|
+
'''(experimental) Represents an S3 Table.
|
|
295
520
|
|
|
296
521
|
:stability: experimental
|
|
297
522
|
'''
|
|
298
523
|
|
|
299
|
-
__jsii_type__: typing.ClassVar[str] = "@aws-cdk/aws-s3tables-alpha.
|
|
524
|
+
__jsii_type__: typing.ClassVar[str] = "@aws-cdk/aws-s3tables-alpha.ITable"
|
|
300
525
|
|
|
301
526
|
@builtins.property
|
|
302
|
-
@jsii.member(jsii_name="
|
|
303
|
-
def
|
|
304
|
-
'''(experimental) The ARN of
|
|
527
|
+
@jsii.member(jsii_name="tableArn")
|
|
528
|
+
def table_arn(self) -> builtins.str:
|
|
529
|
+
'''(experimental) The ARN of this table.
|
|
305
530
|
|
|
306
531
|
:stability: experimental
|
|
307
532
|
:attribute: true
|
|
308
533
|
'''
|
|
309
|
-
return typing.cast(builtins.str, jsii.get(self, "
|
|
534
|
+
return typing.cast(builtins.str, jsii.get(self, "tableArn"))
|
|
310
535
|
|
|
311
536
|
@builtins.property
|
|
312
|
-
@jsii.member(jsii_name="
|
|
313
|
-
def
|
|
314
|
-
'''(experimental) The name of
|
|
537
|
+
@jsii.member(jsii_name="tableName")
|
|
538
|
+
def table_name(self) -> builtins.str:
|
|
539
|
+
'''(experimental) The name of this table.
|
|
315
540
|
|
|
316
541
|
:stability: experimental
|
|
317
542
|
:attribute: true
|
|
318
543
|
'''
|
|
319
|
-
return typing.cast(builtins.str, jsii.get(self, "
|
|
544
|
+
return typing.cast(builtins.str, jsii.get(self, "tableName"))
|
|
320
545
|
|
|
321
546
|
@builtins.property
|
|
322
547
|
@jsii.member(jsii_name="account")
|
|
323
548
|
def account(self) -> typing.Optional[builtins.str]:
|
|
324
|
-
'''(experimental) The accountId containing
|
|
549
|
+
'''(experimental) The accountId containing this table.
|
|
325
550
|
|
|
326
551
|
:stability: experimental
|
|
327
552
|
:attribute: true
|
|
328
553
|
'''
|
|
329
554
|
return typing.cast(typing.Optional[builtins.str], jsii.get(self, "account"))
|
|
330
555
|
|
|
331
|
-
@builtins.property
|
|
332
|
-
@jsii.member(jsii_name="encryptionKey")
|
|
333
|
-
def encryption_key(self) -> typing.Optional[_aws_cdk_aws_kms_ceddda9d.IKey]:
|
|
334
|
-
'''(experimental) Optional KMS encryption key associated with this table bucket.
|
|
335
|
-
|
|
336
|
-
:stability: experimental
|
|
337
|
-
'''
|
|
338
|
-
return typing.cast(typing.Optional[_aws_cdk_aws_kms_ceddda9d.IKey], jsii.get(self, "encryptionKey"))
|
|
339
|
-
|
|
340
556
|
@builtins.property
|
|
341
557
|
@jsii.member(jsii_name="region")
|
|
342
558
|
def region(self) -> typing.Optional[builtins.str]:
|
|
343
|
-
'''(experimental) The region containing
|
|
559
|
+
'''(experimental) The region containing this table.
|
|
344
560
|
|
|
345
561
|
:stability: experimental
|
|
346
562
|
:attribute: true
|
|
@@ -352,15 +568,15 @@ class _ITableBucketProxy(
|
|
|
352
568
|
self,
|
|
353
569
|
statement: _aws_cdk_aws_iam_ceddda9d.PolicyStatement,
|
|
354
570
|
) -> _aws_cdk_aws_iam_ceddda9d.AddToResourcePolicyResult:
|
|
355
|
-
'''(experimental) Adds a statement to the resource policy for a principal (i.e. account/role/service) to perform actions on this table
|
|
571
|
+
'''(experimental) Adds a statement to the resource policy for a principal (i.e. account/role/service) to perform actions on this table.
|
|
356
572
|
|
|
357
573
|
Note that the policy statement may or may not be added to the policy.
|
|
358
|
-
For example, when an ``
|
|
359
|
-
it's not possible to tell whether the
|
|
574
|
+
For example, when an ``ITable`` is created from an existing table,
|
|
575
|
+
it's not possible to tell whether the table already has a policy
|
|
360
576
|
attached, let alone to re-use that policy to add more statements to it.
|
|
361
577
|
So it's safest to do nothing in these cases.
|
|
362
578
|
|
|
363
|
-
:param statement: the policy statement to be added to the
|
|
579
|
+
:param statement: the policy statement to be added to the table's policy.
|
|
364
580
|
|
|
365
581
|
:return:
|
|
366
582
|
|
|
@@ -373,7 +589,7 @@ class _ITableBucketProxy(
|
|
|
373
589
|
:stability: experimental
|
|
374
590
|
'''
|
|
375
591
|
if __debug__:
|
|
376
|
-
type_hints = typing.get_type_hints(
|
|
592
|
+
type_hints = typing.get_type_hints(_typecheckingstub__da6cde6f4428a664d5a067b88ed42d6a9c66af2a44cb2211d25ecd28073c5cf3)
|
|
377
593
|
check_type(argname="argument statement", value=statement, expected_type=type_hints["statement"])
|
|
378
594
|
return typing.cast(_aws_cdk_aws_iam_ceddda9d.AddToResourcePolicyResult, jsii.invoke(self, "addToResourcePolicy", [statement]))
|
|
379
595
|
|
|
@@ -381,250 +597,127 @@ class _ITableBucketProxy(
|
|
|
381
597
|
def grant_read(
|
|
382
598
|
self,
|
|
383
599
|
identity: _aws_cdk_aws_iam_ceddda9d.IGrantable,
|
|
384
|
-
table_id: builtins.str,
|
|
385
600
|
) -> _aws_cdk_aws_iam_ceddda9d.Grant:
|
|
386
|
-
'''(experimental) Grant read permissions for this table
|
|
601
|
+
'''(experimental) Grant read permissions for this table to an IAM principal (Role/Group/User).
|
|
387
602
|
|
|
388
|
-
If
|
|
389
|
-
|
|
603
|
+
If the parent TableBucket of this table has encryption,
|
|
604
|
+
you should grant kms:Decrypt permission to use this key to the same principal.
|
|
390
605
|
|
|
391
606
|
:param identity: The principal to allow read permissions to.
|
|
392
|
-
:param table_id: Allow the permissions to all tables using '*' or to single table by its unique ID.
|
|
393
607
|
|
|
394
608
|
:stability: experimental
|
|
395
609
|
'''
|
|
396
610
|
if __debug__:
|
|
397
|
-
type_hints = typing.get_type_hints(
|
|
611
|
+
type_hints = typing.get_type_hints(_typecheckingstub__3e83bfa5470edaff0a4a96df441439dc54d0e9371b70d2571426e560cb4ae2eb)
|
|
398
612
|
check_type(argname="argument identity", value=identity, expected_type=type_hints["identity"])
|
|
399
|
-
|
|
400
|
-
return typing.cast(_aws_cdk_aws_iam_ceddda9d.Grant, jsii.invoke(self, "grantRead", [identity, table_id]))
|
|
613
|
+
return typing.cast(_aws_cdk_aws_iam_ceddda9d.Grant, jsii.invoke(self, "grantRead", [identity]))
|
|
401
614
|
|
|
402
615
|
@jsii.member(jsii_name="grantReadWrite")
|
|
403
616
|
def grant_read_write(
|
|
404
617
|
self,
|
|
405
618
|
identity: _aws_cdk_aws_iam_ceddda9d.IGrantable,
|
|
406
|
-
table_id: builtins.str,
|
|
407
619
|
) -> _aws_cdk_aws_iam_ceddda9d.Grant:
|
|
408
|
-
'''(experimental) Grant read and write permissions for this table
|
|
620
|
+
'''(experimental) Grant read and write permissions for this table to an IAM principal (Role/Group/User).
|
|
409
621
|
|
|
410
|
-
If
|
|
411
|
-
|
|
622
|
+
If the parent TableBucket of this table has encryption,
|
|
623
|
+
you should grant kms:GenerateDataKey and kms:Decrypt permission
|
|
624
|
+
to use this key to the same principal.
|
|
412
625
|
|
|
413
626
|
:param identity: The principal to allow read and write permissions to.
|
|
414
|
-
:param table_id: Allow the permissions to all tables using '*' or to single table by its unique ID.
|
|
415
627
|
|
|
416
628
|
:stability: experimental
|
|
417
629
|
'''
|
|
418
630
|
if __debug__:
|
|
419
|
-
type_hints = typing.get_type_hints(
|
|
631
|
+
type_hints = typing.get_type_hints(_typecheckingstub__6e9db385d2bd54ad234de96ad643e346812e81e4cf447d2e614c92f8ce02037d)
|
|
420
632
|
check_type(argname="argument identity", value=identity, expected_type=type_hints["identity"])
|
|
421
|
-
|
|
422
|
-
return typing.cast(_aws_cdk_aws_iam_ceddda9d.Grant, jsii.invoke(self, "grantReadWrite", [identity, table_id]))
|
|
633
|
+
return typing.cast(_aws_cdk_aws_iam_ceddda9d.Grant, jsii.invoke(self, "grantReadWrite", [identity]))
|
|
423
634
|
|
|
424
635
|
@jsii.member(jsii_name="grantWrite")
|
|
425
636
|
def grant_write(
|
|
426
637
|
self,
|
|
427
638
|
identity: _aws_cdk_aws_iam_ceddda9d.IGrantable,
|
|
428
|
-
table_id: builtins.str,
|
|
429
639
|
) -> _aws_cdk_aws_iam_ceddda9d.Grant:
|
|
430
|
-
'''(experimental) Grant write permissions for this table
|
|
640
|
+
'''(experimental) Grant write permissions for this table to an IAM principal (Role/Group/User).
|
|
431
641
|
|
|
432
|
-
If
|
|
433
|
-
|
|
642
|
+
If the parent TableBucket of this table has encryption,
|
|
643
|
+
you should grant kms:GenerateDataKey and kms:Decrypt permission
|
|
644
|
+
to use this key to the same principal.
|
|
434
645
|
|
|
435
646
|
:param identity: The principal to allow write permissions to.
|
|
436
|
-
:param table_id: Allow the permissions to all tables using '*' or to single table by its unique ID.
|
|
437
647
|
|
|
438
648
|
:stability: experimental
|
|
439
649
|
'''
|
|
440
650
|
if __debug__:
|
|
441
|
-
type_hints = typing.get_type_hints(
|
|
651
|
+
type_hints = typing.get_type_hints(_typecheckingstub__580625b8fab3a16de8ff8d5024b24a235d5bc9597470275f3fd5c04ef950a9d9)
|
|
442
652
|
check_type(argname="argument identity", value=identity, expected_type=type_hints["identity"])
|
|
443
|
-
|
|
444
|
-
return typing.cast(_aws_cdk_aws_iam_ceddda9d.Grant, jsii.invoke(self, "grantWrite", [identity, table_id]))
|
|
653
|
+
return typing.cast(_aws_cdk_aws_iam_ceddda9d.Grant, jsii.invoke(self, "grantWrite", [identity]))
|
|
445
654
|
|
|
446
655
|
# Adding a "__jsii_proxy_class__(): typing.Type" function to the interface
|
|
447
|
-
typing.cast(typing.Any,
|
|
656
|
+
typing.cast(typing.Any, ITable).__jsii_proxy_class__ = lambda : _ITableProxy
|
|
448
657
|
|
|
449
658
|
|
|
450
|
-
@jsii.
|
|
451
|
-
class
|
|
452
|
-
|
|
453
|
-
metaclass=jsii.JSIIMeta,
|
|
454
|
-
jsii_type="@aws-cdk/aws-s3tables-alpha.TableBucket",
|
|
455
|
-
):
|
|
456
|
-
'''(experimental) An S3 table bucket with helpers for associated resource policies.
|
|
457
|
-
|
|
458
|
-
This bucket may not yet have all features that exposed by the underlying CfnTableBucket.
|
|
659
|
+
@jsii.interface(jsii_type="@aws-cdk/aws-s3tables-alpha.ITableBucket")
|
|
660
|
+
class ITableBucket(_aws_cdk_ceddda9d.IResource, typing_extensions.Protocol):
|
|
661
|
+
'''(experimental) Interface definition for S3 Table Buckets.
|
|
459
662
|
|
|
460
663
|
:stability: experimental
|
|
461
|
-
:stateful: true
|
|
462
|
-
|
|
463
|
-
Example::
|
|
464
|
-
|
|
465
|
-
sample_table_bucket = TableBucket(scope, "ExampleTableBucket",
|
|
466
|
-
table_bucket_name="example-bucket",
|
|
467
|
-
# Optional fields:
|
|
468
|
-
unreferenced_file_removal=UnreferencedFileRemoval(
|
|
469
|
-
noncurrent_days=123,
|
|
470
|
-
status=UnreferencedFileRemovalStatus.ENABLED,
|
|
471
|
-
unreferenced_days=123
|
|
472
|
-
)
|
|
473
|
-
)
|
|
474
664
|
'''
|
|
475
665
|
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
*,
|
|
481
|
-
table_bucket_name: builtins.str,
|
|
482
|
-
account: typing.Optional[builtins.str] = None,
|
|
483
|
-
encryption: typing.Optional["TableBucketEncryption"] = None,
|
|
484
|
-
encryption_key: typing.Optional[_aws_cdk_aws_kms_ceddda9d.IKey] = None,
|
|
485
|
-
region: typing.Optional[builtins.str] = None,
|
|
486
|
-
removal_policy: typing.Optional[_aws_cdk_ceddda9d.RemovalPolicy] = None,
|
|
487
|
-
unreferenced_file_removal: typing.Optional[typing.Union["UnreferencedFileRemoval", typing.Dict[builtins.str, typing.Any]]] = None,
|
|
488
|
-
) -> None:
|
|
489
|
-
'''
|
|
490
|
-
:param scope: -
|
|
491
|
-
:param id: -
|
|
492
|
-
:param table_bucket_name: (experimental) Name of the S3 TableBucket.
|
|
493
|
-
:param account: (experimental) AWS Account ID of the table bucket owner. Default: - it's assumed the bucket belongs to the same account as the scope it's being imported into
|
|
494
|
-
:param encryption: (experimental) The kind of server-side encryption to apply to this bucket. If you choose KMS, you can specify a KMS key via ``encryptionKey``. If encryption key is not specified, a key will automatically be created. Default: - ``KMS`` if ``encryptionKey`` is specified, or ``S3_MANAGED`` otherwise.
|
|
495
|
-
:param encryption_key: (experimental) External KMS key to use for bucket encryption. The ``encryption`` property must be either not specified or set to ``KMS``. An error will be emitted if ``encryption`` is set to ``S3_MANAGED``. Default: - If ``encryption`` is set to ``KMS`` and this property is undefined, a new KMS key will be created and associated with this bucket.
|
|
496
|
-
:param region: (experimental) AWS region that the table bucket exists in. Default: - it's assumed the bucket is in the same region as the scope it's being imported into
|
|
497
|
-
:param removal_policy: (experimental) Controls what happens to this table bucket it it stoped being managed by cloudformation. Default: RETAIN
|
|
498
|
-
:param unreferenced_file_removal: (experimental) Unreferenced file removal settings for the S3 TableBucket. Default: Enabled with default values
|
|
666
|
+
@builtins.property
|
|
667
|
+
@jsii.member(jsii_name="tableBucketArn")
|
|
668
|
+
def table_bucket_arn(self) -> builtins.str:
|
|
669
|
+
'''(experimental) The ARN of the table bucket.
|
|
499
670
|
|
|
500
671
|
:stability: experimental
|
|
672
|
+
:attribute: true
|
|
501
673
|
'''
|
|
502
|
-
|
|
503
|
-
type_hints = typing.get_type_hints(_typecheckingstub__c8d9c0bf5c954c2a6797301b7dc6cb8abd812336f3507addc92f72b805ec0a1e)
|
|
504
|
-
check_type(argname="argument scope", value=scope, expected_type=type_hints["scope"])
|
|
505
|
-
check_type(argname="argument id", value=id, expected_type=type_hints["id"])
|
|
506
|
-
props = TableBucketProps(
|
|
507
|
-
table_bucket_name=table_bucket_name,
|
|
508
|
-
account=account,
|
|
509
|
-
encryption=encryption,
|
|
510
|
-
encryption_key=encryption_key,
|
|
511
|
-
region=region,
|
|
512
|
-
removal_policy=removal_policy,
|
|
513
|
-
unreferenced_file_removal=unreferenced_file_removal,
|
|
514
|
-
)
|
|
515
|
-
|
|
516
|
-
jsii.create(self.__class__, self, [scope, id, props])
|
|
517
|
-
|
|
518
|
-
@jsii.member(jsii_name="fromTableBucketArn")
|
|
519
|
-
@builtins.classmethod
|
|
520
|
-
def from_table_bucket_arn(
|
|
521
|
-
cls,
|
|
522
|
-
scope: _constructs_77d1e7e8.Construct,
|
|
523
|
-
id: builtins.str,
|
|
524
|
-
table_bucket_arn: builtins.str,
|
|
525
|
-
) -> ITableBucket:
|
|
526
|
-
'''(experimental) Defines a TableBucket construct from an external table bucket ARN.
|
|
674
|
+
...
|
|
527
675
|
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
676
|
+
@builtins.property
|
|
677
|
+
@jsii.member(jsii_name="tableBucketName")
|
|
678
|
+
def table_bucket_name(self) -> builtins.str:
|
|
679
|
+
'''(experimental) The name of the table bucket.
|
|
531
680
|
|
|
532
681
|
:stability: experimental
|
|
682
|
+
:attribute: true
|
|
533
683
|
'''
|
|
534
|
-
|
|
535
|
-
type_hints = typing.get_type_hints(_typecheckingstub__03d844a802df53acfc8906e32d1d2bbab0d86fedd5fc2ef65296a8c7a0c368d5)
|
|
536
|
-
check_type(argname="argument scope", value=scope, expected_type=type_hints["scope"])
|
|
537
|
-
check_type(argname="argument id", value=id, expected_type=type_hints["id"])
|
|
538
|
-
check_type(argname="argument table_bucket_arn", value=table_bucket_arn, expected_type=type_hints["table_bucket_arn"])
|
|
539
|
-
return typing.cast(ITableBucket, jsii.sinvoke(cls, "fromTableBucketArn", [scope, id, table_bucket_arn]))
|
|
540
|
-
|
|
541
|
-
@jsii.member(jsii_name="fromTableBucketAttributes")
|
|
542
|
-
@builtins.classmethod
|
|
543
|
-
def from_table_bucket_attributes(
|
|
544
|
-
cls,
|
|
545
|
-
scope: _constructs_77d1e7e8.Construct,
|
|
546
|
-
id: builtins.str,
|
|
547
|
-
*,
|
|
548
|
-
account: typing.Optional[builtins.str] = None,
|
|
549
|
-
encryption_key: typing.Optional[_aws_cdk_aws_kms_ceddda9d.IKey] = None,
|
|
550
|
-
region: typing.Optional[builtins.str] = None,
|
|
551
|
-
table_bucket_arn: typing.Optional[builtins.str] = None,
|
|
552
|
-
table_bucket_name: typing.Optional[builtins.str] = None,
|
|
553
|
-
) -> ITableBucket:
|
|
554
|
-
'''(experimental) Defines a TableBucket construct that represents an external table bucket.
|
|
684
|
+
...
|
|
555
685
|
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
:param region: (experimental) AWS region this table bucket exists in. Default: region inferred from scope
|
|
561
|
-
:param table_bucket_arn: (experimental) The table bucket's ARN. Default: tableBucketArn constructed from region, account and tableBucketName are provided
|
|
562
|
-
:param table_bucket_name: (experimental) The table bucket name, unique per region. Default: tableBucketName inferred from arn
|
|
686
|
+
@builtins.property
|
|
687
|
+
@jsii.member(jsii_name="account")
|
|
688
|
+
def account(self) -> typing.Optional[builtins.str]:
|
|
689
|
+
'''(experimental) The accountId containing the table bucket.
|
|
563
690
|
|
|
564
691
|
:stability: experimental
|
|
692
|
+
:attribute: true
|
|
565
693
|
'''
|
|
566
|
-
|
|
567
|
-
type_hints = typing.get_type_hints(_typecheckingstub__6fd93d11fc9c336a7e785b6aaa945ba1d55d75eb3748b03a2030b08e3d152961)
|
|
568
|
-
check_type(argname="argument scope", value=scope, expected_type=type_hints["scope"])
|
|
569
|
-
check_type(argname="argument id", value=id, expected_type=type_hints["id"])
|
|
570
|
-
attrs = TableBucketAttributes(
|
|
571
|
-
account=account,
|
|
572
|
-
encryption_key=encryption_key,
|
|
573
|
-
region=region,
|
|
574
|
-
table_bucket_arn=table_bucket_arn,
|
|
575
|
-
table_bucket_name=table_bucket_name,
|
|
576
|
-
)
|
|
577
|
-
|
|
578
|
-
return typing.cast(ITableBucket, jsii.sinvoke(cls, "fromTableBucketAttributes", [scope, id, attrs]))
|
|
579
|
-
|
|
580
|
-
@jsii.member(jsii_name="validateTableBucketName")
|
|
581
|
-
@builtins.classmethod
|
|
582
|
-
def validate_table_bucket_name(
|
|
583
|
-
cls,
|
|
584
|
-
bucket_name: typing.Optional[builtins.str] = None,
|
|
585
|
-
) -> None:
|
|
586
|
-
'''(experimental) Throws an exception if the given table bucket name is not valid.
|
|
694
|
+
...
|
|
587
695
|
|
|
588
|
-
|
|
696
|
+
@builtins.property
|
|
697
|
+
@jsii.member(jsii_name="encryptionKey")
|
|
698
|
+
def encryption_key(self) -> typing.Optional[_aws_cdk_aws_kms_ceddda9d.IKey]:
|
|
699
|
+
'''(experimental) Optional KMS encryption key associated with this table bucket.
|
|
589
700
|
|
|
590
701
|
:stability: experimental
|
|
591
702
|
'''
|
|
592
|
-
|
|
593
|
-
type_hints = typing.get_type_hints(_typecheckingstub__054bf3ff46c98611841750ec27c0d492c7ee0aa6480b03f4a250c1d73bf049f7)
|
|
594
|
-
check_type(argname="argument bucket_name", value=bucket_name, expected_type=type_hints["bucket_name"])
|
|
595
|
-
return typing.cast(None, jsii.sinvoke(cls, "validateTableBucketName", [bucket_name]))
|
|
596
|
-
|
|
597
|
-
@jsii.member(jsii_name="validateUnreferencedFileRemoval")
|
|
598
|
-
@builtins.classmethod
|
|
599
|
-
def validate_unreferenced_file_removal(
|
|
600
|
-
cls,
|
|
601
|
-
*,
|
|
602
|
-
noncurrent_days: typing.Optional[jsii.Number] = None,
|
|
603
|
-
status: typing.Optional["UnreferencedFileRemovalStatus"] = None,
|
|
604
|
-
unreferenced_days: typing.Optional[jsii.Number] = None,
|
|
605
|
-
) -> None:
|
|
606
|
-
'''(experimental) Throws an exception if the given unreferencedFileRemovalProperty is not valid.
|
|
703
|
+
...
|
|
607
704
|
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
705
|
+
@builtins.property
|
|
706
|
+
@jsii.member(jsii_name="region")
|
|
707
|
+
def region(self) -> typing.Optional[builtins.str]:
|
|
708
|
+
'''(experimental) The region containing the table bucket.
|
|
611
709
|
|
|
612
710
|
:stability: experimental
|
|
711
|
+
:attribute: true
|
|
613
712
|
'''
|
|
614
|
-
|
|
615
|
-
noncurrent_days=noncurrent_days,
|
|
616
|
-
status=status,
|
|
617
|
-
unreferenced_days=unreferenced_days,
|
|
618
|
-
)
|
|
619
|
-
|
|
620
|
-
return typing.cast(None, jsii.sinvoke(cls, "validateUnreferencedFileRemoval", [unreferenced_file_removal]))
|
|
713
|
+
...
|
|
621
714
|
|
|
622
715
|
@jsii.member(jsii_name="addToResourcePolicy")
|
|
623
716
|
def add_to_resource_policy(
|
|
624
717
|
self,
|
|
625
718
|
statement: _aws_cdk_aws_iam_ceddda9d.PolicyStatement,
|
|
626
719
|
) -> _aws_cdk_aws_iam_ceddda9d.AddToResourcePolicyResult:
|
|
627
|
-
'''(experimental) Adds a statement to the resource policy for a principal (i.e. account/role/service) to perform actions on this table bucket and/or its
|
|
720
|
+
'''(experimental) Adds a statement to the resource policy for a principal (i.e. account/role/service) to perform actions on this table bucket and/or its tables.
|
|
628
721
|
|
|
629
722
|
Note that the policy statement may or may not be added to the policy.
|
|
630
723
|
For example, when an ``ITableBucket`` is created from an existing table bucket,
|
|
@@ -644,10 +737,7 @@ class TableBucket(
|
|
|
644
737
|
|
|
645
738
|
:stability: experimental
|
|
646
739
|
'''
|
|
647
|
-
|
|
648
|
-
type_hints = typing.get_type_hints(_typecheckingstub__51cd52e5dbcb37ec9f9fd146daf9705f341ba8056f0f9d812355dc6e0ec273cd)
|
|
649
|
-
check_type(argname="argument statement", value=statement, expected_type=type_hints["statement"])
|
|
650
|
-
return typing.cast(_aws_cdk_aws_iam_ceddda9d.AddToResourcePolicyResult, jsii.invoke(self, "addToResourcePolicy", [statement]))
|
|
740
|
+
...
|
|
651
741
|
|
|
652
742
|
@jsii.member(jsii_name="grantRead")
|
|
653
743
|
def grant_read(
|
|
@@ -660,16 +750,12 @@ class TableBucket(
|
|
|
660
750
|
If encryption is used, permission to use the key to decrypt the contents
|
|
661
751
|
of the bucket will also be granted to the same principal.
|
|
662
752
|
|
|
663
|
-
:param identity:
|
|
664
|
-
:param table_id:
|
|
753
|
+
:param identity: The principal to allow read permissions to.
|
|
754
|
+
:param table_id: Allow the permissions to all tables using '*' or to single table by its unique ID.
|
|
665
755
|
|
|
666
756
|
:stability: experimental
|
|
667
757
|
'''
|
|
668
|
-
|
|
669
|
-
type_hints = typing.get_type_hints(_typecheckingstub__fecb8141f36793842f11c48ee39490301f24e6f1f0de09abbbf16bf1f96f0cb3)
|
|
670
|
-
check_type(argname="argument identity", value=identity, expected_type=type_hints["identity"])
|
|
671
|
-
check_type(argname="argument table_id", value=table_id, expected_type=type_hints["table_id"])
|
|
672
|
-
return typing.cast(_aws_cdk_aws_iam_ceddda9d.Grant, jsii.invoke(self, "grantRead", [identity, table_id]))
|
|
758
|
+
...
|
|
673
759
|
|
|
674
760
|
@jsii.member(jsii_name="grantReadWrite")
|
|
675
761
|
def grant_read_write(
|
|
@@ -682,16 +768,12 @@ class TableBucket(
|
|
|
682
768
|
If encryption is used, permission to use the key to encrypt/decrypt the contents
|
|
683
769
|
of the bucket will also be granted to the same principal.
|
|
684
770
|
|
|
685
|
-
:param identity:
|
|
686
|
-
:param table_id:
|
|
771
|
+
:param identity: The principal to allow read and write permissions to.
|
|
772
|
+
:param table_id: Allow the permissions to all tables using '*' or to single table by its unique ID.
|
|
687
773
|
|
|
688
774
|
:stability: experimental
|
|
689
775
|
'''
|
|
690
|
-
|
|
691
|
-
type_hints = typing.get_type_hints(_typecheckingstub__cd8d4708cc079743c68f1ed7c239ba7a268460ad7ce4e417684326708cd34a54)
|
|
692
|
-
check_type(argname="argument identity", value=identity, expected_type=type_hints["identity"])
|
|
693
|
-
check_type(argname="argument table_id", value=table_id, expected_type=type_hints["table_id"])
|
|
694
|
-
return typing.cast(_aws_cdk_aws_iam_ceddda9d.Grant, jsii.invoke(self, "grantReadWrite", [identity, table_id]))
|
|
776
|
+
...
|
|
695
777
|
|
|
696
778
|
@jsii.member(jsii_name="grantWrite")
|
|
697
779
|
def grant_write(
|
|
@@ -704,44 +786,54 @@ class TableBucket(
|
|
|
704
786
|
If encryption is used, permission to use the key to encrypt the contents
|
|
705
787
|
of the bucket will also be granted to the same principal.
|
|
706
788
|
|
|
707
|
-
:param identity:
|
|
708
|
-
:param table_id:
|
|
789
|
+
:param identity: The principal to allow write permissions to.
|
|
790
|
+
:param table_id: Allow the permissions to all tables using '*' or to single table by its unique ID.
|
|
709
791
|
|
|
710
792
|
:stability: experimental
|
|
711
793
|
'''
|
|
712
|
-
|
|
713
|
-
type_hints = typing.get_type_hints(_typecheckingstub__6f9476ce4489c94b0b073d56ebee26cf1a8f5db20184e82de18e7238c0381b9a)
|
|
714
|
-
check_type(argname="argument identity", value=identity, expected_type=type_hints["identity"])
|
|
715
|
-
check_type(argname="argument table_id", value=table_id, expected_type=type_hints["table_id"])
|
|
716
|
-
return typing.cast(_aws_cdk_aws_iam_ceddda9d.Grant, jsii.invoke(self, "grantWrite", [identity, table_id]))
|
|
794
|
+
...
|
|
717
795
|
|
|
718
|
-
@jsii.python.classproperty
|
|
719
|
-
@jsii.member(jsii_name="PROPERTY_INJECTION_ID")
|
|
720
|
-
def PROPERTY_INJECTION_ID(cls) -> builtins.str:
|
|
721
|
-
'''(experimental) Uniquely identifies this class.
|
|
722
796
|
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
797
|
+
class _ITableBucketProxy(
|
|
798
|
+
jsii.proxy_for(_aws_cdk_ceddda9d.IResource), # type: ignore[misc]
|
|
799
|
+
):
|
|
800
|
+
'''(experimental) Interface definition for S3 Table Buckets.
|
|
801
|
+
|
|
802
|
+
:stability: experimental
|
|
803
|
+
'''
|
|
804
|
+
|
|
805
|
+
__jsii_type__: typing.ClassVar[str] = "@aws-cdk/aws-s3tables-alpha.ITableBucket"
|
|
726
806
|
|
|
727
807
|
@builtins.property
|
|
728
808
|
@jsii.member(jsii_name="tableBucketArn")
|
|
729
809
|
def table_bucket_arn(self) -> builtins.str:
|
|
730
|
-
'''(experimental) The
|
|
810
|
+
'''(experimental) The ARN of the table bucket.
|
|
731
811
|
|
|
732
812
|
:stability: experimental
|
|
813
|
+
:attribute: true
|
|
733
814
|
'''
|
|
734
815
|
return typing.cast(builtins.str, jsii.get(self, "tableBucketArn"))
|
|
735
816
|
|
|
736
817
|
@builtins.property
|
|
737
818
|
@jsii.member(jsii_name="tableBucketName")
|
|
738
819
|
def table_bucket_name(self) -> builtins.str:
|
|
739
|
-
'''(experimental) The name of
|
|
820
|
+
'''(experimental) The name of the table bucket.
|
|
740
821
|
|
|
741
822
|
:stability: experimental
|
|
823
|
+
:attribute: true
|
|
742
824
|
'''
|
|
743
825
|
return typing.cast(builtins.str, jsii.get(self, "tableBucketName"))
|
|
744
826
|
|
|
827
|
+
@builtins.property
|
|
828
|
+
@jsii.member(jsii_name="account")
|
|
829
|
+
def account(self) -> typing.Optional[builtins.str]:
|
|
830
|
+
'''(experimental) The accountId containing the table bucket.
|
|
831
|
+
|
|
832
|
+
:stability: experimental
|
|
833
|
+
:attribute: true
|
|
834
|
+
'''
|
|
835
|
+
return typing.cast(typing.Optional[builtins.str], jsii.get(self, "account"))
|
|
836
|
+
|
|
745
837
|
@builtins.property
|
|
746
838
|
@jsii.member(jsii_name="encryptionKey")
|
|
747
839
|
def encryption_key(self) -> typing.Optional[_aws_cdk_aws_kms_ceddda9d.IKey]:
|
|
@@ -752,118 +844,2043 @@ class TableBucket(
|
|
|
752
844
|
return typing.cast(typing.Optional[_aws_cdk_aws_kms_ceddda9d.IKey], jsii.get(self, "encryptionKey"))
|
|
753
845
|
|
|
754
846
|
@builtins.property
|
|
755
|
-
@jsii.member(jsii_name="
|
|
756
|
-
def
|
|
757
|
-
'''(experimental) The
|
|
847
|
+
@jsii.member(jsii_name="region")
|
|
848
|
+
def region(self) -> typing.Optional[builtins.str]:
|
|
849
|
+
'''(experimental) The region containing the table bucket.
|
|
850
|
+
|
|
851
|
+
:stability: experimental
|
|
852
|
+
:attribute: true
|
|
853
|
+
'''
|
|
854
|
+
return typing.cast(typing.Optional[builtins.str], jsii.get(self, "region"))
|
|
855
|
+
|
|
856
|
+
@jsii.member(jsii_name="addToResourcePolicy")
|
|
857
|
+
def add_to_resource_policy(
|
|
858
|
+
self,
|
|
859
|
+
statement: _aws_cdk_aws_iam_ceddda9d.PolicyStatement,
|
|
860
|
+
) -> _aws_cdk_aws_iam_ceddda9d.AddToResourcePolicyResult:
|
|
861
|
+
'''(experimental) Adds a statement to the resource policy for a principal (i.e. account/role/service) to perform actions on this table bucket and/or its tables.
|
|
862
|
+
|
|
863
|
+
Note that the policy statement may or may not be added to the policy.
|
|
864
|
+
For example, when an ``ITableBucket`` is created from an existing table bucket,
|
|
865
|
+
it's not possible to tell whether the bucket already has a policy
|
|
866
|
+
attached, let alone to re-use that policy to add more statements to it.
|
|
867
|
+
So it's safest to do nothing in these cases.
|
|
868
|
+
|
|
869
|
+
:param statement: the policy statement to be added to the bucket's policy.
|
|
870
|
+
|
|
871
|
+
:return:
|
|
872
|
+
|
|
873
|
+
metadata about the execution of this method. If the policy
|
|
874
|
+
was not added, the value of ``statementAdded`` will be ``false``. You
|
|
875
|
+
should always check this value to make sure that the operation was
|
|
876
|
+
actually carried out. Otherwise, synthesis and deploy will terminate
|
|
877
|
+
silently, which may be confusing.
|
|
878
|
+
|
|
879
|
+
:stability: experimental
|
|
880
|
+
'''
|
|
881
|
+
if __debug__:
|
|
882
|
+
type_hints = typing.get_type_hints(_typecheckingstub__a7c10542c60e15926bb4ef59925c4f6c0878400e041897780edddaa65054d627)
|
|
883
|
+
check_type(argname="argument statement", value=statement, expected_type=type_hints["statement"])
|
|
884
|
+
return typing.cast(_aws_cdk_aws_iam_ceddda9d.AddToResourcePolicyResult, jsii.invoke(self, "addToResourcePolicy", [statement]))
|
|
885
|
+
|
|
886
|
+
@jsii.member(jsii_name="grantRead")
|
|
887
|
+
def grant_read(
|
|
888
|
+
self,
|
|
889
|
+
identity: _aws_cdk_aws_iam_ceddda9d.IGrantable,
|
|
890
|
+
table_id: builtins.str,
|
|
891
|
+
) -> _aws_cdk_aws_iam_ceddda9d.Grant:
|
|
892
|
+
'''(experimental) Grant read permissions for this table bucket and its tables to an IAM principal (Role/Group/User).
|
|
893
|
+
|
|
894
|
+
If encryption is used, permission to use the key to decrypt the contents
|
|
895
|
+
of the bucket will also be granted to the same principal.
|
|
896
|
+
|
|
897
|
+
:param identity: The principal to allow read permissions to.
|
|
898
|
+
:param table_id: Allow the permissions to all tables using '*' or to single table by its unique ID.
|
|
899
|
+
|
|
900
|
+
:stability: experimental
|
|
901
|
+
'''
|
|
902
|
+
if __debug__:
|
|
903
|
+
type_hints = typing.get_type_hints(_typecheckingstub__853d3e698d103ae1fe304d2239745ee798278fcd22f673c7ae8e9b33884c90a9)
|
|
904
|
+
check_type(argname="argument identity", value=identity, expected_type=type_hints["identity"])
|
|
905
|
+
check_type(argname="argument table_id", value=table_id, expected_type=type_hints["table_id"])
|
|
906
|
+
return typing.cast(_aws_cdk_aws_iam_ceddda9d.Grant, jsii.invoke(self, "grantRead", [identity, table_id]))
|
|
907
|
+
|
|
908
|
+
@jsii.member(jsii_name="grantReadWrite")
|
|
909
|
+
def grant_read_write(
|
|
910
|
+
self,
|
|
911
|
+
identity: _aws_cdk_aws_iam_ceddda9d.IGrantable,
|
|
912
|
+
table_id: builtins.str,
|
|
913
|
+
) -> _aws_cdk_aws_iam_ceddda9d.Grant:
|
|
914
|
+
'''(experimental) Grant read and write permissions for this table bucket and its tables to an IAM principal (Role/Group/User).
|
|
915
|
+
|
|
916
|
+
If encryption is used, permission to use the key to encrypt/decrypt the contents
|
|
917
|
+
of the bucket will also be granted to the same principal.
|
|
918
|
+
|
|
919
|
+
:param identity: The principal to allow read and write permissions to.
|
|
920
|
+
:param table_id: Allow the permissions to all tables using '*' or to single table by its unique ID.
|
|
921
|
+
|
|
922
|
+
:stability: experimental
|
|
923
|
+
'''
|
|
924
|
+
if __debug__:
|
|
925
|
+
type_hints = typing.get_type_hints(_typecheckingstub__1c9eb5186509f26b2c015223d6e2614c16cc34d5c2608ca3903b133360e23990)
|
|
926
|
+
check_type(argname="argument identity", value=identity, expected_type=type_hints["identity"])
|
|
927
|
+
check_type(argname="argument table_id", value=table_id, expected_type=type_hints["table_id"])
|
|
928
|
+
return typing.cast(_aws_cdk_aws_iam_ceddda9d.Grant, jsii.invoke(self, "grantReadWrite", [identity, table_id]))
|
|
929
|
+
|
|
930
|
+
@jsii.member(jsii_name="grantWrite")
|
|
931
|
+
def grant_write(
|
|
932
|
+
self,
|
|
933
|
+
identity: _aws_cdk_aws_iam_ceddda9d.IGrantable,
|
|
934
|
+
table_id: builtins.str,
|
|
935
|
+
) -> _aws_cdk_aws_iam_ceddda9d.Grant:
|
|
936
|
+
'''(experimental) Grant write permissions for this table bucket and its tables to an IAM principal (Role/Group/User).
|
|
937
|
+
|
|
938
|
+
If encryption is used, permission to use the key to encrypt the contents
|
|
939
|
+
of the bucket will also be granted to the same principal.
|
|
940
|
+
|
|
941
|
+
:param identity: The principal to allow write permissions to.
|
|
942
|
+
:param table_id: Allow the permissions to all tables using '*' or to single table by its unique ID.
|
|
943
|
+
|
|
944
|
+
:stability: experimental
|
|
945
|
+
'''
|
|
946
|
+
if __debug__:
|
|
947
|
+
type_hints = typing.get_type_hints(_typecheckingstub__65fa831e505e76e1fe23a8a8d8ce97bb97ebff683edbf67f37020df64c040fdb)
|
|
948
|
+
check_type(argname="argument identity", value=identity, expected_type=type_hints["identity"])
|
|
949
|
+
check_type(argname="argument table_id", value=table_id, expected_type=type_hints["table_id"])
|
|
950
|
+
return typing.cast(_aws_cdk_aws_iam_ceddda9d.Grant, jsii.invoke(self, "grantWrite", [identity, table_id]))
|
|
951
|
+
|
|
952
|
+
# Adding a "__jsii_proxy_class__(): typing.Type" function to the interface
|
|
953
|
+
typing.cast(typing.Any, ITableBucket).__jsii_proxy_class__ = lambda : _ITableBucketProxy
|
|
954
|
+
|
|
955
|
+
|
|
956
|
+
@jsii.data_type(
|
|
957
|
+
jsii_type="@aws-cdk/aws-s3tables-alpha.IcebergMetadataProperty",
|
|
958
|
+
jsii_struct_bases=[],
|
|
959
|
+
name_mapping={"iceberg_schema": "icebergSchema"},
|
|
960
|
+
)
|
|
961
|
+
class IcebergMetadataProperty:
|
|
962
|
+
def __init__(
|
|
963
|
+
self,
|
|
964
|
+
*,
|
|
965
|
+
iceberg_schema: typing.Union["IcebergSchemaProperty", typing.Dict[builtins.str, typing.Any]],
|
|
966
|
+
) -> None:
|
|
967
|
+
'''(experimental) Contains details about the metadata for an Iceberg table.
|
|
968
|
+
|
|
969
|
+
:param iceberg_schema: (experimental) Contains details about the schema for an Iceberg table.
|
|
970
|
+
|
|
971
|
+
:see: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3tables-table-icebergmetadata.html
|
|
972
|
+
:stability: experimental
|
|
973
|
+
:exampleMetadata: infused
|
|
974
|
+
|
|
975
|
+
Example::
|
|
976
|
+
|
|
977
|
+
# Build a table
|
|
978
|
+
sample_table = Table(scope, "ExampleTable",
|
|
979
|
+
table_name="example_table",
|
|
980
|
+
namespace=namespace,
|
|
981
|
+
open_table_format=OpenTableFormat.ICEBERG,
|
|
982
|
+
without_metadata=True
|
|
983
|
+
)
|
|
984
|
+
|
|
985
|
+
# Build a table with an Iceberg Schema
|
|
986
|
+
sample_table_with_schema = Table(scope, "ExampleSchemaTable",
|
|
987
|
+
table_name="example_table_with_schema",
|
|
988
|
+
namespace=namespace,
|
|
989
|
+
open_table_format=OpenTableFormat.ICEBERG,
|
|
990
|
+
iceberg_metadata=IcebergMetadataProperty(
|
|
991
|
+
iceberg_schema=IcebergSchemaProperty(
|
|
992
|
+
schema_field_list=[SchemaFieldProperty(
|
|
993
|
+
name="id",
|
|
994
|
+
type="int",
|
|
995
|
+
required=True
|
|
996
|
+
), SchemaFieldProperty(
|
|
997
|
+
name="name",
|
|
998
|
+
type="string"
|
|
999
|
+
)
|
|
1000
|
+
]
|
|
1001
|
+
)
|
|
1002
|
+
),
|
|
1003
|
+
compaction=CompactionProperty(
|
|
1004
|
+
status=Status.ENABLED,
|
|
1005
|
+
target_file_size_mb=128
|
|
1006
|
+
),
|
|
1007
|
+
snapshot_management=SnapshotManagementProperty(
|
|
1008
|
+
status=Status.ENABLED,
|
|
1009
|
+
max_snapshot_age_hours=48,
|
|
1010
|
+
min_snapshots_to_keep=5
|
|
1011
|
+
)
|
|
1012
|
+
)
|
|
1013
|
+
'''
|
|
1014
|
+
if isinstance(iceberg_schema, dict):
|
|
1015
|
+
iceberg_schema = IcebergSchemaProperty(**iceberg_schema)
|
|
1016
|
+
if __debug__:
|
|
1017
|
+
type_hints = typing.get_type_hints(_typecheckingstub__f8230e6a4eadd2193ba7389b1a23bde451e68a07c19bcda56cba1c321d75d5f0)
|
|
1018
|
+
check_type(argname="argument iceberg_schema", value=iceberg_schema, expected_type=type_hints["iceberg_schema"])
|
|
1019
|
+
self._values: typing.Dict[builtins.str, typing.Any] = {
|
|
1020
|
+
"iceberg_schema": iceberg_schema,
|
|
1021
|
+
}
|
|
1022
|
+
|
|
1023
|
+
@builtins.property
|
|
1024
|
+
def iceberg_schema(self) -> "IcebergSchemaProperty":
|
|
1025
|
+
'''(experimental) Contains details about the schema for an Iceberg table.
|
|
1026
|
+
|
|
1027
|
+
:see: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3tables-table-icebergmetadata.html#cfn-s3tables-table-icebergmetadata-icebergschema
|
|
1028
|
+
:stability: experimental
|
|
1029
|
+
'''
|
|
1030
|
+
result = self._values.get("iceberg_schema")
|
|
1031
|
+
assert result is not None, "Required property 'iceberg_schema' is missing"
|
|
1032
|
+
return typing.cast("IcebergSchemaProperty", result)
|
|
1033
|
+
|
|
1034
|
+
def __eq__(self, rhs: typing.Any) -> builtins.bool:
|
|
1035
|
+
return isinstance(rhs, self.__class__) and rhs._values == self._values
|
|
1036
|
+
|
|
1037
|
+
def __ne__(self, rhs: typing.Any) -> builtins.bool:
|
|
1038
|
+
return not (rhs == self)
|
|
1039
|
+
|
|
1040
|
+
def __repr__(self) -> str:
|
|
1041
|
+
return "IcebergMetadataProperty(%s)" % ", ".join(
|
|
1042
|
+
k + "=" + repr(v) for k, v in self._values.items()
|
|
1043
|
+
)
|
|
1044
|
+
|
|
1045
|
+
|
|
1046
|
+
@jsii.data_type(
|
|
1047
|
+
jsii_type="@aws-cdk/aws-s3tables-alpha.IcebergSchemaProperty",
|
|
1048
|
+
jsii_struct_bases=[],
|
|
1049
|
+
name_mapping={"schema_field_list": "schemaFieldList"},
|
|
1050
|
+
)
|
|
1051
|
+
class IcebergSchemaProperty:
|
|
1052
|
+
def __init__(
|
|
1053
|
+
self,
|
|
1054
|
+
*,
|
|
1055
|
+
schema_field_list: typing.Sequence[typing.Union["SchemaFieldProperty", typing.Dict[builtins.str, typing.Any]]],
|
|
1056
|
+
) -> None:
|
|
1057
|
+
'''(experimental) Contains details about the schema for an Iceberg table.
|
|
1058
|
+
|
|
1059
|
+
:param schema_field_list: (experimental) Contains details about the schema for an Iceberg table.
|
|
1060
|
+
|
|
1061
|
+
:stability: experimental
|
|
1062
|
+
:exampleMetadata: infused
|
|
1063
|
+
|
|
1064
|
+
Example::
|
|
1065
|
+
|
|
1066
|
+
# Build a table
|
|
1067
|
+
sample_table = Table(scope, "ExampleTable",
|
|
1068
|
+
table_name="example_table",
|
|
1069
|
+
namespace=namespace,
|
|
1070
|
+
open_table_format=OpenTableFormat.ICEBERG,
|
|
1071
|
+
without_metadata=True
|
|
1072
|
+
)
|
|
1073
|
+
|
|
1074
|
+
# Build a table with an Iceberg Schema
|
|
1075
|
+
sample_table_with_schema = Table(scope, "ExampleSchemaTable",
|
|
1076
|
+
table_name="example_table_with_schema",
|
|
1077
|
+
namespace=namespace,
|
|
1078
|
+
open_table_format=OpenTableFormat.ICEBERG,
|
|
1079
|
+
iceberg_metadata=IcebergMetadataProperty(
|
|
1080
|
+
iceberg_schema=IcebergSchemaProperty(
|
|
1081
|
+
schema_field_list=[SchemaFieldProperty(
|
|
1082
|
+
name="id",
|
|
1083
|
+
type="int",
|
|
1084
|
+
required=True
|
|
1085
|
+
), SchemaFieldProperty(
|
|
1086
|
+
name="name",
|
|
1087
|
+
type="string"
|
|
1088
|
+
)
|
|
1089
|
+
]
|
|
1090
|
+
)
|
|
1091
|
+
),
|
|
1092
|
+
compaction=CompactionProperty(
|
|
1093
|
+
status=Status.ENABLED,
|
|
1094
|
+
target_file_size_mb=128
|
|
1095
|
+
),
|
|
1096
|
+
snapshot_management=SnapshotManagementProperty(
|
|
1097
|
+
status=Status.ENABLED,
|
|
1098
|
+
max_snapshot_age_hours=48,
|
|
1099
|
+
min_snapshots_to_keep=5
|
|
1100
|
+
)
|
|
1101
|
+
)
|
|
1102
|
+
'''
|
|
1103
|
+
if __debug__:
|
|
1104
|
+
type_hints = typing.get_type_hints(_typecheckingstub__f4da2961c1ead632b855491f63cf76c4886c0e7a3d1795c1533655124a5dccb6)
|
|
1105
|
+
check_type(argname="argument schema_field_list", value=schema_field_list, expected_type=type_hints["schema_field_list"])
|
|
1106
|
+
self._values: typing.Dict[builtins.str, typing.Any] = {
|
|
1107
|
+
"schema_field_list": schema_field_list,
|
|
1108
|
+
}
|
|
1109
|
+
|
|
1110
|
+
@builtins.property
|
|
1111
|
+
def schema_field_list(self) -> typing.List["SchemaFieldProperty"]:
|
|
1112
|
+
'''(experimental) Contains details about the schema for an Iceberg table.
|
|
1113
|
+
|
|
1114
|
+
:stability: experimental
|
|
1115
|
+
'''
|
|
1116
|
+
result = self._values.get("schema_field_list")
|
|
1117
|
+
assert result is not None, "Required property 'schema_field_list' is missing"
|
|
1118
|
+
return typing.cast(typing.List["SchemaFieldProperty"], result)
|
|
1119
|
+
|
|
1120
|
+
def __eq__(self, rhs: typing.Any) -> builtins.bool:
|
|
1121
|
+
return isinstance(rhs, self.__class__) and rhs._values == self._values
|
|
1122
|
+
|
|
1123
|
+
def __ne__(self, rhs: typing.Any) -> builtins.bool:
|
|
1124
|
+
return not (rhs == self)
|
|
1125
|
+
|
|
1126
|
+
def __repr__(self) -> str:
|
|
1127
|
+
return "IcebergSchemaProperty(%s)" % ", ".join(
|
|
1128
|
+
k + "=" + repr(v) for k, v in self._values.items()
|
|
1129
|
+
)
|
|
1130
|
+
|
|
1131
|
+
|
|
1132
|
+
@jsii.implements(INamespace)
|
|
1133
|
+
class Namespace(
|
|
1134
|
+
_aws_cdk_ceddda9d.Resource,
|
|
1135
|
+
metaclass=jsii.JSIIMeta,
|
|
1136
|
+
jsii_type="@aws-cdk/aws-s3tables-alpha.Namespace",
|
|
1137
|
+
):
|
|
1138
|
+
'''(experimental) An S3 Tables Namespace with helpers.
|
|
1139
|
+
|
|
1140
|
+
A namespace is a logical container for tables within a table bucket.
|
|
1141
|
+
|
|
1142
|
+
:stability: experimental
|
|
1143
|
+
:exampleMetadata: infused
|
|
1144
|
+
|
|
1145
|
+
Example::
|
|
1146
|
+
|
|
1147
|
+
# Build a namespace
|
|
1148
|
+
sample_namespace = Namespace(scope, "ExampleNamespace",
|
|
1149
|
+
namespace_name="example-namespace-1",
|
|
1150
|
+
table_bucket=table_bucket
|
|
1151
|
+
)
|
|
1152
|
+
'''
|
|
1153
|
+
|
|
1154
|
+
def __init__(
|
|
1155
|
+
self,
|
|
1156
|
+
scope: _constructs_77d1e7e8.Construct,
|
|
1157
|
+
id: builtins.str,
|
|
1158
|
+
*,
|
|
1159
|
+
namespace_name: builtins.str,
|
|
1160
|
+
table_bucket: ITableBucket,
|
|
1161
|
+
removal_policy: typing.Optional[_aws_cdk_ceddda9d.RemovalPolicy] = None,
|
|
1162
|
+
) -> None:
|
|
1163
|
+
'''
|
|
1164
|
+
:param scope: -
|
|
1165
|
+
:param id: -
|
|
1166
|
+
:param namespace_name: (experimental) A name for the namespace.
|
|
1167
|
+
:param table_bucket: (experimental) The table bucket this namespace belongs to.
|
|
1168
|
+
:param removal_policy: (experimental) Policy to apply when the policy is removed from this stack. Default: RemovalPolicy.DESTROY
|
|
1169
|
+
|
|
1170
|
+
:stability: experimental
|
|
1171
|
+
'''
|
|
1172
|
+
if __debug__:
|
|
1173
|
+
type_hints = typing.get_type_hints(_typecheckingstub__ea3444f2b1f25cee0bac27bf1e4c044f18ded5f025356448c35a47f4611915d5)
|
|
1174
|
+
check_type(argname="argument scope", value=scope, expected_type=type_hints["scope"])
|
|
1175
|
+
check_type(argname="argument id", value=id, expected_type=type_hints["id"])
|
|
1176
|
+
props = NamespaceProps(
|
|
1177
|
+
namespace_name=namespace_name,
|
|
1178
|
+
table_bucket=table_bucket,
|
|
1179
|
+
removal_policy=removal_policy,
|
|
1180
|
+
)
|
|
1181
|
+
|
|
1182
|
+
jsii.create(self.__class__, self, [scope, id, props])
|
|
1183
|
+
|
|
1184
|
+
@jsii.member(jsii_name="fromNamespaceAttributes")
|
|
1185
|
+
@builtins.classmethod
|
|
1186
|
+
def from_namespace_attributes(
|
|
1187
|
+
cls,
|
|
1188
|
+
scope: _constructs_77d1e7e8.Construct,
|
|
1189
|
+
id: builtins.str,
|
|
1190
|
+
*,
|
|
1191
|
+
namespace_name: builtins.str,
|
|
1192
|
+
table_bucket: ITableBucket,
|
|
1193
|
+
) -> INamespace:
|
|
1194
|
+
'''(experimental) Import an existing namespace from its attributes.
|
|
1195
|
+
|
|
1196
|
+
:param scope: -
|
|
1197
|
+
:param id: -
|
|
1198
|
+
:param namespace_name: (experimental) The name of the namespace.
|
|
1199
|
+
:param table_bucket: (experimental) The table bucket this namespace belongs to.
|
|
1200
|
+
|
|
1201
|
+
:stability: experimental
|
|
1202
|
+
'''
|
|
1203
|
+
if __debug__:
|
|
1204
|
+
type_hints = typing.get_type_hints(_typecheckingstub__429e6100662356607de36bc4f09397c07482d4becdff99cdf1257c1b95547276)
|
|
1205
|
+
check_type(argname="argument scope", value=scope, expected_type=type_hints["scope"])
|
|
1206
|
+
check_type(argname="argument id", value=id, expected_type=type_hints["id"])
|
|
1207
|
+
attrs = NamespaceAttributes(
|
|
1208
|
+
namespace_name=namespace_name, table_bucket=table_bucket
|
|
1209
|
+
)
|
|
1210
|
+
|
|
1211
|
+
return typing.cast(INamespace, jsii.sinvoke(cls, "fromNamespaceAttributes", [scope, id, attrs]))
|
|
1212
|
+
|
|
1213
|
+
@jsii.member(jsii_name="validateNamespaceName")
|
|
1214
|
+
@builtins.classmethod
|
|
1215
|
+
def validate_namespace_name(cls, namespace_name: builtins.str) -> None:
|
|
1216
|
+
'''(experimental) See https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-tables-buckets-naming.html.
|
|
1217
|
+
|
|
1218
|
+
:param namespace_name: Name of the namespace.
|
|
1219
|
+
|
|
1220
|
+
:stability: experimental
|
|
1221
|
+
:throws: UnscopedValidationError if any naming errors are detected
|
|
1222
|
+
'''
|
|
1223
|
+
if __debug__:
|
|
1224
|
+
type_hints = typing.get_type_hints(_typecheckingstub__4a07351eb257958d2290e548252c46a7c8963c7bc2f700e83671f819e4b7dbd5)
|
|
1225
|
+
check_type(argname="argument namespace_name", value=namespace_name, expected_type=type_hints["namespace_name"])
|
|
1226
|
+
return typing.cast(None, jsii.sinvoke(cls, "validateNamespaceName", [namespace_name]))
|
|
1227
|
+
|
|
1228
|
+
@jsii.python.classproperty
|
|
1229
|
+
@jsii.member(jsii_name="PROPERTY_INJECTION_ID")
|
|
1230
|
+
def PROPERTY_INJECTION_ID(cls) -> builtins.str:
|
|
1231
|
+
'''(experimental) Uniquely identifies this class.
|
|
1232
|
+
|
|
1233
|
+
:stability: experimental
|
|
1234
|
+
'''
|
|
1235
|
+
return typing.cast(builtins.str, jsii.sget(cls, "PROPERTY_INJECTION_ID"))
|
|
1236
|
+
|
|
1237
|
+
@builtins.property
|
|
1238
|
+
@jsii.member(jsii_name="namespaceName")
|
|
1239
|
+
def namespace_name(self) -> builtins.str:
|
|
1240
|
+
'''(experimental) The name of this namespace.
|
|
1241
|
+
|
|
1242
|
+
:stability: experimental
|
|
1243
|
+
'''
|
|
1244
|
+
return typing.cast(builtins.str, jsii.get(self, "namespaceName"))
|
|
1245
|
+
|
|
1246
|
+
@builtins.property
|
|
1247
|
+
@jsii.member(jsii_name="tableBucket")
|
|
1248
|
+
def table_bucket(self) -> ITableBucket:
|
|
1249
|
+
'''(experimental) The table bucket which this namespace belongs to.
|
|
1250
|
+
|
|
1251
|
+
:stability: experimental
|
|
1252
|
+
'''
|
|
1253
|
+
return typing.cast(ITableBucket, jsii.get(self, "tableBucket"))
|
|
1254
|
+
|
|
1255
|
+
|
|
1256
|
+
@jsii.data_type(
|
|
1257
|
+
jsii_type="@aws-cdk/aws-s3tables-alpha.NamespaceAttributes",
|
|
1258
|
+
jsii_struct_bases=[],
|
|
1259
|
+
name_mapping={"namespace_name": "namespaceName", "table_bucket": "tableBucket"},
|
|
1260
|
+
)
|
|
1261
|
+
class NamespaceAttributes:
|
|
1262
|
+
def __init__(
|
|
1263
|
+
self,
|
|
1264
|
+
*,
|
|
1265
|
+
namespace_name: builtins.str,
|
|
1266
|
+
table_bucket: ITableBucket,
|
|
1267
|
+
) -> None:
|
|
1268
|
+
'''(experimental) Attributes for importing an existing namespace.
|
|
1269
|
+
|
|
1270
|
+
:param namespace_name: (experimental) The name of the namespace.
|
|
1271
|
+
:param table_bucket: (experimental) The table bucket this namespace belongs to.
|
|
1272
|
+
|
|
1273
|
+
:stability: experimental
|
|
1274
|
+
:exampleMetadata: fixture=_generated
|
|
1275
|
+
|
|
1276
|
+
Example::
|
|
1277
|
+
|
|
1278
|
+
# The code below shows an example of how to instantiate this type.
|
|
1279
|
+
# The values are placeholders you should change.
|
|
1280
|
+
import aws_cdk.aws_s3tables_alpha as s3tables_alpha
|
|
1281
|
+
|
|
1282
|
+
# table_bucket: s3tables_alpha.TableBucket
|
|
1283
|
+
|
|
1284
|
+
namespace_attributes = s3tables_alpha.NamespaceAttributes(
|
|
1285
|
+
namespace_name="namespaceName",
|
|
1286
|
+
table_bucket=table_bucket
|
|
1287
|
+
)
|
|
1288
|
+
'''
|
|
1289
|
+
if __debug__:
|
|
1290
|
+
type_hints = typing.get_type_hints(_typecheckingstub__8f79f8c2998fe357462fbff82a75e82ed3236dd34caffcf6f6267cffcdda3275)
|
|
1291
|
+
check_type(argname="argument namespace_name", value=namespace_name, expected_type=type_hints["namespace_name"])
|
|
1292
|
+
check_type(argname="argument table_bucket", value=table_bucket, expected_type=type_hints["table_bucket"])
|
|
1293
|
+
self._values: typing.Dict[builtins.str, typing.Any] = {
|
|
1294
|
+
"namespace_name": namespace_name,
|
|
1295
|
+
"table_bucket": table_bucket,
|
|
1296
|
+
}
|
|
1297
|
+
|
|
1298
|
+
@builtins.property
|
|
1299
|
+
def namespace_name(self) -> builtins.str:
|
|
1300
|
+
'''(experimental) The name of the namespace.
|
|
1301
|
+
|
|
1302
|
+
:stability: experimental
|
|
1303
|
+
'''
|
|
1304
|
+
result = self._values.get("namespace_name")
|
|
1305
|
+
assert result is not None, "Required property 'namespace_name' is missing"
|
|
1306
|
+
return typing.cast(builtins.str, result)
|
|
1307
|
+
|
|
1308
|
+
@builtins.property
|
|
1309
|
+
def table_bucket(self) -> ITableBucket:
|
|
1310
|
+
'''(experimental) The table bucket this namespace belongs to.
|
|
1311
|
+
|
|
1312
|
+
:stability: experimental
|
|
1313
|
+
'''
|
|
1314
|
+
result = self._values.get("table_bucket")
|
|
1315
|
+
assert result is not None, "Required property 'table_bucket' is missing"
|
|
1316
|
+
return typing.cast(ITableBucket, result)
|
|
1317
|
+
|
|
1318
|
+
def __eq__(self, rhs: typing.Any) -> builtins.bool:
|
|
1319
|
+
return isinstance(rhs, self.__class__) and rhs._values == self._values
|
|
1320
|
+
|
|
1321
|
+
def __ne__(self, rhs: typing.Any) -> builtins.bool:
|
|
1322
|
+
return not (rhs == self)
|
|
1323
|
+
|
|
1324
|
+
def __repr__(self) -> str:
|
|
1325
|
+
return "NamespaceAttributes(%s)" % ", ".join(
|
|
1326
|
+
k + "=" + repr(v) for k, v in self._values.items()
|
|
1327
|
+
)
|
|
1328
|
+
|
|
1329
|
+
|
|
1330
|
+
@jsii.data_type(
|
|
1331
|
+
jsii_type="@aws-cdk/aws-s3tables-alpha.NamespaceProps",
|
|
1332
|
+
jsii_struct_bases=[],
|
|
1333
|
+
name_mapping={
|
|
1334
|
+
"namespace_name": "namespaceName",
|
|
1335
|
+
"table_bucket": "tableBucket",
|
|
1336
|
+
"removal_policy": "removalPolicy",
|
|
1337
|
+
},
|
|
1338
|
+
)
|
|
1339
|
+
class NamespaceProps:
|
|
1340
|
+
def __init__(
|
|
1341
|
+
self,
|
|
1342
|
+
*,
|
|
1343
|
+
namespace_name: builtins.str,
|
|
1344
|
+
table_bucket: ITableBucket,
|
|
1345
|
+
removal_policy: typing.Optional[_aws_cdk_ceddda9d.RemovalPolicy] = None,
|
|
1346
|
+
) -> None:
|
|
1347
|
+
'''(experimental) Parameters for constructing a Namespace.
|
|
1348
|
+
|
|
1349
|
+
:param namespace_name: (experimental) A name for the namespace.
|
|
1350
|
+
:param table_bucket: (experimental) The table bucket this namespace belongs to.
|
|
1351
|
+
:param removal_policy: (experimental) Policy to apply when the policy is removed from this stack. Default: RemovalPolicy.DESTROY
|
|
1352
|
+
|
|
1353
|
+
:stability: experimental
|
|
1354
|
+
:exampleMetadata: infused
|
|
1355
|
+
|
|
1356
|
+
Example::
|
|
1357
|
+
|
|
1358
|
+
# Build a namespace
|
|
1359
|
+
sample_namespace = Namespace(scope, "ExampleNamespace",
|
|
1360
|
+
namespace_name="example-namespace-1",
|
|
1361
|
+
table_bucket=table_bucket
|
|
1362
|
+
)
|
|
1363
|
+
'''
|
|
1364
|
+
if __debug__:
|
|
1365
|
+
type_hints = typing.get_type_hints(_typecheckingstub__fd18f87a98f23ccaea0f0c36db6b294de2ffbbb509594c9bfa49f26b6b0d0e7a)
|
|
1366
|
+
check_type(argname="argument namespace_name", value=namespace_name, expected_type=type_hints["namespace_name"])
|
|
1367
|
+
check_type(argname="argument table_bucket", value=table_bucket, expected_type=type_hints["table_bucket"])
|
|
1368
|
+
check_type(argname="argument removal_policy", value=removal_policy, expected_type=type_hints["removal_policy"])
|
|
1369
|
+
self._values: typing.Dict[builtins.str, typing.Any] = {
|
|
1370
|
+
"namespace_name": namespace_name,
|
|
1371
|
+
"table_bucket": table_bucket,
|
|
1372
|
+
}
|
|
1373
|
+
if removal_policy is not None:
|
|
1374
|
+
self._values["removal_policy"] = removal_policy
|
|
1375
|
+
|
|
1376
|
+
@builtins.property
|
|
1377
|
+
def namespace_name(self) -> builtins.str:
|
|
1378
|
+
'''(experimental) A name for the namespace.
|
|
1379
|
+
|
|
1380
|
+
:stability: experimental
|
|
1381
|
+
'''
|
|
1382
|
+
result = self._values.get("namespace_name")
|
|
1383
|
+
assert result is not None, "Required property 'namespace_name' is missing"
|
|
1384
|
+
return typing.cast(builtins.str, result)
|
|
1385
|
+
|
|
1386
|
+
@builtins.property
|
|
1387
|
+
def table_bucket(self) -> ITableBucket:
|
|
1388
|
+
'''(experimental) The table bucket this namespace belongs to.
|
|
1389
|
+
|
|
1390
|
+
:stability: experimental
|
|
1391
|
+
'''
|
|
1392
|
+
result = self._values.get("table_bucket")
|
|
1393
|
+
assert result is not None, "Required property 'table_bucket' is missing"
|
|
1394
|
+
return typing.cast(ITableBucket, result)
|
|
1395
|
+
|
|
1396
|
+
@builtins.property
|
|
1397
|
+
def removal_policy(self) -> typing.Optional[_aws_cdk_ceddda9d.RemovalPolicy]:
|
|
1398
|
+
'''(experimental) Policy to apply when the policy is removed from this stack.
|
|
1399
|
+
|
|
1400
|
+
:default: RemovalPolicy.DESTROY
|
|
1401
|
+
|
|
1402
|
+
:stability: experimental
|
|
1403
|
+
'''
|
|
1404
|
+
result = self._values.get("removal_policy")
|
|
1405
|
+
return typing.cast(typing.Optional[_aws_cdk_ceddda9d.RemovalPolicy], result)
|
|
1406
|
+
|
|
1407
|
+
def __eq__(self, rhs: typing.Any) -> builtins.bool:
|
|
1408
|
+
return isinstance(rhs, self.__class__) and rhs._values == self._values
|
|
1409
|
+
|
|
1410
|
+
def __ne__(self, rhs: typing.Any) -> builtins.bool:
|
|
1411
|
+
return not (rhs == self)
|
|
1412
|
+
|
|
1413
|
+
def __repr__(self) -> str:
|
|
1414
|
+
return "NamespaceProps(%s)" % ", ".join(
|
|
1415
|
+
k + "=" + repr(v) for k, v in self._values.items()
|
|
1416
|
+
)
|
|
1417
|
+
|
|
1418
|
+
|
|
1419
|
+
@jsii.enum(jsii_type="@aws-cdk/aws-s3tables-alpha.OpenTableFormat")
|
|
1420
|
+
class OpenTableFormat(enum.Enum):
|
|
1421
|
+
'''(experimental) Supported open table formats.
|
|
1422
|
+
|
|
1423
|
+
:stability: experimental
|
|
1424
|
+
'''
|
|
1425
|
+
|
|
1426
|
+
ICEBERG = "ICEBERG"
|
|
1427
|
+
'''(experimental) Apache Iceberg table format.
|
|
1428
|
+
|
|
1429
|
+
:stability: experimental
|
|
1430
|
+
'''
|
|
1431
|
+
|
|
1432
|
+
|
|
1433
|
+
@jsii.data_type(
|
|
1434
|
+
jsii_type="@aws-cdk/aws-s3tables-alpha.SchemaFieldProperty",
|
|
1435
|
+
jsii_struct_bases=[],
|
|
1436
|
+
name_mapping={"name": "name", "type": "type", "required": "required"},
|
|
1437
|
+
)
|
|
1438
|
+
class SchemaFieldProperty:
|
|
1439
|
+
def __init__(
|
|
1440
|
+
self,
|
|
1441
|
+
*,
|
|
1442
|
+
name: builtins.str,
|
|
1443
|
+
type: builtins.str,
|
|
1444
|
+
required: typing.Optional[builtins.bool] = None,
|
|
1445
|
+
) -> None:
|
|
1446
|
+
'''(experimental) Contains details about a schema field.
|
|
1447
|
+
|
|
1448
|
+
:param name: (experimental) The name of the field.
|
|
1449
|
+
:param type: (experimental) The field type. S3 Tables supports all Apache Iceberg primitive types. For more information, see the `Apache Iceberg documentation <https://docs.aws.amazon.com/https://iceberg.apache.org/spec/#primitive-types>`_.
|
|
1450
|
+
:param required: (experimental) A Boolean value that specifies whether values are required for each row in this field. By default, this is ``false`` and null values are allowed in the field. If this is ``true``, the field does not allow null values. Default: false
|
|
1451
|
+
|
|
1452
|
+
:stability: experimental
|
|
1453
|
+
:exampleMetadata: fixture=_generated
|
|
1454
|
+
|
|
1455
|
+
Example::
|
|
1456
|
+
|
|
1457
|
+
# The code below shows an example of how to instantiate this type.
|
|
1458
|
+
# The values are placeholders you should change.
|
|
1459
|
+
import aws_cdk.aws_s3tables_alpha as s3tables_alpha
|
|
1460
|
+
|
|
1461
|
+
schema_field_property = s3tables_alpha.SchemaFieldProperty(
|
|
1462
|
+
name="name",
|
|
1463
|
+
type="type",
|
|
1464
|
+
|
|
1465
|
+
# the properties below are optional
|
|
1466
|
+
required=False
|
|
1467
|
+
)
|
|
1468
|
+
'''
|
|
1469
|
+
if __debug__:
|
|
1470
|
+
type_hints = typing.get_type_hints(_typecheckingstub__798c061a7214691172814263e161286845f9f56262e641ae55c93d363ce227c1)
|
|
1471
|
+
check_type(argname="argument name", value=name, expected_type=type_hints["name"])
|
|
1472
|
+
check_type(argname="argument type", value=type, expected_type=type_hints["type"])
|
|
1473
|
+
check_type(argname="argument required", value=required, expected_type=type_hints["required"])
|
|
1474
|
+
self._values: typing.Dict[builtins.str, typing.Any] = {
|
|
1475
|
+
"name": name,
|
|
1476
|
+
"type": type,
|
|
1477
|
+
}
|
|
1478
|
+
if required is not None:
|
|
1479
|
+
self._values["required"] = required
|
|
1480
|
+
|
|
1481
|
+
@builtins.property
|
|
1482
|
+
def name(self) -> builtins.str:
|
|
1483
|
+
'''(experimental) The name of the field.
|
|
1484
|
+
|
|
1485
|
+
:stability: experimental
|
|
1486
|
+
'''
|
|
1487
|
+
result = self._values.get("name")
|
|
1488
|
+
assert result is not None, "Required property 'name' is missing"
|
|
1489
|
+
return typing.cast(builtins.str, result)
|
|
1490
|
+
|
|
1491
|
+
@builtins.property
|
|
1492
|
+
def type(self) -> builtins.str:
|
|
1493
|
+
'''(experimental) The field type.
|
|
1494
|
+
|
|
1495
|
+
S3 Tables supports all Apache Iceberg primitive types. For more information, see the `Apache Iceberg documentation <https://docs.aws.amazon.com/https://iceberg.apache.org/spec/#primitive-types>`_.
|
|
1496
|
+
|
|
1497
|
+
:stability: experimental
|
|
1498
|
+
'''
|
|
1499
|
+
result = self._values.get("type")
|
|
1500
|
+
assert result is not None, "Required property 'type' is missing"
|
|
1501
|
+
return typing.cast(builtins.str, result)
|
|
1502
|
+
|
|
1503
|
+
@builtins.property
|
|
1504
|
+
def required(self) -> typing.Optional[builtins.bool]:
|
|
1505
|
+
'''(experimental) A Boolean value that specifies whether values are required for each row in this field.
|
|
1506
|
+
|
|
1507
|
+
By default, this is ``false`` and null values are allowed in the field. If this is ``true``, the field does not allow null values.
|
|
1508
|
+
|
|
1509
|
+
:default: false
|
|
1510
|
+
|
|
1511
|
+
:stability: experimental
|
|
1512
|
+
'''
|
|
1513
|
+
result = self._values.get("required")
|
|
1514
|
+
return typing.cast(typing.Optional[builtins.bool], result)
|
|
1515
|
+
|
|
1516
|
+
def __eq__(self, rhs: typing.Any) -> builtins.bool:
|
|
1517
|
+
return isinstance(rhs, self.__class__) and rhs._values == self._values
|
|
1518
|
+
|
|
1519
|
+
def __ne__(self, rhs: typing.Any) -> builtins.bool:
|
|
1520
|
+
return not (rhs == self)
|
|
1521
|
+
|
|
1522
|
+
def __repr__(self) -> str:
|
|
1523
|
+
return "SchemaFieldProperty(%s)" % ", ".join(
|
|
1524
|
+
k + "=" + repr(v) for k, v in self._values.items()
|
|
1525
|
+
)
|
|
1526
|
+
|
|
1527
|
+
|
|
1528
|
+
@jsii.data_type(
|
|
1529
|
+
jsii_type="@aws-cdk/aws-s3tables-alpha.SnapshotManagementProperty",
|
|
1530
|
+
jsii_struct_bases=[],
|
|
1531
|
+
name_mapping={
|
|
1532
|
+
"max_snapshot_age_hours": "maxSnapshotAgeHours",
|
|
1533
|
+
"min_snapshots_to_keep": "minSnapshotsToKeep",
|
|
1534
|
+
"status": "status",
|
|
1535
|
+
},
|
|
1536
|
+
)
|
|
1537
|
+
class SnapshotManagementProperty:
|
|
1538
|
+
def __init__(
|
|
1539
|
+
self,
|
|
1540
|
+
*,
|
|
1541
|
+
max_snapshot_age_hours: typing.Optional[jsii.Number] = None,
|
|
1542
|
+
min_snapshots_to_keep: typing.Optional[jsii.Number] = None,
|
|
1543
|
+
status: typing.Optional["Status"] = None,
|
|
1544
|
+
) -> None:
|
|
1545
|
+
'''(experimental) Contains details about the snapshot management settings for an Iceberg table.
|
|
1546
|
+
|
|
1547
|
+
A snapshot is expired when it exceeds MinSnapshotsToKeep and MaxSnapshotAgeHours.
|
|
1548
|
+
|
|
1549
|
+
:param max_snapshot_age_hours: (experimental) The maximum age of a snapshot before it can be expired. Default: - No maximum age
|
|
1550
|
+
:param min_snapshots_to_keep: (experimental) The minimum number of snapshots to keep. Default: - No minimum number
|
|
1551
|
+
:param status: (experimental) Indicates whether the SnapshotManagement maintenance action is enabled. Default: - Not specified
|
|
1552
|
+
|
|
1553
|
+
:default: - No snapshot management settings
|
|
1554
|
+
|
|
1555
|
+
:stability: experimental
|
|
1556
|
+
:exampleMetadata: infused
|
|
1557
|
+
|
|
1558
|
+
Example::
|
|
1559
|
+
|
|
1560
|
+
# Build a table
|
|
1561
|
+
sample_table = Table(scope, "ExampleTable",
|
|
1562
|
+
table_name="example_table",
|
|
1563
|
+
namespace=namespace,
|
|
1564
|
+
open_table_format=OpenTableFormat.ICEBERG,
|
|
1565
|
+
without_metadata=True
|
|
1566
|
+
)
|
|
1567
|
+
|
|
1568
|
+
# Build a table with an Iceberg Schema
|
|
1569
|
+
sample_table_with_schema = Table(scope, "ExampleSchemaTable",
|
|
1570
|
+
table_name="example_table_with_schema",
|
|
1571
|
+
namespace=namespace,
|
|
1572
|
+
open_table_format=OpenTableFormat.ICEBERG,
|
|
1573
|
+
iceberg_metadata=IcebergMetadataProperty(
|
|
1574
|
+
iceberg_schema=IcebergSchemaProperty(
|
|
1575
|
+
schema_field_list=[SchemaFieldProperty(
|
|
1576
|
+
name="id",
|
|
1577
|
+
type="int",
|
|
1578
|
+
required=True
|
|
1579
|
+
), SchemaFieldProperty(
|
|
1580
|
+
name="name",
|
|
1581
|
+
type="string"
|
|
1582
|
+
)
|
|
1583
|
+
]
|
|
1584
|
+
)
|
|
1585
|
+
),
|
|
1586
|
+
compaction=CompactionProperty(
|
|
1587
|
+
status=Status.ENABLED,
|
|
1588
|
+
target_file_size_mb=128
|
|
1589
|
+
),
|
|
1590
|
+
snapshot_management=SnapshotManagementProperty(
|
|
1591
|
+
status=Status.ENABLED,
|
|
1592
|
+
max_snapshot_age_hours=48,
|
|
1593
|
+
min_snapshots_to_keep=5
|
|
1594
|
+
)
|
|
1595
|
+
)
|
|
1596
|
+
'''
|
|
1597
|
+
if __debug__:
|
|
1598
|
+
type_hints = typing.get_type_hints(_typecheckingstub__74aebe9bead3fb2bce88d441c25d815202759baedd02c817c6e08d2e1dfad2b2)
|
|
1599
|
+
check_type(argname="argument max_snapshot_age_hours", value=max_snapshot_age_hours, expected_type=type_hints["max_snapshot_age_hours"])
|
|
1600
|
+
check_type(argname="argument min_snapshots_to_keep", value=min_snapshots_to_keep, expected_type=type_hints["min_snapshots_to_keep"])
|
|
1601
|
+
check_type(argname="argument status", value=status, expected_type=type_hints["status"])
|
|
1602
|
+
self._values: typing.Dict[builtins.str, typing.Any] = {}
|
|
1603
|
+
if max_snapshot_age_hours is not None:
|
|
1604
|
+
self._values["max_snapshot_age_hours"] = max_snapshot_age_hours
|
|
1605
|
+
if min_snapshots_to_keep is not None:
|
|
1606
|
+
self._values["min_snapshots_to_keep"] = min_snapshots_to_keep
|
|
1607
|
+
if status is not None:
|
|
1608
|
+
self._values["status"] = status
|
|
1609
|
+
|
|
1610
|
+
@builtins.property
|
|
1611
|
+
def max_snapshot_age_hours(self) -> typing.Optional[jsii.Number]:
|
|
1612
|
+
'''(experimental) The maximum age of a snapshot before it can be expired.
|
|
1613
|
+
|
|
1614
|
+
:default: - No maximum age
|
|
1615
|
+
|
|
1616
|
+
:stability: experimental
|
|
1617
|
+
'''
|
|
1618
|
+
result = self._values.get("max_snapshot_age_hours")
|
|
1619
|
+
return typing.cast(typing.Optional[jsii.Number], result)
|
|
1620
|
+
|
|
1621
|
+
@builtins.property
|
|
1622
|
+
def min_snapshots_to_keep(self) -> typing.Optional[jsii.Number]:
|
|
1623
|
+
'''(experimental) The minimum number of snapshots to keep.
|
|
1624
|
+
|
|
1625
|
+
:default: - No minimum number
|
|
1626
|
+
|
|
1627
|
+
:stability: experimental
|
|
1628
|
+
'''
|
|
1629
|
+
result = self._values.get("min_snapshots_to_keep")
|
|
1630
|
+
return typing.cast(typing.Optional[jsii.Number], result)
|
|
1631
|
+
|
|
1632
|
+
@builtins.property
|
|
1633
|
+
def status(self) -> typing.Optional["Status"]:
|
|
1634
|
+
'''(experimental) Indicates whether the SnapshotManagement maintenance action is enabled.
|
|
1635
|
+
|
|
1636
|
+
:default: - Not specified
|
|
1637
|
+
|
|
1638
|
+
:stability: experimental
|
|
1639
|
+
'''
|
|
1640
|
+
result = self._values.get("status")
|
|
1641
|
+
return typing.cast(typing.Optional["Status"], result)
|
|
1642
|
+
|
|
1643
|
+
def __eq__(self, rhs: typing.Any) -> builtins.bool:
|
|
1644
|
+
return isinstance(rhs, self.__class__) and rhs._values == self._values
|
|
1645
|
+
|
|
1646
|
+
def __ne__(self, rhs: typing.Any) -> builtins.bool:
|
|
1647
|
+
return not (rhs == self)
|
|
1648
|
+
|
|
1649
|
+
def __repr__(self) -> str:
|
|
1650
|
+
return "SnapshotManagementProperty(%s)" % ", ".join(
|
|
1651
|
+
k + "=" + repr(v) for k, v in self._values.items()
|
|
1652
|
+
)
|
|
1653
|
+
|
|
1654
|
+
|
|
1655
|
+
@jsii.enum(jsii_type="@aws-cdk/aws-s3tables-alpha.Status")
|
|
1656
|
+
class Status(enum.Enum):
|
|
1657
|
+
'''(experimental) Status values for maintenance actions.
|
|
1658
|
+
|
|
1659
|
+
:stability: experimental
|
|
1660
|
+
:exampleMetadata: infused
|
|
1661
|
+
|
|
1662
|
+
Example::
|
|
1663
|
+
|
|
1664
|
+
# Build a table
|
|
1665
|
+
sample_table = Table(scope, "ExampleTable",
|
|
1666
|
+
table_name="example_table",
|
|
1667
|
+
namespace=namespace,
|
|
1668
|
+
open_table_format=OpenTableFormat.ICEBERG,
|
|
1669
|
+
without_metadata=True
|
|
1670
|
+
)
|
|
1671
|
+
|
|
1672
|
+
# Build a table with an Iceberg Schema
|
|
1673
|
+
sample_table_with_schema = Table(scope, "ExampleSchemaTable",
|
|
1674
|
+
table_name="example_table_with_schema",
|
|
1675
|
+
namespace=namespace,
|
|
1676
|
+
open_table_format=OpenTableFormat.ICEBERG,
|
|
1677
|
+
iceberg_metadata=IcebergMetadataProperty(
|
|
1678
|
+
iceberg_schema=IcebergSchemaProperty(
|
|
1679
|
+
schema_field_list=[SchemaFieldProperty(
|
|
1680
|
+
name="id",
|
|
1681
|
+
type="int",
|
|
1682
|
+
required=True
|
|
1683
|
+
), SchemaFieldProperty(
|
|
1684
|
+
name="name",
|
|
1685
|
+
type="string"
|
|
1686
|
+
)
|
|
1687
|
+
]
|
|
1688
|
+
)
|
|
1689
|
+
),
|
|
1690
|
+
compaction=CompactionProperty(
|
|
1691
|
+
status=Status.ENABLED,
|
|
1692
|
+
target_file_size_mb=128
|
|
1693
|
+
),
|
|
1694
|
+
snapshot_management=SnapshotManagementProperty(
|
|
1695
|
+
status=Status.ENABLED,
|
|
1696
|
+
max_snapshot_age_hours=48,
|
|
1697
|
+
min_snapshots_to_keep=5
|
|
1698
|
+
)
|
|
1699
|
+
)
|
|
1700
|
+
'''
|
|
1701
|
+
|
|
1702
|
+
ENABLED = "ENABLED"
|
|
1703
|
+
'''(experimental) Enable the maintenance action.
|
|
1704
|
+
|
|
1705
|
+
:stability: experimental
|
|
1706
|
+
'''
|
|
1707
|
+
DISABLED = "DISABLED"
|
|
1708
|
+
'''(experimental) Disable the maintenance action.
|
|
1709
|
+
|
|
1710
|
+
:stability: experimental
|
|
1711
|
+
'''
|
|
1712
|
+
|
|
1713
|
+
|
|
1714
|
+
@jsii.implements(ITable)
|
|
1715
|
+
class Table(
|
|
1716
|
+
_aws_cdk_ceddda9d.Resource,
|
|
1717
|
+
metaclass=jsii.JSIIMeta,
|
|
1718
|
+
jsii_type="@aws-cdk/aws-s3tables-alpha.Table",
|
|
1719
|
+
):
|
|
1720
|
+
'''(experimental) An S3 Table with helpers.
|
|
1721
|
+
|
|
1722
|
+
:stability: experimental
|
|
1723
|
+
:exampleMetadata: infused
|
|
1724
|
+
|
|
1725
|
+
Example::
|
|
1726
|
+
|
|
1727
|
+
# Build a table
|
|
1728
|
+
sample_table = Table(scope, "ExampleTable",
|
|
1729
|
+
table_name="example_table",
|
|
1730
|
+
namespace=namespace,
|
|
1731
|
+
open_table_format=OpenTableFormat.ICEBERG,
|
|
1732
|
+
without_metadata=True
|
|
1733
|
+
)
|
|
1734
|
+
|
|
1735
|
+
# Build a table with an Iceberg Schema
|
|
1736
|
+
sample_table_with_schema = Table(scope, "ExampleSchemaTable",
|
|
1737
|
+
table_name="example_table_with_schema",
|
|
1738
|
+
namespace=namespace,
|
|
1739
|
+
open_table_format=OpenTableFormat.ICEBERG,
|
|
1740
|
+
iceberg_metadata=IcebergMetadataProperty(
|
|
1741
|
+
iceberg_schema=IcebergSchemaProperty(
|
|
1742
|
+
schema_field_list=[SchemaFieldProperty(
|
|
1743
|
+
name="id",
|
|
1744
|
+
type="int",
|
|
1745
|
+
required=True
|
|
1746
|
+
), SchemaFieldProperty(
|
|
1747
|
+
name="name",
|
|
1748
|
+
type="string"
|
|
1749
|
+
)
|
|
1750
|
+
]
|
|
1751
|
+
)
|
|
1752
|
+
),
|
|
1753
|
+
compaction=CompactionProperty(
|
|
1754
|
+
status=Status.ENABLED,
|
|
1755
|
+
target_file_size_mb=128
|
|
1756
|
+
),
|
|
1757
|
+
snapshot_management=SnapshotManagementProperty(
|
|
1758
|
+
status=Status.ENABLED,
|
|
1759
|
+
max_snapshot_age_hours=48,
|
|
1760
|
+
min_snapshots_to_keep=5
|
|
1761
|
+
)
|
|
1762
|
+
)
|
|
1763
|
+
'''
|
|
1764
|
+
|
|
1765
|
+
def __init__(
|
|
1766
|
+
self,
|
|
1767
|
+
scope: _constructs_77d1e7e8.Construct,
|
|
1768
|
+
id: builtins.str,
|
|
1769
|
+
*,
|
|
1770
|
+
namespace: INamespace,
|
|
1771
|
+
open_table_format: OpenTableFormat,
|
|
1772
|
+
table_name: builtins.str,
|
|
1773
|
+
compaction: typing.Optional[typing.Union[CompactionProperty, typing.Dict[builtins.str, typing.Any]]] = None,
|
|
1774
|
+
iceberg_metadata: typing.Optional[typing.Union[IcebergMetadataProperty, typing.Dict[builtins.str, typing.Any]]] = None,
|
|
1775
|
+
removal_policy: typing.Optional[_aws_cdk_ceddda9d.RemovalPolicy] = None,
|
|
1776
|
+
snapshot_management: typing.Optional[typing.Union[SnapshotManagementProperty, typing.Dict[builtins.str, typing.Any]]] = None,
|
|
1777
|
+
without_metadata: typing.Optional[builtins.bool] = None,
|
|
1778
|
+
) -> None:
|
|
1779
|
+
'''
|
|
1780
|
+
:param scope: -
|
|
1781
|
+
:param id: -
|
|
1782
|
+
:param namespace: (experimental) The namespace under which this table is created.
|
|
1783
|
+
:param open_table_format: (experimental) Format of this table. Currently, the only supported value is OpenTableFormat.ICEBERG.
|
|
1784
|
+
:param table_name: (experimental) Name of this table, unique within the namespace.
|
|
1785
|
+
:param compaction: (experimental) Settings governing the Compaction maintenance action. Default: Amazon S3 selects the best compaction strategy based on your table sort order.
|
|
1786
|
+
:param iceberg_metadata: (experimental) Contains details about the metadata for an Iceberg table. Default: table is created without any metadata
|
|
1787
|
+
:param removal_policy: (experimental) Controls what happens to this table it it stoped being managed by cloudformation. Default: RETAIN
|
|
1788
|
+
:param snapshot_management: (experimental) Contains details about the snapshot management settings for an Iceberg table. Default: enabled: MinimumSnapshots is 1 by default and MaximumSnapshotAge is 120 hours by default.
|
|
1789
|
+
:param without_metadata: (experimental) If true, indicates that you don't want to specify a schema for the table. This property is mutually exclusive to 'IcebergMetadata'. Default: false
|
|
1790
|
+
|
|
1791
|
+
:stability: experimental
|
|
1792
|
+
'''
|
|
1793
|
+
if __debug__:
|
|
1794
|
+
type_hints = typing.get_type_hints(_typecheckingstub__9e5378cdcc21935af950b3c144ea6d1e345b4c98cccbf5fe2a92dff410ed06cf)
|
|
1795
|
+
check_type(argname="argument scope", value=scope, expected_type=type_hints["scope"])
|
|
1796
|
+
check_type(argname="argument id", value=id, expected_type=type_hints["id"])
|
|
1797
|
+
props = TableProps(
|
|
1798
|
+
namespace=namespace,
|
|
1799
|
+
open_table_format=open_table_format,
|
|
1800
|
+
table_name=table_name,
|
|
1801
|
+
compaction=compaction,
|
|
1802
|
+
iceberg_metadata=iceberg_metadata,
|
|
1803
|
+
removal_policy=removal_policy,
|
|
1804
|
+
snapshot_management=snapshot_management,
|
|
1805
|
+
without_metadata=without_metadata,
|
|
1806
|
+
)
|
|
1807
|
+
|
|
1808
|
+
jsii.create(self.__class__, self, [scope, id, props])
|
|
1809
|
+
|
|
1810
|
+
@jsii.member(jsii_name="fromTableAttributes")
|
|
1811
|
+
@builtins.classmethod
|
|
1812
|
+
def from_table_attributes(
|
|
1813
|
+
cls,
|
|
1814
|
+
scope: _constructs_77d1e7e8.Construct,
|
|
1815
|
+
id: builtins.str,
|
|
1816
|
+
*,
|
|
1817
|
+
table_arn: builtins.str,
|
|
1818
|
+
table_name: builtins.str,
|
|
1819
|
+
) -> ITable:
|
|
1820
|
+
'''(experimental) Defines a Table construct that represents an external table.
|
|
1821
|
+
|
|
1822
|
+
:param scope: The parent creating construct (usually ``this``).
|
|
1823
|
+
:param id: The construct's name.
|
|
1824
|
+
:param table_arn: (experimental) The table's ARN.
|
|
1825
|
+
:param table_name: (experimental) Name of this table.
|
|
1826
|
+
|
|
1827
|
+
:stability: experimental
|
|
1828
|
+
'''
|
|
1829
|
+
if __debug__:
|
|
1830
|
+
type_hints = typing.get_type_hints(_typecheckingstub__c92fbe73fcedcf34bbbc9a2359a274432437ec47317161e4c88ea9d209155ffd)
|
|
1831
|
+
check_type(argname="argument scope", value=scope, expected_type=type_hints["scope"])
|
|
1832
|
+
check_type(argname="argument id", value=id, expected_type=type_hints["id"])
|
|
1833
|
+
attrs = TableAttributes(table_arn=table_arn, table_name=table_name)
|
|
1834
|
+
|
|
1835
|
+
return typing.cast(ITable, jsii.sinvoke(cls, "fromTableAttributes", [scope, id, attrs]))
|
|
1836
|
+
|
|
1837
|
+
@jsii.member(jsii_name="validateTableName")
|
|
1838
|
+
@builtins.classmethod
|
|
1839
|
+
def validate_table_name(cls, table_name: builtins.str) -> None:
|
|
1840
|
+
'''(experimental) See https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-tables-buckets-naming.html.
|
|
1841
|
+
|
|
1842
|
+
:param table_name: Name of the table.
|
|
1843
|
+
|
|
1844
|
+
:stability: experimental
|
|
1845
|
+
:throws: UnscopedValidationError if any naming errors are detected
|
|
1846
|
+
'''
|
|
1847
|
+
if __debug__:
|
|
1848
|
+
type_hints = typing.get_type_hints(_typecheckingstub__536e137c7e7454507b9ec796514d014c3913e8c528dfeba351b5e0e36ba8e228)
|
|
1849
|
+
check_type(argname="argument table_name", value=table_name, expected_type=type_hints["table_name"])
|
|
1850
|
+
return typing.cast(None, jsii.sinvoke(cls, "validateTableName", [table_name]))
|
|
1851
|
+
|
|
1852
|
+
@jsii.member(jsii_name="addToResourcePolicy")
|
|
1853
|
+
def add_to_resource_policy(
|
|
1854
|
+
self,
|
|
1855
|
+
statement: _aws_cdk_aws_iam_ceddda9d.PolicyStatement,
|
|
1856
|
+
) -> _aws_cdk_aws_iam_ceddda9d.AddToResourcePolicyResult:
|
|
1857
|
+
'''(experimental) Adds a statement to the resource policy for a principal (i.e. account/role/service) to perform actions on this table.
|
|
1858
|
+
|
|
1859
|
+
Note that the policy statement may or may not be added to the policy.
|
|
1860
|
+
For example, when an ``ITable`` is created from an existing table,
|
|
1861
|
+
it's not possible to tell whether the table already has a policy
|
|
1862
|
+
attached, let alone to re-use that policy to add more statements to it.
|
|
1863
|
+
So it's safest to do nothing in these cases.
|
|
1864
|
+
|
|
1865
|
+
:param statement: -
|
|
1866
|
+
|
|
1867
|
+
:stability: experimental
|
|
1868
|
+
'''
|
|
1869
|
+
if __debug__:
|
|
1870
|
+
type_hints = typing.get_type_hints(_typecheckingstub__bf2cc6b0089371bf3b3d86048c16f309f2afb3d7329dc28525f622d9e8006e27)
|
|
1871
|
+
check_type(argname="argument statement", value=statement, expected_type=type_hints["statement"])
|
|
1872
|
+
return typing.cast(_aws_cdk_aws_iam_ceddda9d.AddToResourcePolicyResult, jsii.invoke(self, "addToResourcePolicy", [statement]))
|
|
1873
|
+
|
|
1874
|
+
@jsii.member(jsii_name="grantRead")
|
|
1875
|
+
def grant_read(
|
|
1876
|
+
self,
|
|
1877
|
+
identity: _aws_cdk_aws_iam_ceddda9d.IGrantable,
|
|
1878
|
+
) -> _aws_cdk_aws_iam_ceddda9d.Grant:
|
|
1879
|
+
'''(experimental) Grant read permissions for this table to an IAM principal (Role/Group/User).
|
|
1880
|
+
|
|
1881
|
+
If the parent TableBucket of this table has encryption,
|
|
1882
|
+
you should grant kms:Decrypt permission to use this key to the same principal.
|
|
1883
|
+
|
|
1884
|
+
:param identity: -
|
|
1885
|
+
|
|
1886
|
+
:stability: experimental
|
|
1887
|
+
'''
|
|
1888
|
+
if __debug__:
|
|
1889
|
+
type_hints = typing.get_type_hints(_typecheckingstub__f0556fb0bd61a76d9f9bdbab13c49228511a3523caa64f6dbed93963966ed96c)
|
|
1890
|
+
check_type(argname="argument identity", value=identity, expected_type=type_hints["identity"])
|
|
1891
|
+
return typing.cast(_aws_cdk_aws_iam_ceddda9d.Grant, jsii.invoke(self, "grantRead", [identity]))
|
|
1892
|
+
|
|
1893
|
+
@jsii.member(jsii_name="grantReadWrite")
|
|
1894
|
+
def grant_read_write(
|
|
1895
|
+
self,
|
|
1896
|
+
identity: _aws_cdk_aws_iam_ceddda9d.IGrantable,
|
|
1897
|
+
) -> _aws_cdk_aws_iam_ceddda9d.Grant:
|
|
1898
|
+
'''(experimental) Grant read and write permissions for this table to an IAM principal (Role/Group/User).
|
|
1899
|
+
|
|
1900
|
+
If the parent TableBucket of this table has encryption,
|
|
1901
|
+
you should grant kms:GenerateDataKey and kms:Decrypt permission
|
|
1902
|
+
to use this key to the same principal.
|
|
1903
|
+
|
|
1904
|
+
:param identity: -
|
|
1905
|
+
|
|
1906
|
+
:stability: experimental
|
|
1907
|
+
'''
|
|
1908
|
+
if __debug__:
|
|
1909
|
+
type_hints = typing.get_type_hints(_typecheckingstub__f751d804f7db1fb6bfea578e65d8642e7c39a6078f8effb3cc12bd1d6e5cdd45)
|
|
1910
|
+
check_type(argname="argument identity", value=identity, expected_type=type_hints["identity"])
|
|
1911
|
+
return typing.cast(_aws_cdk_aws_iam_ceddda9d.Grant, jsii.invoke(self, "grantReadWrite", [identity]))
|
|
1912
|
+
|
|
1913
|
+
@jsii.member(jsii_name="grantWrite")
|
|
1914
|
+
def grant_write(
|
|
1915
|
+
self,
|
|
1916
|
+
identity: _aws_cdk_aws_iam_ceddda9d.IGrantable,
|
|
1917
|
+
) -> _aws_cdk_aws_iam_ceddda9d.Grant:
|
|
1918
|
+
'''(experimental) Grant write permissions for this table to an IAM principal (Role/Group/User).
|
|
1919
|
+
|
|
1920
|
+
If the parent TableBucket of this table has encryption,
|
|
1921
|
+
you should grant kms:GenerateDataKey and kms:Decrypt permission
|
|
1922
|
+
to use this key to the same principal.
|
|
1923
|
+
|
|
1924
|
+
:param identity: -
|
|
1925
|
+
|
|
1926
|
+
:stability: experimental
|
|
1927
|
+
'''
|
|
1928
|
+
if __debug__:
|
|
1929
|
+
type_hints = typing.get_type_hints(_typecheckingstub__782a3a885790eb02b5e9bbd37dd4b038ae3f5d0bdcf890b812c9284899e029ce)
|
|
1930
|
+
check_type(argname="argument identity", value=identity, expected_type=type_hints["identity"])
|
|
1931
|
+
return typing.cast(_aws_cdk_aws_iam_ceddda9d.Grant, jsii.invoke(self, "grantWrite", [identity]))
|
|
1932
|
+
|
|
1933
|
+
@jsii.python.classproperty
|
|
1934
|
+
@jsii.member(jsii_name="PROPERTY_INJECTION_ID")
|
|
1935
|
+
def PROPERTY_INJECTION_ID(cls) -> builtins.str:
|
|
1936
|
+
'''(experimental) Uniquely identifies this class.
|
|
1937
|
+
|
|
1938
|
+
:stability: experimental
|
|
1939
|
+
'''
|
|
1940
|
+
return typing.cast(builtins.str, jsii.sget(cls, "PROPERTY_INJECTION_ID"))
|
|
1941
|
+
|
|
1942
|
+
@builtins.property
|
|
1943
|
+
@jsii.member(jsii_name="namespace")
|
|
1944
|
+
def namespace(self) -> INamespace:
|
|
1945
|
+
'''(experimental) The namespace containing this table.
|
|
1946
|
+
|
|
1947
|
+
:stability: experimental
|
|
1948
|
+
'''
|
|
1949
|
+
return typing.cast(INamespace, jsii.get(self, "namespace"))
|
|
1950
|
+
|
|
1951
|
+
@builtins.property
|
|
1952
|
+
@jsii.member(jsii_name="tableArn")
|
|
1953
|
+
def table_arn(self) -> builtins.str:
|
|
1954
|
+
'''(experimental) The unique Amazon Resource Name (arn) of this table.
|
|
1955
|
+
|
|
1956
|
+
:stability: experimental
|
|
1957
|
+
'''
|
|
1958
|
+
return typing.cast(builtins.str, jsii.get(self, "tableArn"))
|
|
1959
|
+
|
|
1960
|
+
@builtins.property
|
|
1961
|
+
@jsii.member(jsii_name="tableName")
|
|
1962
|
+
def table_name(self) -> builtins.str:
|
|
1963
|
+
'''(experimental) The name of this table.
|
|
1964
|
+
|
|
1965
|
+
:stability: experimental
|
|
1966
|
+
'''
|
|
1967
|
+
return typing.cast(builtins.str, jsii.get(self, "tableName"))
|
|
1968
|
+
|
|
1969
|
+
@builtins.property
|
|
1970
|
+
@jsii.member(jsii_name="tablePolicy")
|
|
1971
|
+
def table_policy(
|
|
1972
|
+
self,
|
|
1973
|
+
) -> typing.Optional[_aws_cdk_aws_s3tables_ceddda9d.CfnTablePolicy]:
|
|
1974
|
+
'''(experimental) The resource policy for this table.
|
|
1975
|
+
|
|
1976
|
+
:stability: experimental
|
|
1977
|
+
'''
|
|
1978
|
+
return typing.cast(typing.Optional[_aws_cdk_aws_s3tables_ceddda9d.CfnTablePolicy], jsii.get(self, "tablePolicy"))
|
|
1979
|
+
|
|
1980
|
+
@builtins.property
|
|
1981
|
+
@jsii.member(jsii_name="autoCreatePolicy")
|
|
1982
|
+
def _auto_create_policy(self) -> builtins.bool:
|
|
1983
|
+
'''(experimental) Indicates if a table resource policy should automatically created upon the first call to ``addToResourcePolicy``.
|
|
1984
|
+
|
|
1985
|
+
:stability: experimental
|
|
1986
|
+
'''
|
|
1987
|
+
return typing.cast(builtins.bool, jsii.get(self, "autoCreatePolicy"))
|
|
1988
|
+
|
|
1989
|
+
@_auto_create_policy.setter
|
|
1990
|
+
def _auto_create_policy(self, value: builtins.bool) -> None:
|
|
1991
|
+
if __debug__:
|
|
1992
|
+
type_hints = typing.get_type_hints(_typecheckingstub__cc8c67ff83da04c70c080f40fd29333e2e8cae2c2f37dd6606ad76db5c4cc5d7)
|
|
1993
|
+
check_type(argname="argument value", value=value, expected_type=type_hints["value"])
|
|
1994
|
+
jsii.set(self, "autoCreatePolicy", value) # pyright: ignore[reportArgumentType]
|
|
1995
|
+
|
|
1996
|
+
|
|
1997
|
+
@jsii.data_type(
|
|
1998
|
+
jsii_type="@aws-cdk/aws-s3tables-alpha.TableAttributes",
|
|
1999
|
+
jsii_struct_bases=[],
|
|
2000
|
+
name_mapping={"table_arn": "tableArn", "table_name": "tableName"},
|
|
2001
|
+
)
|
|
2002
|
+
class TableAttributes:
|
|
2003
|
+
def __init__(self, *, table_arn: builtins.str, table_name: builtins.str) -> None:
|
|
2004
|
+
'''(experimental) A reference to a table outside this stack.
|
|
2005
|
+
|
|
2006
|
+
The tableName, region, and account can be provided explicitly
|
|
2007
|
+
or will be inferred from the tableArn
|
|
2008
|
+
|
|
2009
|
+
:param table_arn: (experimental) The table's ARN.
|
|
2010
|
+
:param table_name: (experimental) Name of this table.
|
|
2011
|
+
|
|
2012
|
+
:stability: experimental
|
|
2013
|
+
:exampleMetadata: fixture=_generated
|
|
2014
|
+
|
|
2015
|
+
Example::
|
|
2016
|
+
|
|
2017
|
+
# The code below shows an example of how to instantiate this type.
|
|
2018
|
+
# The values are placeholders you should change.
|
|
2019
|
+
import aws_cdk.aws_s3tables_alpha as s3tables_alpha
|
|
2020
|
+
|
|
2021
|
+
table_attributes = s3tables_alpha.TableAttributes(
|
|
2022
|
+
table_arn="tableArn",
|
|
2023
|
+
table_name="tableName"
|
|
2024
|
+
)
|
|
2025
|
+
'''
|
|
2026
|
+
if __debug__:
|
|
2027
|
+
type_hints = typing.get_type_hints(_typecheckingstub__20a648b98b2aa2a4eec0f744feac0d8ec3ee06e18fb2a623e889d224bf8fec03)
|
|
2028
|
+
check_type(argname="argument table_arn", value=table_arn, expected_type=type_hints["table_arn"])
|
|
2029
|
+
check_type(argname="argument table_name", value=table_name, expected_type=type_hints["table_name"])
|
|
2030
|
+
self._values: typing.Dict[builtins.str, typing.Any] = {
|
|
2031
|
+
"table_arn": table_arn,
|
|
2032
|
+
"table_name": table_name,
|
|
2033
|
+
}
|
|
2034
|
+
|
|
2035
|
+
@builtins.property
|
|
2036
|
+
def table_arn(self) -> builtins.str:
|
|
2037
|
+
'''(experimental) The table's ARN.
|
|
2038
|
+
|
|
2039
|
+
:stability: experimental
|
|
2040
|
+
'''
|
|
2041
|
+
result = self._values.get("table_arn")
|
|
2042
|
+
assert result is not None, "Required property 'table_arn' is missing"
|
|
2043
|
+
return typing.cast(builtins.str, result)
|
|
2044
|
+
|
|
2045
|
+
@builtins.property
|
|
2046
|
+
def table_name(self) -> builtins.str:
|
|
2047
|
+
'''(experimental) Name of this table.
|
|
2048
|
+
|
|
2049
|
+
:stability: experimental
|
|
2050
|
+
'''
|
|
2051
|
+
result = self._values.get("table_name")
|
|
2052
|
+
assert result is not None, "Required property 'table_name' is missing"
|
|
2053
|
+
return typing.cast(builtins.str, result)
|
|
2054
|
+
|
|
2055
|
+
def __eq__(self, rhs: typing.Any) -> builtins.bool:
|
|
2056
|
+
return isinstance(rhs, self.__class__) and rhs._values == self._values
|
|
2057
|
+
|
|
2058
|
+
def __ne__(self, rhs: typing.Any) -> builtins.bool:
|
|
2059
|
+
return not (rhs == self)
|
|
2060
|
+
|
|
2061
|
+
def __repr__(self) -> str:
|
|
2062
|
+
return "TableAttributes(%s)" % ", ".join(
|
|
2063
|
+
k + "=" + repr(v) for k, v in self._values.items()
|
|
2064
|
+
)
|
|
2065
|
+
|
|
2066
|
+
|
|
2067
|
+
@jsii.implements(ITableBucket)
|
|
2068
|
+
class TableBucket(
|
|
2069
|
+
_aws_cdk_ceddda9d.Resource,
|
|
2070
|
+
metaclass=jsii.JSIIMeta,
|
|
2071
|
+
jsii_type="@aws-cdk/aws-s3tables-alpha.TableBucket",
|
|
2072
|
+
):
|
|
2073
|
+
'''(experimental) An S3 table bucket with helpers for associated resource policies.
|
|
2074
|
+
|
|
2075
|
+
This bucket may not yet have all features that exposed by the underlying CfnTableBucket.
|
|
2076
|
+
|
|
2077
|
+
:stability: experimental
|
|
2078
|
+
:stateful: true
|
|
2079
|
+
|
|
2080
|
+
Example::
|
|
2081
|
+
|
|
2082
|
+
sample_table_bucket = TableBucket(scope, "ExampleTableBucket",
|
|
2083
|
+
table_bucket_name="example-bucket",
|
|
2084
|
+
# Optional fields:
|
|
2085
|
+
unreferenced_file_removal=UnreferencedFileRemoval(
|
|
2086
|
+
noncurrent_days=123,
|
|
2087
|
+
status=UnreferencedFileRemovalStatus.ENABLED,
|
|
2088
|
+
unreferenced_days=123
|
|
2089
|
+
)
|
|
2090
|
+
)
|
|
2091
|
+
'''
|
|
2092
|
+
|
|
2093
|
+
def __init__(
|
|
2094
|
+
self,
|
|
2095
|
+
scope: _constructs_77d1e7e8.Construct,
|
|
2096
|
+
id: builtins.str,
|
|
2097
|
+
*,
|
|
2098
|
+
table_bucket_name: builtins.str,
|
|
2099
|
+
account: typing.Optional[builtins.str] = None,
|
|
2100
|
+
encryption: typing.Optional["TableBucketEncryption"] = None,
|
|
2101
|
+
encryption_key: typing.Optional[_aws_cdk_aws_kms_ceddda9d.IKey] = None,
|
|
2102
|
+
region: typing.Optional[builtins.str] = None,
|
|
2103
|
+
removal_policy: typing.Optional[_aws_cdk_ceddda9d.RemovalPolicy] = None,
|
|
2104
|
+
unreferenced_file_removal: typing.Optional[typing.Union["UnreferencedFileRemoval", typing.Dict[builtins.str, typing.Any]]] = None,
|
|
2105
|
+
) -> None:
|
|
2106
|
+
'''
|
|
2107
|
+
:param scope: -
|
|
2108
|
+
:param id: -
|
|
2109
|
+
:param table_bucket_name: (experimental) Name of the S3 TableBucket.
|
|
2110
|
+
:param account: (experimental) AWS Account ID of the table bucket owner. Default: - it's assumed the bucket belongs to the same account as the scope it's being imported into
|
|
2111
|
+
:param encryption: (experimental) The kind of server-side encryption to apply to this bucket. If you choose KMS, you can specify a KMS key via ``encryptionKey``. If encryption key is not specified, a key will automatically be created. Default: - ``KMS`` if ``encryptionKey`` is specified, or ``S3_MANAGED`` otherwise.
|
|
2112
|
+
:param encryption_key: (experimental) External KMS key to use for bucket encryption. The ``encryption`` property must be either not specified or set to ``KMS``. An error will be emitted if ``encryption`` is set to ``S3_MANAGED``. Default: - If ``encryption`` is set to ``KMS`` and this property is undefined, a new KMS key will be created and associated with this bucket.
|
|
2113
|
+
:param region: (experimental) AWS region that the table bucket exists in. Default: - it's assumed the bucket is in the same region as the scope it's being imported into
|
|
2114
|
+
:param removal_policy: (experimental) Controls what happens to this table bucket it it stoped being managed by cloudformation. Default: RETAIN
|
|
2115
|
+
:param unreferenced_file_removal: (experimental) Unreferenced file removal settings for the S3 TableBucket. Default: Enabled with default values
|
|
2116
|
+
|
|
2117
|
+
:stability: experimental
|
|
2118
|
+
'''
|
|
2119
|
+
if __debug__:
|
|
2120
|
+
type_hints = typing.get_type_hints(_typecheckingstub__c8d9c0bf5c954c2a6797301b7dc6cb8abd812336f3507addc92f72b805ec0a1e)
|
|
2121
|
+
check_type(argname="argument scope", value=scope, expected_type=type_hints["scope"])
|
|
2122
|
+
check_type(argname="argument id", value=id, expected_type=type_hints["id"])
|
|
2123
|
+
props = TableBucketProps(
|
|
2124
|
+
table_bucket_name=table_bucket_name,
|
|
2125
|
+
account=account,
|
|
2126
|
+
encryption=encryption,
|
|
2127
|
+
encryption_key=encryption_key,
|
|
2128
|
+
region=region,
|
|
2129
|
+
removal_policy=removal_policy,
|
|
2130
|
+
unreferenced_file_removal=unreferenced_file_removal,
|
|
2131
|
+
)
|
|
2132
|
+
|
|
2133
|
+
jsii.create(self.__class__, self, [scope, id, props])
|
|
2134
|
+
|
|
2135
|
+
@jsii.member(jsii_name="fromTableBucketArn")
|
|
2136
|
+
@builtins.classmethod
|
|
2137
|
+
def from_table_bucket_arn(
|
|
2138
|
+
cls,
|
|
2139
|
+
scope: _constructs_77d1e7e8.Construct,
|
|
2140
|
+
id: builtins.str,
|
|
2141
|
+
table_bucket_arn: builtins.str,
|
|
2142
|
+
) -> ITableBucket:
|
|
2143
|
+
'''(experimental) Defines a TableBucket construct from an external table bucket ARN.
|
|
2144
|
+
|
|
2145
|
+
:param scope: The parent creating construct (usually ``this``).
|
|
2146
|
+
:param id: The construct's name.
|
|
2147
|
+
:param table_bucket_arn: Amazon Resource Name (arn) of the table bucket.
|
|
2148
|
+
|
|
2149
|
+
:stability: experimental
|
|
2150
|
+
'''
|
|
2151
|
+
if __debug__:
|
|
2152
|
+
type_hints = typing.get_type_hints(_typecheckingstub__03d844a802df53acfc8906e32d1d2bbab0d86fedd5fc2ef65296a8c7a0c368d5)
|
|
2153
|
+
check_type(argname="argument scope", value=scope, expected_type=type_hints["scope"])
|
|
2154
|
+
check_type(argname="argument id", value=id, expected_type=type_hints["id"])
|
|
2155
|
+
check_type(argname="argument table_bucket_arn", value=table_bucket_arn, expected_type=type_hints["table_bucket_arn"])
|
|
2156
|
+
return typing.cast(ITableBucket, jsii.sinvoke(cls, "fromTableBucketArn", [scope, id, table_bucket_arn]))
|
|
2157
|
+
|
|
2158
|
+
@jsii.member(jsii_name="fromTableBucketAttributes")
|
|
2159
|
+
@builtins.classmethod
|
|
2160
|
+
def from_table_bucket_attributes(
|
|
2161
|
+
cls,
|
|
2162
|
+
scope: _constructs_77d1e7e8.Construct,
|
|
2163
|
+
id: builtins.str,
|
|
2164
|
+
*,
|
|
2165
|
+
account: typing.Optional[builtins.str] = None,
|
|
2166
|
+
encryption_key: typing.Optional[_aws_cdk_aws_kms_ceddda9d.IKey] = None,
|
|
2167
|
+
region: typing.Optional[builtins.str] = None,
|
|
2168
|
+
table_bucket_arn: typing.Optional[builtins.str] = None,
|
|
2169
|
+
table_bucket_name: typing.Optional[builtins.str] = None,
|
|
2170
|
+
) -> ITableBucket:
|
|
2171
|
+
'''(experimental) Defines a TableBucket construct that represents an external table bucket.
|
|
2172
|
+
|
|
2173
|
+
:param scope: The parent creating construct (usually ``this``).
|
|
2174
|
+
:param id: The construct's name.
|
|
2175
|
+
:param account: (experimental) The accountId containing this table bucket. Default: account inferred from scope
|
|
2176
|
+
:param encryption_key: (experimental) Optional KMS encryption key associated with this bucket. Default: - undefined
|
|
2177
|
+
:param region: (experimental) AWS region this table bucket exists in. Default: region inferred from scope
|
|
2178
|
+
:param table_bucket_arn: (experimental) The table bucket's ARN. Default: tableBucketArn constructed from region, account and tableBucketName are provided
|
|
2179
|
+
:param table_bucket_name: (experimental) The table bucket name, unique per region. Default: tableBucketName inferred from arn
|
|
2180
|
+
|
|
2181
|
+
:stability: experimental
|
|
2182
|
+
'''
|
|
2183
|
+
if __debug__:
|
|
2184
|
+
type_hints = typing.get_type_hints(_typecheckingstub__6fd93d11fc9c336a7e785b6aaa945ba1d55d75eb3748b03a2030b08e3d152961)
|
|
2185
|
+
check_type(argname="argument scope", value=scope, expected_type=type_hints["scope"])
|
|
2186
|
+
check_type(argname="argument id", value=id, expected_type=type_hints["id"])
|
|
2187
|
+
attrs = TableBucketAttributes(
|
|
2188
|
+
account=account,
|
|
2189
|
+
encryption_key=encryption_key,
|
|
2190
|
+
region=region,
|
|
2191
|
+
table_bucket_arn=table_bucket_arn,
|
|
2192
|
+
table_bucket_name=table_bucket_name,
|
|
2193
|
+
)
|
|
2194
|
+
|
|
2195
|
+
return typing.cast(ITableBucket, jsii.sinvoke(cls, "fromTableBucketAttributes", [scope, id, attrs]))
|
|
2196
|
+
|
|
2197
|
+
@jsii.member(jsii_name="validateTableBucketName")
|
|
2198
|
+
@builtins.classmethod
|
|
2199
|
+
def validate_table_bucket_name(
|
|
2200
|
+
cls,
|
|
2201
|
+
bucket_name: typing.Optional[builtins.str] = None,
|
|
2202
|
+
) -> None:
|
|
2203
|
+
'''(experimental) Throws an exception if the given table bucket name is not valid.
|
|
2204
|
+
|
|
2205
|
+
:param bucket_name: name of the bucket.
|
|
2206
|
+
|
|
2207
|
+
:stability: experimental
|
|
2208
|
+
'''
|
|
2209
|
+
if __debug__:
|
|
2210
|
+
type_hints = typing.get_type_hints(_typecheckingstub__054bf3ff46c98611841750ec27c0d492c7ee0aa6480b03f4a250c1d73bf049f7)
|
|
2211
|
+
check_type(argname="argument bucket_name", value=bucket_name, expected_type=type_hints["bucket_name"])
|
|
2212
|
+
return typing.cast(None, jsii.sinvoke(cls, "validateTableBucketName", [bucket_name]))
|
|
2213
|
+
|
|
2214
|
+
@jsii.member(jsii_name="validateUnreferencedFileRemoval")
|
|
2215
|
+
@builtins.classmethod
|
|
2216
|
+
def validate_unreferenced_file_removal(
|
|
2217
|
+
cls,
|
|
2218
|
+
*,
|
|
2219
|
+
noncurrent_days: typing.Optional[jsii.Number] = None,
|
|
2220
|
+
status: typing.Optional["UnreferencedFileRemovalStatus"] = None,
|
|
2221
|
+
unreferenced_days: typing.Optional[jsii.Number] = None,
|
|
2222
|
+
) -> None:
|
|
2223
|
+
'''(experimental) Throws an exception if the given unreferencedFileRemovalProperty is not valid.
|
|
2224
|
+
|
|
2225
|
+
:param noncurrent_days: (experimental) Duration after which noncurrent files should be removed. Should be at least one day. Default: - See S3 Tables User Guide
|
|
2226
|
+
:param status: (experimental) Status of unreferenced file removal. Can be Enabled or Disabled. Default: - See S3 Tables User Guide
|
|
2227
|
+
:param unreferenced_days: (experimental) Duration after which unreferenced files should be removed. Should be at least one day. Default: - See S3 Tables User Guide
|
|
2228
|
+
|
|
2229
|
+
:stability: experimental
|
|
2230
|
+
'''
|
|
2231
|
+
unreferenced_file_removal = UnreferencedFileRemoval(
|
|
2232
|
+
noncurrent_days=noncurrent_days,
|
|
2233
|
+
status=status,
|
|
2234
|
+
unreferenced_days=unreferenced_days,
|
|
2235
|
+
)
|
|
2236
|
+
|
|
2237
|
+
return typing.cast(None, jsii.sinvoke(cls, "validateUnreferencedFileRemoval", [unreferenced_file_removal]))
|
|
2238
|
+
|
|
2239
|
+
@jsii.member(jsii_name="addToResourcePolicy")
|
|
2240
|
+
def add_to_resource_policy(
|
|
2241
|
+
self,
|
|
2242
|
+
statement: _aws_cdk_aws_iam_ceddda9d.PolicyStatement,
|
|
2243
|
+
) -> _aws_cdk_aws_iam_ceddda9d.AddToResourcePolicyResult:
|
|
2244
|
+
'''(experimental) Adds a statement to the resource policy for a principal (i.e. account/role/service) to perform actions on this table bucket and/or its contents. Use ``tableBucketArn`` and ``arnForObjects(keys)`` to obtain ARNs for this bucket or objects.
|
|
2245
|
+
|
|
2246
|
+
Note that the policy statement may or may not be added to the policy.
|
|
2247
|
+
For example, when an ``ITableBucket`` is created from an existing table bucket,
|
|
2248
|
+
it's not possible to tell whether the bucket already has a policy
|
|
2249
|
+
attached, let alone to re-use that policy to add more statements to it.
|
|
2250
|
+
So it's safest to do nothing in these cases.
|
|
2251
|
+
|
|
2252
|
+
:param statement: the policy statement to be added to the bucket's policy.
|
|
2253
|
+
|
|
2254
|
+
:return:
|
|
2255
|
+
|
|
2256
|
+
metadata about the execution of this method. If the policy
|
|
2257
|
+
was not added, the value of ``statementAdded`` will be ``false``. You
|
|
2258
|
+
should always check this value to make sure that the operation was
|
|
2259
|
+
actually carried out. Otherwise, synthesis and deploy will terminate
|
|
2260
|
+
silently, which may be confusing.
|
|
2261
|
+
|
|
2262
|
+
:stability: experimental
|
|
2263
|
+
'''
|
|
2264
|
+
if __debug__:
|
|
2265
|
+
type_hints = typing.get_type_hints(_typecheckingstub__51cd52e5dbcb37ec9f9fd146daf9705f341ba8056f0f9d812355dc6e0ec273cd)
|
|
2266
|
+
check_type(argname="argument statement", value=statement, expected_type=type_hints["statement"])
|
|
2267
|
+
return typing.cast(_aws_cdk_aws_iam_ceddda9d.AddToResourcePolicyResult, jsii.invoke(self, "addToResourcePolicy", [statement]))
|
|
2268
|
+
|
|
2269
|
+
@jsii.member(jsii_name="grantRead")
|
|
2270
|
+
def grant_read(
|
|
2271
|
+
self,
|
|
2272
|
+
identity: _aws_cdk_aws_iam_ceddda9d.IGrantable,
|
|
2273
|
+
table_id: builtins.str,
|
|
2274
|
+
) -> _aws_cdk_aws_iam_ceddda9d.Grant:
|
|
2275
|
+
'''(experimental) Grant read permissions for this table bucket and its tables to an IAM principal (Role/Group/User).
|
|
2276
|
+
|
|
2277
|
+
If encryption is used, permission to use the key to decrypt the contents
|
|
2278
|
+
of the bucket will also be granted to the same principal.
|
|
2279
|
+
|
|
2280
|
+
:param identity: -
|
|
2281
|
+
:param table_id: -
|
|
2282
|
+
|
|
2283
|
+
:stability: experimental
|
|
2284
|
+
'''
|
|
2285
|
+
if __debug__:
|
|
2286
|
+
type_hints = typing.get_type_hints(_typecheckingstub__fecb8141f36793842f11c48ee39490301f24e6f1f0de09abbbf16bf1f96f0cb3)
|
|
2287
|
+
check_type(argname="argument identity", value=identity, expected_type=type_hints["identity"])
|
|
2288
|
+
check_type(argname="argument table_id", value=table_id, expected_type=type_hints["table_id"])
|
|
2289
|
+
return typing.cast(_aws_cdk_aws_iam_ceddda9d.Grant, jsii.invoke(self, "grantRead", [identity, table_id]))
|
|
2290
|
+
|
|
2291
|
+
@jsii.member(jsii_name="grantReadWrite")
|
|
2292
|
+
def grant_read_write(
|
|
2293
|
+
self,
|
|
2294
|
+
identity: _aws_cdk_aws_iam_ceddda9d.IGrantable,
|
|
2295
|
+
table_id: builtins.str,
|
|
2296
|
+
) -> _aws_cdk_aws_iam_ceddda9d.Grant:
|
|
2297
|
+
'''(experimental) Grant read and write permissions for this table bucket and its tables to an IAM principal (Role/Group/User).
|
|
2298
|
+
|
|
2299
|
+
If encryption is used, permission to use the key to encrypt/decrypt the contents
|
|
2300
|
+
of the bucket will also be granted to the same principal.
|
|
2301
|
+
|
|
2302
|
+
:param identity: -
|
|
2303
|
+
:param table_id: -
|
|
2304
|
+
|
|
2305
|
+
:stability: experimental
|
|
2306
|
+
'''
|
|
2307
|
+
if __debug__:
|
|
2308
|
+
type_hints = typing.get_type_hints(_typecheckingstub__cd8d4708cc079743c68f1ed7c239ba7a268460ad7ce4e417684326708cd34a54)
|
|
2309
|
+
check_type(argname="argument identity", value=identity, expected_type=type_hints["identity"])
|
|
2310
|
+
check_type(argname="argument table_id", value=table_id, expected_type=type_hints["table_id"])
|
|
2311
|
+
return typing.cast(_aws_cdk_aws_iam_ceddda9d.Grant, jsii.invoke(self, "grantReadWrite", [identity, table_id]))
|
|
2312
|
+
|
|
2313
|
+
@jsii.member(jsii_name="grantWrite")
|
|
2314
|
+
def grant_write(
|
|
2315
|
+
self,
|
|
2316
|
+
identity: _aws_cdk_aws_iam_ceddda9d.IGrantable,
|
|
2317
|
+
table_id: builtins.str,
|
|
2318
|
+
) -> _aws_cdk_aws_iam_ceddda9d.Grant:
|
|
2319
|
+
'''(experimental) Grant write permissions for this table bucket and its tables to an IAM principal (Role/Group/User).
|
|
2320
|
+
|
|
2321
|
+
If encryption is used, permission to use the key to encrypt the contents
|
|
2322
|
+
of the bucket will also be granted to the same principal.
|
|
2323
|
+
|
|
2324
|
+
:param identity: -
|
|
2325
|
+
:param table_id: -
|
|
2326
|
+
|
|
2327
|
+
:stability: experimental
|
|
2328
|
+
'''
|
|
2329
|
+
if __debug__:
|
|
2330
|
+
type_hints = typing.get_type_hints(_typecheckingstub__6f9476ce4489c94b0b073d56ebee26cf1a8f5db20184e82de18e7238c0381b9a)
|
|
2331
|
+
check_type(argname="argument identity", value=identity, expected_type=type_hints["identity"])
|
|
2332
|
+
check_type(argname="argument table_id", value=table_id, expected_type=type_hints["table_id"])
|
|
2333
|
+
return typing.cast(_aws_cdk_aws_iam_ceddda9d.Grant, jsii.invoke(self, "grantWrite", [identity, table_id]))
|
|
2334
|
+
|
|
2335
|
+
@jsii.python.classproperty
|
|
2336
|
+
@jsii.member(jsii_name="PROPERTY_INJECTION_ID")
|
|
2337
|
+
def PROPERTY_INJECTION_ID(cls) -> builtins.str:
|
|
2338
|
+
'''(experimental) Uniquely identifies this class.
|
|
2339
|
+
|
|
2340
|
+
:stability: experimental
|
|
2341
|
+
'''
|
|
2342
|
+
return typing.cast(builtins.str, jsii.sget(cls, "PROPERTY_INJECTION_ID"))
|
|
2343
|
+
|
|
2344
|
+
@builtins.property
|
|
2345
|
+
@jsii.member(jsii_name="tableBucketArn")
|
|
2346
|
+
def table_bucket_arn(self) -> builtins.str:
|
|
2347
|
+
'''(experimental) The unique Amazon Resource Name (arn) of this table bucket.
|
|
2348
|
+
|
|
2349
|
+
:stability: experimental
|
|
2350
|
+
'''
|
|
2351
|
+
return typing.cast(builtins.str, jsii.get(self, "tableBucketArn"))
|
|
2352
|
+
|
|
2353
|
+
@builtins.property
|
|
2354
|
+
@jsii.member(jsii_name="tableBucketName")
|
|
2355
|
+
def table_bucket_name(self) -> builtins.str:
|
|
2356
|
+
'''(experimental) The name of this table bucket.
|
|
2357
|
+
|
|
2358
|
+
:stability: experimental
|
|
2359
|
+
'''
|
|
2360
|
+
return typing.cast(builtins.str, jsii.get(self, "tableBucketName"))
|
|
2361
|
+
|
|
2362
|
+
@builtins.property
|
|
2363
|
+
@jsii.member(jsii_name="encryptionKey")
|
|
2364
|
+
def encryption_key(self) -> typing.Optional[_aws_cdk_aws_kms_ceddda9d.IKey]:
|
|
2365
|
+
'''(experimental) Optional KMS encryption key associated with this table bucket.
|
|
2366
|
+
|
|
2367
|
+
:stability: experimental
|
|
2368
|
+
'''
|
|
2369
|
+
return typing.cast(typing.Optional[_aws_cdk_aws_kms_ceddda9d.IKey], jsii.get(self, "encryptionKey"))
|
|
2370
|
+
|
|
2371
|
+
@builtins.property
|
|
2372
|
+
@jsii.member(jsii_name="tableBucketPolicy")
|
|
2373
|
+
def table_bucket_policy(self) -> typing.Optional["TableBucketPolicy"]:
|
|
2374
|
+
'''(experimental) The resource policy for this tableBucket.
|
|
2375
|
+
|
|
2376
|
+
:stability: experimental
|
|
2377
|
+
'''
|
|
2378
|
+
return typing.cast(typing.Optional["TableBucketPolicy"], jsii.get(self, "tableBucketPolicy"))
|
|
2379
|
+
|
|
2380
|
+
@builtins.property
|
|
2381
|
+
@jsii.member(jsii_name="autoCreatePolicy")
|
|
2382
|
+
def _auto_create_policy(self) -> builtins.bool:
|
|
2383
|
+
'''(experimental) Indicates if a table bucket resource policy should automatically created upon the first call to ``addToResourcePolicy``.
|
|
2384
|
+
|
|
2385
|
+
:stability: experimental
|
|
2386
|
+
'''
|
|
2387
|
+
return typing.cast(builtins.bool, jsii.get(self, "autoCreatePolicy"))
|
|
2388
|
+
|
|
2389
|
+
@_auto_create_policy.setter
|
|
2390
|
+
def _auto_create_policy(self, value: builtins.bool) -> None:
|
|
2391
|
+
if __debug__:
|
|
2392
|
+
type_hints = typing.get_type_hints(_typecheckingstub__ddda0c30ebb465614a7378f709964b48c9f175013aa1ed12f0ea7c1218e8c630)
|
|
2393
|
+
check_type(argname="argument value", value=value, expected_type=type_hints["value"])
|
|
2394
|
+
jsii.set(self, "autoCreatePolicy", value) # pyright: ignore[reportArgumentType]
|
|
2395
|
+
|
|
2396
|
+
|
|
2397
|
+
@jsii.data_type(
|
|
2398
|
+
jsii_type="@aws-cdk/aws-s3tables-alpha.TableBucketAttributes",
|
|
2399
|
+
jsii_struct_bases=[],
|
|
2400
|
+
name_mapping={
|
|
2401
|
+
"account": "account",
|
|
2402
|
+
"encryption_key": "encryptionKey",
|
|
2403
|
+
"region": "region",
|
|
2404
|
+
"table_bucket_arn": "tableBucketArn",
|
|
2405
|
+
"table_bucket_name": "tableBucketName",
|
|
2406
|
+
},
|
|
2407
|
+
)
|
|
2408
|
+
class TableBucketAttributes:
|
|
2409
|
+
def __init__(
|
|
2410
|
+
self,
|
|
2411
|
+
*,
|
|
2412
|
+
account: typing.Optional[builtins.str] = None,
|
|
2413
|
+
encryption_key: typing.Optional[_aws_cdk_aws_kms_ceddda9d.IKey] = None,
|
|
2414
|
+
region: typing.Optional[builtins.str] = None,
|
|
2415
|
+
table_bucket_arn: typing.Optional[builtins.str] = None,
|
|
2416
|
+
table_bucket_name: typing.Optional[builtins.str] = None,
|
|
2417
|
+
) -> None:
|
|
2418
|
+
'''(experimental) A reference to a table bucket outside this stack.
|
|
2419
|
+
|
|
2420
|
+
The tableBucketName, region, and account can be provided explicitly
|
|
2421
|
+
or will be inferred from the tableBucketArn
|
|
2422
|
+
|
|
2423
|
+
:param account: (experimental) The accountId containing this table bucket. Default: account inferred from scope
|
|
2424
|
+
:param encryption_key: (experimental) Optional KMS encryption key associated with this bucket. Default: - undefined
|
|
2425
|
+
:param region: (experimental) AWS region this table bucket exists in. Default: region inferred from scope
|
|
2426
|
+
:param table_bucket_arn: (experimental) The table bucket's ARN. Default: tableBucketArn constructed from region, account and tableBucketName are provided
|
|
2427
|
+
:param table_bucket_name: (experimental) The table bucket name, unique per region. Default: tableBucketName inferred from arn
|
|
2428
|
+
|
|
2429
|
+
:stability: experimental
|
|
2430
|
+
:exampleMetadata: fixture=_generated
|
|
2431
|
+
|
|
2432
|
+
Example::
|
|
2433
|
+
|
|
2434
|
+
# The code below shows an example of how to instantiate this type.
|
|
2435
|
+
# The values are placeholders you should change.
|
|
2436
|
+
import aws_cdk.aws_s3tables_alpha as s3tables_alpha
|
|
2437
|
+
from aws_cdk import aws_kms as kms
|
|
2438
|
+
|
|
2439
|
+
# key: kms.Key
|
|
2440
|
+
|
|
2441
|
+
table_bucket_attributes = s3tables_alpha.TableBucketAttributes(
|
|
2442
|
+
account="account",
|
|
2443
|
+
encryption_key=key,
|
|
2444
|
+
region="region",
|
|
2445
|
+
table_bucket_arn="tableBucketArn",
|
|
2446
|
+
table_bucket_name="tableBucketName"
|
|
2447
|
+
)
|
|
2448
|
+
'''
|
|
2449
|
+
if __debug__:
|
|
2450
|
+
type_hints = typing.get_type_hints(_typecheckingstub__f628073bbee2e81e2162c5225d2230a24b470a8915e2ee4cef917951de644d61)
|
|
2451
|
+
check_type(argname="argument account", value=account, expected_type=type_hints["account"])
|
|
2452
|
+
check_type(argname="argument encryption_key", value=encryption_key, expected_type=type_hints["encryption_key"])
|
|
2453
|
+
check_type(argname="argument region", value=region, expected_type=type_hints["region"])
|
|
2454
|
+
check_type(argname="argument table_bucket_arn", value=table_bucket_arn, expected_type=type_hints["table_bucket_arn"])
|
|
2455
|
+
check_type(argname="argument table_bucket_name", value=table_bucket_name, expected_type=type_hints["table_bucket_name"])
|
|
2456
|
+
self._values: typing.Dict[builtins.str, typing.Any] = {}
|
|
2457
|
+
if account is not None:
|
|
2458
|
+
self._values["account"] = account
|
|
2459
|
+
if encryption_key is not None:
|
|
2460
|
+
self._values["encryption_key"] = encryption_key
|
|
2461
|
+
if region is not None:
|
|
2462
|
+
self._values["region"] = region
|
|
2463
|
+
if table_bucket_arn is not None:
|
|
2464
|
+
self._values["table_bucket_arn"] = table_bucket_arn
|
|
2465
|
+
if table_bucket_name is not None:
|
|
2466
|
+
self._values["table_bucket_name"] = table_bucket_name
|
|
2467
|
+
|
|
2468
|
+
@builtins.property
|
|
2469
|
+
def account(self) -> typing.Optional[builtins.str]:
|
|
2470
|
+
'''(experimental) The accountId containing this table bucket.
|
|
2471
|
+
|
|
2472
|
+
:default: account inferred from scope
|
|
2473
|
+
|
|
2474
|
+
:stability: experimental
|
|
2475
|
+
'''
|
|
2476
|
+
result = self._values.get("account")
|
|
2477
|
+
return typing.cast(typing.Optional[builtins.str], result)
|
|
2478
|
+
|
|
2479
|
+
@builtins.property
|
|
2480
|
+
def encryption_key(self) -> typing.Optional[_aws_cdk_aws_kms_ceddda9d.IKey]:
|
|
2481
|
+
'''(experimental) Optional KMS encryption key associated with this bucket.
|
|
2482
|
+
|
|
2483
|
+
:default: - undefined
|
|
2484
|
+
|
|
2485
|
+
:stability: experimental
|
|
2486
|
+
'''
|
|
2487
|
+
result = self._values.get("encryption_key")
|
|
2488
|
+
return typing.cast(typing.Optional[_aws_cdk_aws_kms_ceddda9d.IKey], result)
|
|
2489
|
+
|
|
2490
|
+
@builtins.property
|
|
2491
|
+
def region(self) -> typing.Optional[builtins.str]:
|
|
2492
|
+
'''(experimental) AWS region this table bucket exists in.
|
|
2493
|
+
|
|
2494
|
+
:default: region inferred from scope
|
|
2495
|
+
|
|
2496
|
+
:stability: experimental
|
|
2497
|
+
'''
|
|
2498
|
+
result = self._values.get("region")
|
|
2499
|
+
return typing.cast(typing.Optional[builtins.str], result)
|
|
2500
|
+
|
|
2501
|
+
@builtins.property
|
|
2502
|
+
def table_bucket_arn(self) -> typing.Optional[builtins.str]:
|
|
2503
|
+
'''(experimental) The table bucket's ARN.
|
|
2504
|
+
|
|
2505
|
+
:default: tableBucketArn constructed from region, account and tableBucketName are provided
|
|
2506
|
+
|
|
2507
|
+
:stability: experimental
|
|
2508
|
+
'''
|
|
2509
|
+
result = self._values.get("table_bucket_arn")
|
|
2510
|
+
return typing.cast(typing.Optional[builtins.str], result)
|
|
2511
|
+
|
|
2512
|
+
@builtins.property
|
|
2513
|
+
def table_bucket_name(self) -> typing.Optional[builtins.str]:
|
|
2514
|
+
'''(experimental) The table bucket name, unique per region.
|
|
2515
|
+
|
|
2516
|
+
:default: tableBucketName inferred from arn
|
|
2517
|
+
|
|
2518
|
+
:stability: experimental
|
|
2519
|
+
'''
|
|
2520
|
+
result = self._values.get("table_bucket_name")
|
|
2521
|
+
return typing.cast(typing.Optional[builtins.str], result)
|
|
2522
|
+
|
|
2523
|
+
def __eq__(self, rhs: typing.Any) -> builtins.bool:
|
|
2524
|
+
return isinstance(rhs, self.__class__) and rhs._values == self._values
|
|
2525
|
+
|
|
2526
|
+
def __ne__(self, rhs: typing.Any) -> builtins.bool:
|
|
2527
|
+
return not (rhs == self)
|
|
2528
|
+
|
|
2529
|
+
def __repr__(self) -> str:
|
|
2530
|
+
return "TableBucketAttributes(%s)" % ", ".join(
|
|
2531
|
+
k + "=" + repr(v) for k, v in self._values.items()
|
|
2532
|
+
)
|
|
2533
|
+
|
|
2534
|
+
|
|
2535
|
+
@jsii.enum(jsii_type="@aws-cdk/aws-s3tables-alpha.TableBucketEncryption")
|
|
2536
|
+
class TableBucketEncryption(enum.Enum):
|
|
2537
|
+
'''(experimental) Controls Server Side Encryption (SSE) for this TableBucket.
|
|
2538
|
+
|
|
2539
|
+
:stability: experimental
|
|
2540
|
+
:exampleMetadata: infused
|
|
2541
|
+
|
|
2542
|
+
Example::
|
|
2543
|
+
|
|
2544
|
+
# Provide a user defined KMS Key:
|
|
2545
|
+
key = kms.Key(scope, "UserKey")
|
|
2546
|
+
encrypted_bucket = TableBucket(scope, "EncryptedTableBucket",
|
|
2547
|
+
table_bucket_name="table-bucket-1",
|
|
2548
|
+
encryption=TableBucketEncryption.KMS,
|
|
2549
|
+
encryption_key=key
|
|
2550
|
+
)
|
|
2551
|
+
# This account principal will also receive kms:Decrypt access to the KMS key
|
|
2552
|
+
encrypted_bucket.grant_read(iam.AccountPrincipal("123456789012"), "*")
|
|
2553
|
+
|
|
2554
|
+
# Use S3 managed server side encryption (default)
|
|
2555
|
+
encrypted_bucket_default = TableBucket(scope, "EncryptedTableBucketDefault",
|
|
2556
|
+
table_bucket_name="table-bucket-3",
|
|
2557
|
+
encryption=TableBucketEncryption.S3_MANAGED
|
|
2558
|
+
)
|
|
2559
|
+
'''
|
|
2560
|
+
|
|
2561
|
+
KMS = "KMS"
|
|
2562
|
+
'''(experimental) Use a customer defined KMS key for encryption If ``encryptionKey`` is specified, this key will be used, otherwise, one will be defined.
|
|
2563
|
+
|
|
2564
|
+
:stability: experimental
|
|
2565
|
+
'''
|
|
2566
|
+
S3_MANAGED = "S3_MANAGED"
|
|
2567
|
+
'''(experimental) Use S3 managed encryption keys with AES256 encryption.
|
|
2568
|
+
|
|
2569
|
+
:stability: experimental
|
|
2570
|
+
'''
|
|
2571
|
+
|
|
2572
|
+
|
|
2573
|
+
class TableBucketPolicy(
|
|
2574
|
+
_aws_cdk_ceddda9d.Resource,
|
|
2575
|
+
metaclass=jsii.JSIIMeta,
|
|
2576
|
+
jsii_type="@aws-cdk/aws-s3tables-alpha.TableBucketPolicy",
|
|
2577
|
+
):
|
|
2578
|
+
'''(experimental) A Bucket Policy for S3 TableBuckets.
|
|
2579
|
+
|
|
2580
|
+
You will almost never need to use this construct directly.
|
|
2581
|
+
Instead, TableBucket.addToResourcePolicy can be used to add more policies to your bucket directly
|
|
2582
|
+
|
|
2583
|
+
:stability: experimental
|
|
2584
|
+
:exampleMetadata: fixture=_generated
|
|
2585
|
+
|
|
2586
|
+
Example::
|
|
2587
|
+
|
|
2588
|
+
# The code below shows an example of how to instantiate this type.
|
|
2589
|
+
# The values are placeholders you should change.
|
|
2590
|
+
import aws_cdk.aws_s3tables_alpha as s3tables_alpha
|
|
2591
|
+
import aws_cdk as cdk
|
|
2592
|
+
from aws_cdk import aws_iam as iam
|
|
2593
|
+
|
|
2594
|
+
# policy_document: iam.PolicyDocument
|
|
2595
|
+
# table_bucket: s3tables_alpha.TableBucket
|
|
2596
|
+
|
|
2597
|
+
table_bucket_policy = s3tables_alpha.TableBucketPolicy(self, "MyTableBucketPolicy",
|
|
2598
|
+
table_bucket=table_bucket,
|
|
2599
|
+
|
|
2600
|
+
# the properties below are optional
|
|
2601
|
+
removal_policy=cdk.RemovalPolicy.DESTROY,
|
|
2602
|
+
resource_policy=policy_document
|
|
2603
|
+
)
|
|
2604
|
+
'''
|
|
2605
|
+
|
|
2606
|
+
def __init__(
|
|
2607
|
+
self,
|
|
2608
|
+
scope: _constructs_77d1e7e8.Construct,
|
|
2609
|
+
id: builtins.str,
|
|
2610
|
+
*,
|
|
2611
|
+
table_bucket: ITableBucket,
|
|
2612
|
+
removal_policy: typing.Optional[_aws_cdk_ceddda9d.RemovalPolicy] = None,
|
|
2613
|
+
resource_policy: typing.Optional[_aws_cdk_aws_iam_ceddda9d.PolicyDocument] = None,
|
|
2614
|
+
) -> None:
|
|
2615
|
+
'''
|
|
2616
|
+
:param scope: -
|
|
2617
|
+
:param id: -
|
|
2618
|
+
:param table_bucket: (experimental) The associated table bucket.
|
|
2619
|
+
:param removal_policy: (experimental) Policy to apply when the policy is removed from this stack. Default: - RemovalPolicy.DESTROY.
|
|
2620
|
+
:param resource_policy: (experimental) The policy document for the bucket's resource policy. Default: undefined An empty iam.PolicyDocument will be initialized
|
|
2621
|
+
|
|
2622
|
+
:stability: experimental
|
|
2623
|
+
'''
|
|
2624
|
+
if __debug__:
|
|
2625
|
+
type_hints = typing.get_type_hints(_typecheckingstub__26a65a7f8b5344e57811d88192dc3cf822bfa45031afe03f34576593e271e7b1)
|
|
2626
|
+
check_type(argname="argument scope", value=scope, expected_type=type_hints["scope"])
|
|
2627
|
+
check_type(argname="argument id", value=id, expected_type=type_hints["id"])
|
|
2628
|
+
props = TableBucketPolicyProps(
|
|
2629
|
+
table_bucket=table_bucket,
|
|
2630
|
+
removal_policy=removal_policy,
|
|
2631
|
+
resource_policy=resource_policy,
|
|
2632
|
+
)
|
|
2633
|
+
|
|
2634
|
+
jsii.create(self.__class__, self, [scope, id, props])
|
|
2635
|
+
|
|
2636
|
+
@jsii.python.classproperty
|
|
2637
|
+
@jsii.member(jsii_name="PROPERTY_INJECTION_ID")
|
|
2638
|
+
def PROPERTY_INJECTION_ID(cls) -> builtins.str:
|
|
2639
|
+
'''(experimental) Uniquely identifies this class.
|
|
2640
|
+
|
|
2641
|
+
:stability: experimental
|
|
2642
|
+
'''
|
|
2643
|
+
return typing.cast(builtins.str, jsii.sget(cls, "PROPERTY_INJECTION_ID"))
|
|
2644
|
+
|
|
2645
|
+
@builtins.property
|
|
2646
|
+
@jsii.member(jsii_name="document")
|
|
2647
|
+
def document(self) -> _aws_cdk_aws_iam_ceddda9d.PolicyDocument:
|
|
2648
|
+
'''(experimental) The IAM PolicyDocument containing permissions represented by this policy.
|
|
2649
|
+
|
|
2650
|
+
:stability: experimental
|
|
2651
|
+
'''
|
|
2652
|
+
return typing.cast(_aws_cdk_aws_iam_ceddda9d.PolicyDocument, jsii.get(self, "document"))
|
|
2653
|
+
|
|
2654
|
+
|
|
2655
|
+
@jsii.data_type(
|
|
2656
|
+
jsii_type="@aws-cdk/aws-s3tables-alpha.TableBucketPolicyProps",
|
|
2657
|
+
jsii_struct_bases=[],
|
|
2658
|
+
name_mapping={
|
|
2659
|
+
"table_bucket": "tableBucket",
|
|
2660
|
+
"removal_policy": "removalPolicy",
|
|
2661
|
+
"resource_policy": "resourcePolicy",
|
|
2662
|
+
},
|
|
2663
|
+
)
|
|
2664
|
+
class TableBucketPolicyProps:
|
|
2665
|
+
def __init__(
|
|
2666
|
+
self,
|
|
2667
|
+
*,
|
|
2668
|
+
table_bucket: ITableBucket,
|
|
2669
|
+
removal_policy: typing.Optional[_aws_cdk_ceddda9d.RemovalPolicy] = None,
|
|
2670
|
+
resource_policy: typing.Optional[_aws_cdk_aws_iam_ceddda9d.PolicyDocument] = None,
|
|
2671
|
+
) -> None:
|
|
2672
|
+
'''(experimental) Parameters for constructing a TableBucketPolicy.
|
|
2673
|
+
|
|
2674
|
+
:param table_bucket: (experimental) The associated table bucket.
|
|
2675
|
+
:param removal_policy: (experimental) Policy to apply when the policy is removed from this stack. Default: - RemovalPolicy.DESTROY.
|
|
2676
|
+
:param resource_policy: (experimental) The policy document for the bucket's resource policy. Default: undefined An empty iam.PolicyDocument will be initialized
|
|
2677
|
+
|
|
2678
|
+
:stability: experimental
|
|
2679
|
+
:exampleMetadata: fixture=_generated
|
|
2680
|
+
|
|
2681
|
+
Example::
|
|
2682
|
+
|
|
2683
|
+
# The code below shows an example of how to instantiate this type.
|
|
2684
|
+
# The values are placeholders you should change.
|
|
2685
|
+
import aws_cdk.aws_s3tables_alpha as s3tables_alpha
|
|
2686
|
+
import aws_cdk as cdk
|
|
2687
|
+
from aws_cdk import aws_iam as iam
|
|
2688
|
+
|
|
2689
|
+
# policy_document: iam.PolicyDocument
|
|
2690
|
+
# table_bucket: s3tables_alpha.TableBucket
|
|
2691
|
+
|
|
2692
|
+
table_bucket_policy_props = s3tables_alpha.TableBucketPolicyProps(
|
|
2693
|
+
table_bucket=table_bucket,
|
|
2694
|
+
|
|
2695
|
+
# the properties below are optional
|
|
2696
|
+
removal_policy=cdk.RemovalPolicy.DESTROY,
|
|
2697
|
+
resource_policy=policy_document
|
|
2698
|
+
)
|
|
2699
|
+
'''
|
|
2700
|
+
if __debug__:
|
|
2701
|
+
type_hints = typing.get_type_hints(_typecheckingstub__a8afedf0f9c96ed3f2bfa2918ddf62a334b286bd16c0997d1db2f20acd045d28)
|
|
2702
|
+
check_type(argname="argument table_bucket", value=table_bucket, expected_type=type_hints["table_bucket"])
|
|
2703
|
+
check_type(argname="argument removal_policy", value=removal_policy, expected_type=type_hints["removal_policy"])
|
|
2704
|
+
check_type(argname="argument resource_policy", value=resource_policy, expected_type=type_hints["resource_policy"])
|
|
2705
|
+
self._values: typing.Dict[builtins.str, typing.Any] = {
|
|
2706
|
+
"table_bucket": table_bucket,
|
|
2707
|
+
}
|
|
2708
|
+
if removal_policy is not None:
|
|
2709
|
+
self._values["removal_policy"] = removal_policy
|
|
2710
|
+
if resource_policy is not None:
|
|
2711
|
+
self._values["resource_policy"] = resource_policy
|
|
2712
|
+
|
|
2713
|
+
@builtins.property
|
|
2714
|
+
def table_bucket(self) -> ITableBucket:
|
|
2715
|
+
'''(experimental) The associated table bucket.
|
|
2716
|
+
|
|
2717
|
+
:stability: experimental
|
|
2718
|
+
'''
|
|
2719
|
+
result = self._values.get("table_bucket")
|
|
2720
|
+
assert result is not None, "Required property 'table_bucket' is missing"
|
|
2721
|
+
return typing.cast(ITableBucket, result)
|
|
2722
|
+
|
|
2723
|
+
@builtins.property
|
|
2724
|
+
def removal_policy(self) -> typing.Optional[_aws_cdk_ceddda9d.RemovalPolicy]:
|
|
2725
|
+
'''(experimental) Policy to apply when the policy is removed from this stack.
|
|
2726
|
+
|
|
2727
|
+
:default: - RemovalPolicy.DESTROY.
|
|
758
2728
|
|
|
759
2729
|
:stability: experimental
|
|
760
2730
|
'''
|
|
761
|
-
|
|
2731
|
+
result = self._values.get("removal_policy")
|
|
2732
|
+
return typing.cast(typing.Optional[_aws_cdk_ceddda9d.RemovalPolicy], result)
|
|
762
2733
|
|
|
763
2734
|
@builtins.property
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
2735
|
+
def resource_policy(
|
|
2736
|
+
self,
|
|
2737
|
+
) -> typing.Optional[_aws_cdk_aws_iam_ceddda9d.PolicyDocument]:
|
|
2738
|
+
'''(experimental) The policy document for the bucket's resource policy.
|
|
2739
|
+
|
|
2740
|
+
:default: undefined An empty iam.PolicyDocument will be initialized
|
|
767
2741
|
|
|
768
2742
|
:stability: experimental
|
|
769
2743
|
'''
|
|
770
|
-
|
|
2744
|
+
result = self._values.get("resource_policy")
|
|
2745
|
+
return typing.cast(typing.Optional[_aws_cdk_aws_iam_ceddda9d.PolicyDocument], result)
|
|
771
2746
|
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
2747
|
+
def __eq__(self, rhs: typing.Any) -> builtins.bool:
|
|
2748
|
+
return isinstance(rhs, self.__class__) and rhs._values == self._values
|
|
2749
|
+
|
|
2750
|
+
def __ne__(self, rhs: typing.Any) -> builtins.bool:
|
|
2751
|
+
return not (rhs == self)
|
|
2752
|
+
|
|
2753
|
+
def __repr__(self) -> str:
|
|
2754
|
+
return "TableBucketPolicyProps(%s)" % ", ".join(
|
|
2755
|
+
k + "=" + repr(v) for k, v in self._values.items()
|
|
2756
|
+
)
|
|
778
2757
|
|
|
779
2758
|
|
|
780
2759
|
@jsii.data_type(
|
|
781
|
-
jsii_type="@aws-cdk/aws-s3tables-alpha.
|
|
2760
|
+
jsii_type="@aws-cdk/aws-s3tables-alpha.TableBucketProps",
|
|
782
2761
|
jsii_struct_bases=[],
|
|
783
2762
|
name_mapping={
|
|
2763
|
+
"table_bucket_name": "tableBucketName",
|
|
784
2764
|
"account": "account",
|
|
2765
|
+
"encryption": "encryption",
|
|
785
2766
|
"encryption_key": "encryptionKey",
|
|
786
2767
|
"region": "region",
|
|
787
|
-
"
|
|
788
|
-
"
|
|
2768
|
+
"removal_policy": "removalPolicy",
|
|
2769
|
+
"unreferenced_file_removal": "unreferencedFileRemoval",
|
|
789
2770
|
},
|
|
790
2771
|
)
|
|
791
|
-
class
|
|
2772
|
+
class TableBucketProps:
|
|
792
2773
|
def __init__(
|
|
793
2774
|
self,
|
|
794
2775
|
*,
|
|
2776
|
+
table_bucket_name: builtins.str,
|
|
795
2777
|
account: typing.Optional[builtins.str] = None,
|
|
2778
|
+
encryption: typing.Optional[TableBucketEncryption] = None,
|
|
796
2779
|
encryption_key: typing.Optional[_aws_cdk_aws_kms_ceddda9d.IKey] = None,
|
|
797
2780
|
region: typing.Optional[builtins.str] = None,
|
|
798
|
-
|
|
799
|
-
|
|
2781
|
+
removal_policy: typing.Optional[_aws_cdk_ceddda9d.RemovalPolicy] = None,
|
|
2782
|
+
unreferenced_file_removal: typing.Optional[typing.Union["UnreferencedFileRemoval", typing.Dict[builtins.str, typing.Any]]] = None,
|
|
800
2783
|
) -> None:
|
|
801
|
-
'''(experimental)
|
|
802
|
-
|
|
803
|
-
The tableBucketName, region, and account can be provided explicitly
|
|
804
|
-
or will be inferred from the tableBucketArn
|
|
2784
|
+
'''(experimental) Parameters for constructing a TableBucket.
|
|
805
2785
|
|
|
806
|
-
:param
|
|
807
|
-
:param
|
|
808
|
-
:param
|
|
809
|
-
:param
|
|
810
|
-
:param
|
|
2786
|
+
:param table_bucket_name: (experimental) Name of the S3 TableBucket.
|
|
2787
|
+
:param account: (experimental) AWS Account ID of the table bucket owner. Default: - it's assumed the bucket belongs to the same account as the scope it's being imported into
|
|
2788
|
+
:param encryption: (experimental) The kind of server-side encryption to apply to this bucket. If you choose KMS, you can specify a KMS key via ``encryptionKey``. If encryption key is not specified, a key will automatically be created. Default: - ``KMS`` if ``encryptionKey`` is specified, or ``S3_MANAGED`` otherwise.
|
|
2789
|
+
:param encryption_key: (experimental) External KMS key to use for bucket encryption. The ``encryption`` property must be either not specified or set to ``KMS``. An error will be emitted if ``encryption`` is set to ``S3_MANAGED``. Default: - If ``encryption`` is set to ``KMS`` and this property is undefined, a new KMS key will be created and associated with this bucket.
|
|
2790
|
+
:param region: (experimental) AWS region that the table bucket exists in. Default: - it's assumed the bucket is in the same region as the scope it's being imported into
|
|
2791
|
+
:param removal_policy: (experimental) Controls what happens to this table bucket it it stoped being managed by cloudformation. Default: RETAIN
|
|
2792
|
+
:param unreferenced_file_removal: (experimental) Unreferenced file removal settings for the S3 TableBucket. Default: Enabled with default values
|
|
811
2793
|
|
|
812
2794
|
:stability: experimental
|
|
813
|
-
:exampleMetadata:
|
|
2795
|
+
:exampleMetadata: infused
|
|
814
2796
|
|
|
815
2797
|
Example::
|
|
816
2798
|
|
|
817
|
-
#
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
encryption_key=key,
|
|
827
|
-
region="region",
|
|
828
|
-
table_bucket_arn="tableBucketArn",
|
|
829
|
-
table_bucket_name="tableBucketName"
|
|
2799
|
+
# Build a Table bucket
|
|
2800
|
+
sample_table_bucket = TableBucket(scope, "ExampleTableBucket",
|
|
2801
|
+
table_bucket_name="example-bucket-1",
|
|
2802
|
+
# optional fields:
|
|
2803
|
+
unreferenced_file_removal=UnreferencedFileRemoval(
|
|
2804
|
+
status=UnreferencedFileRemovalStatus.ENABLED,
|
|
2805
|
+
noncurrent_days=20,
|
|
2806
|
+
unreferenced_days=20
|
|
2807
|
+
)
|
|
830
2808
|
)
|
|
831
2809
|
'''
|
|
2810
|
+
if isinstance(unreferenced_file_removal, dict):
|
|
2811
|
+
unreferenced_file_removal = UnreferencedFileRemoval(**unreferenced_file_removal)
|
|
832
2812
|
if __debug__:
|
|
833
|
-
type_hints = typing.get_type_hints(
|
|
2813
|
+
type_hints = typing.get_type_hints(_typecheckingstub__aa14ccf904c2576c446af7122d6335d3a92b012274a231120ab28c942832368b)
|
|
2814
|
+
check_type(argname="argument table_bucket_name", value=table_bucket_name, expected_type=type_hints["table_bucket_name"])
|
|
834
2815
|
check_type(argname="argument account", value=account, expected_type=type_hints["account"])
|
|
2816
|
+
check_type(argname="argument encryption", value=encryption, expected_type=type_hints["encryption"])
|
|
835
2817
|
check_type(argname="argument encryption_key", value=encryption_key, expected_type=type_hints["encryption_key"])
|
|
836
2818
|
check_type(argname="argument region", value=region, expected_type=type_hints["region"])
|
|
837
|
-
check_type(argname="argument
|
|
838
|
-
check_type(argname="argument
|
|
839
|
-
self._values: typing.Dict[builtins.str, typing.Any] = {
|
|
2819
|
+
check_type(argname="argument removal_policy", value=removal_policy, expected_type=type_hints["removal_policy"])
|
|
2820
|
+
check_type(argname="argument unreferenced_file_removal", value=unreferenced_file_removal, expected_type=type_hints["unreferenced_file_removal"])
|
|
2821
|
+
self._values: typing.Dict[builtins.str, typing.Any] = {
|
|
2822
|
+
"table_bucket_name": table_bucket_name,
|
|
2823
|
+
}
|
|
840
2824
|
if account is not None:
|
|
841
2825
|
self._values["account"] = account
|
|
2826
|
+
if encryption is not None:
|
|
2827
|
+
self._values["encryption"] = encryption
|
|
842
2828
|
if encryption_key is not None:
|
|
843
2829
|
self._values["encryption_key"] = encryption_key
|
|
844
2830
|
if region is not None:
|
|
845
2831
|
self._values["region"] = region
|
|
846
|
-
if
|
|
847
|
-
self._values["
|
|
848
|
-
if
|
|
849
|
-
self._values["
|
|
2832
|
+
if removal_policy is not None:
|
|
2833
|
+
self._values["removal_policy"] = removal_policy
|
|
2834
|
+
if unreferenced_file_removal is not None:
|
|
2835
|
+
self._values["unreferenced_file_removal"] = unreferenced_file_removal
|
|
2836
|
+
|
|
2837
|
+
@builtins.property
|
|
2838
|
+
def table_bucket_name(self) -> builtins.str:
|
|
2839
|
+
'''(experimental) Name of the S3 TableBucket.
|
|
2840
|
+
|
|
2841
|
+
:stability: experimental
|
|
2842
|
+
:link: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-tables-buckets-naming.html#table-buckets-naming-rules
|
|
2843
|
+
'''
|
|
2844
|
+
result = self._values.get("table_bucket_name")
|
|
2845
|
+
assert result is not None, "Required property 'table_bucket_name' is missing"
|
|
2846
|
+
return typing.cast(builtins.str, result)
|
|
850
2847
|
|
|
851
2848
|
@builtins.property
|
|
852
2849
|
def account(self) -> typing.Optional[builtins.str]:
|
|
853
|
-
'''(experimental)
|
|
2850
|
+
'''(experimental) AWS Account ID of the table bucket owner.
|
|
854
2851
|
|
|
855
|
-
:default: account
|
|
2852
|
+
:default: - it's assumed the bucket belongs to the same account as the scope it's being imported into
|
|
856
2853
|
|
|
857
2854
|
:stability: experimental
|
|
858
2855
|
'''
|
|
859
2856
|
result = self._values.get("account")
|
|
860
2857
|
return typing.cast(typing.Optional[builtins.str], result)
|
|
861
2858
|
|
|
2859
|
+
@builtins.property
|
|
2860
|
+
def encryption(self) -> typing.Optional[TableBucketEncryption]:
|
|
2861
|
+
'''(experimental) The kind of server-side encryption to apply to this bucket.
|
|
2862
|
+
|
|
2863
|
+
If you choose KMS, you can specify a KMS key via ``encryptionKey``. If
|
|
2864
|
+
encryption key is not specified, a key will automatically be created.
|
|
2865
|
+
|
|
2866
|
+
:default: - ``KMS`` if ``encryptionKey`` is specified, or ``S3_MANAGED`` otherwise.
|
|
2867
|
+
|
|
2868
|
+
:stability: experimental
|
|
2869
|
+
'''
|
|
2870
|
+
result = self._values.get("encryption")
|
|
2871
|
+
return typing.cast(typing.Optional[TableBucketEncryption], result)
|
|
2872
|
+
|
|
862
2873
|
@builtins.property
|
|
863
2874
|
def encryption_key(self) -> typing.Optional[_aws_cdk_aws_kms_ceddda9d.IKey]:
|
|
864
|
-
'''(experimental)
|
|
2875
|
+
'''(experimental) External KMS key to use for bucket encryption.
|
|
865
2876
|
|
|
866
|
-
|
|
2877
|
+
The ``encryption`` property must be either not specified or set to ``KMS``.
|
|
2878
|
+
An error will be emitted if ``encryption`` is set to ``S3_MANAGED``.
|
|
2879
|
+
|
|
2880
|
+
:default:
|
|
2881
|
+
|
|
2882
|
+
- If ``encryption`` is set to ``KMS`` and this property is undefined,
|
|
2883
|
+
a new KMS key will be created and associated with this bucket.
|
|
867
2884
|
|
|
868
2885
|
:stability: experimental
|
|
869
2886
|
'''
|
|
@@ -872,9 +2889,9 @@ class TableBucketAttributes:
|
|
|
872
2889
|
|
|
873
2890
|
@builtins.property
|
|
874
2891
|
def region(self) -> typing.Optional[builtins.str]:
|
|
875
|
-
'''(experimental) AWS region
|
|
2892
|
+
'''(experimental) AWS region that the table bucket exists in.
|
|
876
2893
|
|
|
877
|
-
:default: region
|
|
2894
|
+
:default: - it's assumed the bucket is in the same region as the scope it's being imported into
|
|
878
2895
|
|
|
879
2896
|
:stability: experimental
|
|
880
2897
|
'''
|
|
@@ -882,26 +2899,28 @@ class TableBucketAttributes:
|
|
|
882
2899
|
return typing.cast(typing.Optional[builtins.str], result)
|
|
883
2900
|
|
|
884
2901
|
@builtins.property
|
|
885
|
-
def
|
|
886
|
-
'''(experimental)
|
|
2902
|
+
def removal_policy(self) -> typing.Optional[_aws_cdk_ceddda9d.RemovalPolicy]:
|
|
2903
|
+
'''(experimental) Controls what happens to this table bucket it it stoped being managed by cloudformation.
|
|
887
2904
|
|
|
888
|
-
:default:
|
|
2905
|
+
:default: RETAIN
|
|
889
2906
|
|
|
890
2907
|
:stability: experimental
|
|
891
2908
|
'''
|
|
892
|
-
result = self._values.get("
|
|
893
|
-
return typing.cast(typing.Optional[
|
|
2909
|
+
result = self._values.get("removal_policy")
|
|
2910
|
+
return typing.cast(typing.Optional[_aws_cdk_ceddda9d.RemovalPolicy], result)
|
|
894
2911
|
|
|
895
2912
|
@builtins.property
|
|
896
|
-
def
|
|
897
|
-
'''(experimental)
|
|
2913
|
+
def unreferenced_file_removal(self) -> typing.Optional["UnreferencedFileRemoval"]:
|
|
2914
|
+
'''(experimental) Unreferenced file removal settings for the S3 TableBucket.
|
|
898
2915
|
|
|
899
|
-
:default:
|
|
2916
|
+
:default: Enabled with default values
|
|
900
2917
|
|
|
2918
|
+
:see: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-table-buckets-maintenance.html
|
|
901
2919
|
:stability: experimental
|
|
2920
|
+
:link: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3tables-tablebucket-unreferencedfileremoval.html
|
|
902
2921
|
'''
|
|
903
|
-
result = self._values.get("
|
|
904
|
-
return typing.cast(typing.Optional[
|
|
2922
|
+
result = self._values.get("unreferenced_file_removal")
|
|
2923
|
+
return typing.cast(typing.Optional["UnreferencedFileRemoval"], result)
|
|
905
2924
|
|
|
906
2925
|
def __eq__(self, rhs: typing.Any) -> builtins.bool:
|
|
907
2926
|
return isinstance(rhs, self.__class__) and rhs._values == self._values
|
|
@@ -910,58 +2929,20 @@ class TableBucketAttributes:
|
|
|
910
2929
|
return not (rhs == self)
|
|
911
2930
|
|
|
912
2931
|
def __repr__(self) -> str:
|
|
913
|
-
return "
|
|
2932
|
+
return "TableBucketProps(%s)" % ", ".join(
|
|
914
2933
|
k + "=" + repr(v) for k, v in self._values.items()
|
|
915
2934
|
)
|
|
916
2935
|
|
|
917
2936
|
|
|
918
|
-
|
|
919
|
-
class TableBucketEncryption(enum.Enum):
|
|
920
|
-
'''(experimental) Controls Server Side Encryption (SSE) for this TableBucket.
|
|
921
|
-
|
|
922
|
-
:stability: experimental
|
|
923
|
-
:exampleMetadata: infused
|
|
924
|
-
|
|
925
|
-
Example::
|
|
926
|
-
|
|
927
|
-
# Provide a user defined KMS Key:
|
|
928
|
-
key = kms.Key(scope, "UserKey")
|
|
929
|
-
encrypted_bucket = TableBucket(scope, "EncryptedTableBucket",
|
|
930
|
-
table_bucket_name="table-bucket-1",
|
|
931
|
-
encryption=TableBucketEncryption.KMS,
|
|
932
|
-
encryption_key=key
|
|
933
|
-
)
|
|
934
|
-
# This account principal will also receive kms:Decrypt access to the KMS key
|
|
935
|
-
encrypted_bucket.grant_read(iam.AccountPrincipal("123456789012"), "*")
|
|
936
|
-
|
|
937
|
-
# Use S3 managed server side encryption (default)
|
|
938
|
-
encrypted_bucket_default = TableBucket(scope, "EncryptedTableBucketDefault",
|
|
939
|
-
table_bucket_name="table-bucket-3",
|
|
940
|
-
encryption=TableBucketEncryption.S3_MANAGED
|
|
941
|
-
)
|
|
942
|
-
'''
|
|
943
|
-
|
|
944
|
-
KMS = "KMS"
|
|
945
|
-
'''(experimental) Use a customer defined KMS key for encryption If ``encryptionKey`` is specified, this key will be used, otherwise, one will be defined.
|
|
946
|
-
|
|
947
|
-
:stability: experimental
|
|
948
|
-
'''
|
|
949
|
-
S3_MANAGED = "S3_MANAGED"
|
|
950
|
-
'''(experimental) Use S3 managed encryption keys with AES256 encryption.
|
|
951
|
-
|
|
952
|
-
:stability: experimental
|
|
953
|
-
'''
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
class TableBucketPolicy(
|
|
2937
|
+
class TablePolicy(
|
|
957
2938
|
_aws_cdk_ceddda9d.Resource,
|
|
958
2939
|
metaclass=jsii.JSIIMeta,
|
|
959
|
-
jsii_type="@aws-cdk/aws-s3tables-alpha.
|
|
2940
|
+
jsii_type="@aws-cdk/aws-s3tables-alpha.TablePolicy",
|
|
960
2941
|
):
|
|
961
|
-
'''(experimental) A
|
|
2942
|
+
'''(experimental) A Policy for S3 Tables.
|
|
962
2943
|
|
|
963
2944
|
You will almost never need to use this construct directly.
|
|
964
|
-
Instead,
|
|
2945
|
+
Instead, Table.addToResourcePolicy can be used to add more policies to your table directly
|
|
965
2946
|
|
|
966
2947
|
:stability: experimental
|
|
967
2948
|
:exampleMetadata: fixture=_generated
|
|
@@ -975,10 +2956,10 @@ class TableBucketPolicy(
|
|
|
975
2956
|
from aws_cdk import aws_iam as iam
|
|
976
2957
|
|
|
977
2958
|
# policy_document: iam.PolicyDocument
|
|
978
|
-
#
|
|
2959
|
+
# table: s3tables_alpha.Table
|
|
979
2960
|
|
|
980
|
-
|
|
981
|
-
|
|
2961
|
+
table_policy = s3tables_alpha.TablePolicy(self, "MyTablePolicy",
|
|
2962
|
+
table=table,
|
|
982
2963
|
|
|
983
2964
|
# the properties below are optional
|
|
984
2965
|
removal_policy=cdk.RemovalPolicy.DESTROY,
|
|
@@ -991,27 +2972,25 @@ class TableBucketPolicy(
|
|
|
991
2972
|
scope: _constructs_77d1e7e8.Construct,
|
|
992
2973
|
id: builtins.str,
|
|
993
2974
|
*,
|
|
994
|
-
|
|
2975
|
+
table: ITable,
|
|
995
2976
|
removal_policy: typing.Optional[_aws_cdk_ceddda9d.RemovalPolicy] = None,
|
|
996
2977
|
resource_policy: typing.Optional[_aws_cdk_aws_iam_ceddda9d.PolicyDocument] = None,
|
|
997
2978
|
) -> None:
|
|
998
2979
|
'''
|
|
999
2980
|
:param scope: -
|
|
1000
2981
|
:param id: -
|
|
1001
|
-
:param
|
|
2982
|
+
:param table: (experimental) The associated table.
|
|
1002
2983
|
:param removal_policy: (experimental) Policy to apply when the policy is removed from this stack. Default: - RemovalPolicy.DESTROY.
|
|
1003
|
-
:param resource_policy: (experimental) The policy document for the
|
|
2984
|
+
:param resource_policy: (experimental) The policy document for the table's resource policy. Default: undefined An empty iam.PolicyDocument will be initialized
|
|
1004
2985
|
|
|
1005
2986
|
:stability: experimental
|
|
1006
2987
|
'''
|
|
1007
2988
|
if __debug__:
|
|
1008
|
-
type_hints = typing.get_type_hints(
|
|
2989
|
+
type_hints = typing.get_type_hints(_typecheckingstub__8b78bf56e8d94ea2b7e7602cfb78ea18ec614a55b94a18e39d69bd1c23964cf8)
|
|
1009
2990
|
check_type(argname="argument scope", value=scope, expected_type=type_hints["scope"])
|
|
1010
2991
|
check_type(argname="argument id", value=id, expected_type=type_hints["id"])
|
|
1011
|
-
props =
|
|
1012
|
-
|
|
1013
|
-
removal_policy=removal_policy,
|
|
1014
|
-
resource_policy=resource_policy,
|
|
2992
|
+
props = TablePolicyProps(
|
|
2993
|
+
table=table, removal_policy=removal_policy, resource_policy=resource_policy
|
|
1015
2994
|
)
|
|
1016
2995
|
|
|
1017
2996
|
jsii.create(self.__class__, self, [scope, id, props])
|
|
@@ -1036,27 +3015,27 @@ class TableBucketPolicy(
|
|
|
1036
3015
|
|
|
1037
3016
|
|
|
1038
3017
|
@jsii.data_type(
|
|
1039
|
-
jsii_type="@aws-cdk/aws-s3tables-alpha.
|
|
3018
|
+
jsii_type="@aws-cdk/aws-s3tables-alpha.TablePolicyProps",
|
|
1040
3019
|
jsii_struct_bases=[],
|
|
1041
3020
|
name_mapping={
|
|
1042
|
-
"
|
|
3021
|
+
"table": "table",
|
|
1043
3022
|
"removal_policy": "removalPolicy",
|
|
1044
3023
|
"resource_policy": "resourcePolicy",
|
|
1045
3024
|
},
|
|
1046
3025
|
)
|
|
1047
|
-
class
|
|
3026
|
+
class TablePolicyProps:
|
|
1048
3027
|
def __init__(
|
|
1049
3028
|
self,
|
|
1050
3029
|
*,
|
|
1051
|
-
|
|
3030
|
+
table: ITable,
|
|
1052
3031
|
removal_policy: typing.Optional[_aws_cdk_ceddda9d.RemovalPolicy] = None,
|
|
1053
3032
|
resource_policy: typing.Optional[_aws_cdk_aws_iam_ceddda9d.PolicyDocument] = None,
|
|
1054
3033
|
) -> None:
|
|
1055
|
-
'''(experimental) Parameters for constructing a
|
|
3034
|
+
'''(experimental) Parameters for constructing a TablePolicy.
|
|
1056
3035
|
|
|
1057
|
-
:param
|
|
3036
|
+
:param table: (experimental) The associated table.
|
|
1058
3037
|
:param removal_policy: (experimental) Policy to apply when the policy is removed from this stack. Default: - RemovalPolicy.DESTROY.
|
|
1059
|
-
:param resource_policy: (experimental) The policy document for the
|
|
3038
|
+
:param resource_policy: (experimental) The policy document for the table's resource policy. Default: undefined An empty iam.PolicyDocument will be initialized
|
|
1060
3039
|
|
|
1061
3040
|
:stability: experimental
|
|
1062
3041
|
:exampleMetadata: fixture=_generated
|
|
@@ -1070,10 +3049,10 @@ class TableBucketPolicyProps:
|
|
|
1070
3049
|
from aws_cdk import aws_iam as iam
|
|
1071
3050
|
|
|
1072
3051
|
# policy_document: iam.PolicyDocument
|
|
1073
|
-
#
|
|
3052
|
+
# table: s3tables_alpha.Table
|
|
1074
3053
|
|
|
1075
|
-
|
|
1076
|
-
|
|
3054
|
+
table_policy_props = s3tables_alpha.TablePolicyProps(
|
|
3055
|
+
table=table,
|
|
1077
3056
|
|
|
1078
3057
|
# the properties below are optional
|
|
1079
3058
|
removal_policy=cdk.RemovalPolicy.DESTROY,
|
|
@@ -1081,12 +3060,12 @@ class TableBucketPolicyProps:
|
|
|
1081
3060
|
)
|
|
1082
3061
|
'''
|
|
1083
3062
|
if __debug__:
|
|
1084
|
-
type_hints = typing.get_type_hints(
|
|
1085
|
-
check_type(argname="argument
|
|
3063
|
+
type_hints = typing.get_type_hints(_typecheckingstub__b086238e24aebc145195c4cca70cd83d65abedf1539c0b11b96843994c862fb8)
|
|
3064
|
+
check_type(argname="argument table", value=table, expected_type=type_hints["table"])
|
|
1086
3065
|
check_type(argname="argument removal_policy", value=removal_policy, expected_type=type_hints["removal_policy"])
|
|
1087
3066
|
check_type(argname="argument resource_policy", value=resource_policy, expected_type=type_hints["resource_policy"])
|
|
1088
3067
|
self._values: typing.Dict[builtins.str, typing.Any] = {
|
|
1089
|
-
"
|
|
3068
|
+
"table": table,
|
|
1090
3069
|
}
|
|
1091
3070
|
if removal_policy is not None:
|
|
1092
3071
|
self._values["removal_policy"] = removal_policy
|
|
@@ -1094,14 +3073,14 @@ class TableBucketPolicyProps:
|
|
|
1094
3073
|
self._values["resource_policy"] = resource_policy
|
|
1095
3074
|
|
|
1096
3075
|
@builtins.property
|
|
1097
|
-
def
|
|
1098
|
-
'''(experimental) The associated table
|
|
3076
|
+
def table(self) -> ITable:
|
|
3077
|
+
'''(experimental) The associated table.
|
|
1099
3078
|
|
|
1100
3079
|
:stability: experimental
|
|
1101
3080
|
'''
|
|
1102
|
-
result = self._values.get("
|
|
1103
|
-
assert result is not None, "Required property '
|
|
1104
|
-
return typing.cast(
|
|
3081
|
+
result = self._values.get("table")
|
|
3082
|
+
assert result is not None, "Required property 'table' is missing"
|
|
3083
|
+
return typing.cast(ITable, result)
|
|
1105
3084
|
|
|
1106
3085
|
@builtins.property
|
|
1107
3086
|
def removal_policy(self) -> typing.Optional[_aws_cdk_ceddda9d.RemovalPolicy]:
|
|
@@ -1118,7 +3097,7 @@ class TableBucketPolicyProps:
|
|
|
1118
3097
|
def resource_policy(
|
|
1119
3098
|
self,
|
|
1120
3099
|
) -> typing.Optional[_aws_cdk_aws_iam_ceddda9d.PolicyDocument]:
|
|
1121
|
-
'''(experimental) The policy document for the
|
|
3100
|
+
'''(experimental) The policy document for the table's resource policy.
|
|
1122
3101
|
|
|
1123
3102
|
:default: undefined An empty iam.PolicyDocument will be initialized
|
|
1124
3103
|
|
|
@@ -1134,156 +3113,181 @@ class TableBucketPolicyProps:
|
|
|
1134
3113
|
return not (rhs == self)
|
|
1135
3114
|
|
|
1136
3115
|
def __repr__(self) -> str:
|
|
1137
|
-
return "
|
|
3116
|
+
return "TablePolicyProps(%s)" % ", ".join(
|
|
1138
3117
|
k + "=" + repr(v) for k, v in self._values.items()
|
|
1139
3118
|
)
|
|
1140
3119
|
|
|
1141
3120
|
|
|
1142
3121
|
@jsii.data_type(
|
|
1143
|
-
jsii_type="@aws-cdk/aws-s3tables-alpha.
|
|
3122
|
+
jsii_type="@aws-cdk/aws-s3tables-alpha.TableProps",
|
|
1144
3123
|
jsii_struct_bases=[],
|
|
1145
3124
|
name_mapping={
|
|
1146
|
-
"
|
|
1147
|
-
"
|
|
1148
|
-
"
|
|
1149
|
-
"
|
|
1150
|
-
"
|
|
3125
|
+
"namespace": "namespace",
|
|
3126
|
+
"open_table_format": "openTableFormat",
|
|
3127
|
+
"table_name": "tableName",
|
|
3128
|
+
"compaction": "compaction",
|
|
3129
|
+
"iceberg_metadata": "icebergMetadata",
|
|
1151
3130
|
"removal_policy": "removalPolicy",
|
|
1152
|
-
"
|
|
3131
|
+
"snapshot_management": "snapshotManagement",
|
|
3132
|
+
"without_metadata": "withoutMetadata",
|
|
1153
3133
|
},
|
|
1154
3134
|
)
|
|
1155
|
-
class
|
|
3135
|
+
class TableProps:
|
|
1156
3136
|
def __init__(
|
|
1157
3137
|
self,
|
|
1158
3138
|
*,
|
|
1159
|
-
|
|
1160
|
-
|
|
1161
|
-
|
|
1162
|
-
|
|
1163
|
-
|
|
3139
|
+
namespace: INamespace,
|
|
3140
|
+
open_table_format: OpenTableFormat,
|
|
3141
|
+
table_name: builtins.str,
|
|
3142
|
+
compaction: typing.Optional[typing.Union[CompactionProperty, typing.Dict[builtins.str, typing.Any]]] = None,
|
|
3143
|
+
iceberg_metadata: typing.Optional[typing.Union[IcebergMetadataProperty, typing.Dict[builtins.str, typing.Any]]] = None,
|
|
1164
3144
|
removal_policy: typing.Optional[_aws_cdk_ceddda9d.RemovalPolicy] = None,
|
|
1165
|
-
|
|
3145
|
+
snapshot_management: typing.Optional[typing.Union[SnapshotManagementProperty, typing.Dict[builtins.str, typing.Any]]] = None,
|
|
3146
|
+
without_metadata: typing.Optional[builtins.bool] = None,
|
|
1166
3147
|
) -> None:
|
|
1167
|
-
'''(experimental)
|
|
3148
|
+
'''(experimental) Properties for creating a new S3 Table.
|
|
1168
3149
|
|
|
1169
|
-
:param
|
|
1170
|
-
:param
|
|
1171
|
-
:param
|
|
1172
|
-
:param
|
|
1173
|
-
:param
|
|
1174
|
-
:param removal_policy: (experimental) Controls what happens to this table
|
|
1175
|
-
:param
|
|
3150
|
+
:param namespace: (experimental) The namespace under which this table is created.
|
|
3151
|
+
:param open_table_format: (experimental) Format of this table. Currently, the only supported value is OpenTableFormat.ICEBERG.
|
|
3152
|
+
:param table_name: (experimental) Name of this table, unique within the namespace.
|
|
3153
|
+
:param compaction: (experimental) Settings governing the Compaction maintenance action. Default: Amazon S3 selects the best compaction strategy based on your table sort order.
|
|
3154
|
+
:param iceberg_metadata: (experimental) Contains details about the metadata for an Iceberg table. Default: table is created without any metadata
|
|
3155
|
+
:param removal_policy: (experimental) Controls what happens to this table it it stoped being managed by cloudformation. Default: RETAIN
|
|
3156
|
+
:param snapshot_management: (experimental) Contains details about the snapshot management settings for an Iceberg table. Default: enabled: MinimumSnapshots is 1 by default and MaximumSnapshotAge is 120 hours by default.
|
|
3157
|
+
:param without_metadata: (experimental) If true, indicates that you don't want to specify a schema for the table. This property is mutually exclusive to 'IcebergMetadata'. Default: false
|
|
1176
3158
|
|
|
1177
3159
|
:stability: experimental
|
|
1178
3160
|
:exampleMetadata: infused
|
|
1179
3161
|
|
|
1180
3162
|
Example::
|
|
1181
3163
|
|
|
1182
|
-
# Build a
|
|
1183
|
-
|
|
1184
|
-
|
|
1185
|
-
|
|
1186
|
-
|
|
1187
|
-
|
|
1188
|
-
|
|
1189
|
-
|
|
3164
|
+
# Build a table
|
|
3165
|
+
sample_table = Table(scope, "ExampleTable",
|
|
3166
|
+
table_name="example_table",
|
|
3167
|
+
namespace=namespace,
|
|
3168
|
+
open_table_format=OpenTableFormat.ICEBERG,
|
|
3169
|
+
without_metadata=True
|
|
3170
|
+
)
|
|
3171
|
+
|
|
3172
|
+
# Build a table with an Iceberg Schema
|
|
3173
|
+
sample_table_with_schema = Table(scope, "ExampleSchemaTable",
|
|
3174
|
+
table_name="example_table_with_schema",
|
|
3175
|
+
namespace=namespace,
|
|
3176
|
+
open_table_format=OpenTableFormat.ICEBERG,
|
|
3177
|
+
iceberg_metadata=IcebergMetadataProperty(
|
|
3178
|
+
iceberg_schema=IcebergSchemaProperty(
|
|
3179
|
+
schema_field_list=[SchemaFieldProperty(
|
|
3180
|
+
name="id",
|
|
3181
|
+
type="int",
|
|
3182
|
+
required=True
|
|
3183
|
+
), SchemaFieldProperty(
|
|
3184
|
+
name="name",
|
|
3185
|
+
type="string"
|
|
3186
|
+
)
|
|
3187
|
+
]
|
|
3188
|
+
)
|
|
3189
|
+
),
|
|
3190
|
+
compaction=CompactionProperty(
|
|
3191
|
+
status=Status.ENABLED,
|
|
3192
|
+
target_file_size_mb=128
|
|
3193
|
+
),
|
|
3194
|
+
snapshot_management=SnapshotManagementProperty(
|
|
3195
|
+
status=Status.ENABLED,
|
|
3196
|
+
max_snapshot_age_hours=48,
|
|
3197
|
+
min_snapshots_to_keep=5
|
|
1190
3198
|
)
|
|
1191
3199
|
)
|
|
1192
3200
|
'''
|
|
1193
|
-
if isinstance(
|
|
1194
|
-
|
|
3201
|
+
if isinstance(compaction, dict):
|
|
3202
|
+
compaction = CompactionProperty(**compaction)
|
|
3203
|
+
if isinstance(iceberg_metadata, dict):
|
|
3204
|
+
iceberg_metadata = IcebergMetadataProperty(**iceberg_metadata)
|
|
3205
|
+
if isinstance(snapshot_management, dict):
|
|
3206
|
+
snapshot_management = SnapshotManagementProperty(**snapshot_management)
|
|
1195
3207
|
if __debug__:
|
|
1196
|
-
type_hints = typing.get_type_hints(
|
|
1197
|
-
check_type(argname="argument
|
|
1198
|
-
check_type(argname="argument
|
|
1199
|
-
check_type(argname="argument
|
|
1200
|
-
check_type(argname="argument
|
|
1201
|
-
check_type(argname="argument
|
|
3208
|
+
type_hints = typing.get_type_hints(_typecheckingstub__adbbcc05d3dc39dfd296a872f006be429c733d0afc6f602e57bd2bede716f05e)
|
|
3209
|
+
check_type(argname="argument namespace", value=namespace, expected_type=type_hints["namespace"])
|
|
3210
|
+
check_type(argname="argument open_table_format", value=open_table_format, expected_type=type_hints["open_table_format"])
|
|
3211
|
+
check_type(argname="argument table_name", value=table_name, expected_type=type_hints["table_name"])
|
|
3212
|
+
check_type(argname="argument compaction", value=compaction, expected_type=type_hints["compaction"])
|
|
3213
|
+
check_type(argname="argument iceberg_metadata", value=iceberg_metadata, expected_type=type_hints["iceberg_metadata"])
|
|
1202
3214
|
check_type(argname="argument removal_policy", value=removal_policy, expected_type=type_hints["removal_policy"])
|
|
1203
|
-
check_type(argname="argument
|
|
3215
|
+
check_type(argname="argument snapshot_management", value=snapshot_management, expected_type=type_hints["snapshot_management"])
|
|
3216
|
+
check_type(argname="argument without_metadata", value=without_metadata, expected_type=type_hints["without_metadata"])
|
|
1204
3217
|
self._values: typing.Dict[builtins.str, typing.Any] = {
|
|
1205
|
-
"
|
|
3218
|
+
"namespace": namespace,
|
|
3219
|
+
"open_table_format": open_table_format,
|
|
3220
|
+
"table_name": table_name,
|
|
1206
3221
|
}
|
|
1207
|
-
if
|
|
1208
|
-
self._values["
|
|
1209
|
-
if
|
|
1210
|
-
self._values["
|
|
1211
|
-
if encryption_key is not None:
|
|
1212
|
-
self._values["encryption_key"] = encryption_key
|
|
1213
|
-
if region is not None:
|
|
1214
|
-
self._values["region"] = region
|
|
3222
|
+
if compaction is not None:
|
|
3223
|
+
self._values["compaction"] = compaction
|
|
3224
|
+
if iceberg_metadata is not None:
|
|
3225
|
+
self._values["iceberg_metadata"] = iceberg_metadata
|
|
1215
3226
|
if removal_policy is not None:
|
|
1216
3227
|
self._values["removal_policy"] = removal_policy
|
|
1217
|
-
if
|
|
1218
|
-
self._values["
|
|
3228
|
+
if snapshot_management is not None:
|
|
3229
|
+
self._values["snapshot_management"] = snapshot_management
|
|
3230
|
+
if without_metadata is not None:
|
|
3231
|
+
self._values["without_metadata"] = without_metadata
|
|
1219
3232
|
|
|
1220
3233
|
@builtins.property
|
|
1221
|
-
def
|
|
1222
|
-
'''(experimental)
|
|
3234
|
+
def namespace(self) -> INamespace:
|
|
3235
|
+
'''(experimental) The namespace under which this table is created.
|
|
1223
3236
|
|
|
1224
3237
|
:stability: experimental
|
|
1225
|
-
:link: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-tables-buckets-naming.html#table-buckets-naming-rules
|
|
1226
3238
|
'''
|
|
1227
|
-
result = self._values.get("
|
|
1228
|
-
assert result is not None, "Required property '
|
|
1229
|
-
return typing.cast(
|
|
3239
|
+
result = self._values.get("namespace")
|
|
3240
|
+
assert result is not None, "Required property 'namespace' is missing"
|
|
3241
|
+
return typing.cast(INamespace, result)
|
|
1230
3242
|
|
|
1231
3243
|
@builtins.property
|
|
1232
|
-
def
|
|
1233
|
-
'''(experimental)
|
|
3244
|
+
def open_table_format(self) -> OpenTableFormat:
|
|
3245
|
+
'''(experimental) Format of this table.
|
|
1234
3246
|
|
|
1235
|
-
|
|
3247
|
+
Currently, the only supported value is OpenTableFormat.ICEBERG.
|
|
1236
3248
|
|
|
1237
3249
|
:stability: experimental
|
|
1238
3250
|
'''
|
|
1239
|
-
result = self._values.get("
|
|
1240
|
-
|
|
3251
|
+
result = self._values.get("open_table_format")
|
|
3252
|
+
assert result is not None, "Required property 'open_table_format' is missing"
|
|
3253
|
+
return typing.cast(OpenTableFormat, result)
|
|
1241
3254
|
|
|
1242
3255
|
@builtins.property
|
|
1243
|
-
def
|
|
1244
|
-
'''(experimental)
|
|
1245
|
-
|
|
1246
|
-
If you choose KMS, you can specify a KMS key via ``encryptionKey``. If
|
|
1247
|
-
encryption key is not specified, a key will automatically be created.
|
|
1248
|
-
|
|
1249
|
-
:default: - ``KMS`` if ``encryptionKey`` is specified, or ``S3_MANAGED`` otherwise.
|
|
3256
|
+
def table_name(self) -> builtins.str:
|
|
3257
|
+
'''(experimental) Name of this table, unique within the namespace.
|
|
1250
3258
|
|
|
1251
3259
|
:stability: experimental
|
|
1252
3260
|
'''
|
|
1253
|
-
result = self._values.get("
|
|
1254
|
-
|
|
3261
|
+
result = self._values.get("table_name")
|
|
3262
|
+
assert result is not None, "Required property 'table_name' is missing"
|
|
3263
|
+
return typing.cast(builtins.str, result)
|
|
1255
3264
|
|
|
1256
3265
|
@builtins.property
|
|
1257
|
-
def
|
|
1258
|
-
'''(experimental)
|
|
1259
|
-
|
|
1260
|
-
The ``encryption`` property must be either not specified or set to ``KMS``.
|
|
1261
|
-
An error will be emitted if ``encryption`` is set to ``S3_MANAGED``.
|
|
1262
|
-
|
|
1263
|
-
:default:
|
|
3266
|
+
def compaction(self) -> typing.Optional[CompactionProperty]:
|
|
3267
|
+
'''(experimental) Settings governing the Compaction maintenance action.
|
|
1264
3268
|
|
|
1265
|
-
|
|
1266
|
-
a new KMS key will be created and associated with this bucket.
|
|
3269
|
+
:default: Amazon S3 selects the best compaction strategy based on your table sort order.
|
|
1267
3270
|
|
|
3271
|
+
:see: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-tables-maintenance.html
|
|
1268
3272
|
:stability: experimental
|
|
1269
3273
|
'''
|
|
1270
|
-
result = self._values.get("
|
|
1271
|
-
return typing.cast(typing.Optional[
|
|
3274
|
+
result = self._values.get("compaction")
|
|
3275
|
+
return typing.cast(typing.Optional[CompactionProperty], result)
|
|
1272
3276
|
|
|
1273
3277
|
@builtins.property
|
|
1274
|
-
def
|
|
1275
|
-
'''(experimental)
|
|
3278
|
+
def iceberg_metadata(self) -> typing.Optional[IcebergMetadataProperty]:
|
|
3279
|
+
'''(experimental) Contains details about the metadata for an Iceberg table.
|
|
1276
3280
|
|
|
1277
|
-
:default:
|
|
3281
|
+
:default: table is created without any metadata
|
|
1278
3282
|
|
|
1279
3283
|
:stability: experimental
|
|
1280
3284
|
'''
|
|
1281
|
-
result = self._values.get("
|
|
1282
|
-
return typing.cast(typing.Optional[
|
|
3285
|
+
result = self._values.get("iceberg_metadata")
|
|
3286
|
+
return typing.cast(typing.Optional[IcebergMetadataProperty], result)
|
|
1283
3287
|
|
|
1284
3288
|
@builtins.property
|
|
1285
3289
|
def removal_policy(self) -> typing.Optional[_aws_cdk_ceddda9d.RemovalPolicy]:
|
|
1286
|
-
'''(experimental) Controls what happens to this table
|
|
3290
|
+
'''(experimental) Controls what happens to this table it it stoped being managed by cloudformation.
|
|
1287
3291
|
|
|
1288
3292
|
:default: RETAIN
|
|
1289
3293
|
|
|
@@ -1293,17 +3297,28 @@ class TableBucketProps:
|
|
|
1293
3297
|
return typing.cast(typing.Optional[_aws_cdk_ceddda9d.RemovalPolicy], result)
|
|
1294
3298
|
|
|
1295
3299
|
@builtins.property
|
|
1296
|
-
def
|
|
1297
|
-
'''(experimental)
|
|
3300
|
+
def snapshot_management(self) -> typing.Optional[SnapshotManagementProperty]:
|
|
3301
|
+
'''(experimental) Contains details about the snapshot management settings for an Iceberg table.
|
|
1298
3302
|
|
|
1299
|
-
:default:
|
|
3303
|
+
:default: enabled: MinimumSnapshots is 1 by default and MaximumSnapshotAge is 120 hours by default.
|
|
1300
3304
|
|
|
1301
|
-
:see: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-table-buckets-maintenance.html
|
|
1302
3305
|
:stability: experimental
|
|
1303
|
-
:link: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3tables-tablebucket-unreferencedfileremoval.html
|
|
1304
3306
|
'''
|
|
1305
|
-
result = self._values.get("
|
|
1306
|
-
return typing.cast(typing.Optional[
|
|
3307
|
+
result = self._values.get("snapshot_management")
|
|
3308
|
+
return typing.cast(typing.Optional[SnapshotManagementProperty], result)
|
|
3309
|
+
|
|
3310
|
+
@builtins.property
|
|
3311
|
+
def without_metadata(self) -> typing.Optional[builtins.bool]:
|
|
3312
|
+
'''(experimental) If true, indicates that you don't want to specify a schema for the table.
|
|
3313
|
+
|
|
3314
|
+
This property is mutually exclusive to 'IcebergMetadata'.
|
|
3315
|
+
|
|
3316
|
+
:default: false
|
|
3317
|
+
|
|
3318
|
+
:stability: experimental
|
|
3319
|
+
'''
|
|
3320
|
+
result = self._values.get("without_metadata")
|
|
3321
|
+
return typing.cast(typing.Optional[builtins.bool], result)
|
|
1307
3322
|
|
|
1308
3323
|
def __eq__(self, rhs: typing.Any) -> builtins.bool:
|
|
1309
3324
|
return isinstance(rhs, self.__class__) and rhs._values == self._values
|
|
@@ -1312,7 +3327,7 @@ class TableBucketProps:
|
|
|
1312
3327
|
return not (rhs == self)
|
|
1313
3328
|
|
|
1314
3329
|
def __repr__(self) -> str:
|
|
1315
|
-
return "
|
|
3330
|
+
return "TableProps(%s)" % ", ".join(
|
|
1316
3331
|
k + "=" + repr(v) for k, v in self._values.items()
|
|
1317
3332
|
)
|
|
1318
3333
|
|
|
@@ -1457,19 +3472,68 @@ class UnreferencedFileRemovalStatus(enum.Enum):
|
|
|
1457
3472
|
|
|
1458
3473
|
|
|
1459
3474
|
__all__ = [
|
|
3475
|
+
"CompactionProperty",
|
|
3476
|
+
"INamespace",
|
|
3477
|
+
"ITable",
|
|
1460
3478
|
"ITableBucket",
|
|
3479
|
+
"IcebergMetadataProperty",
|
|
3480
|
+
"IcebergSchemaProperty",
|
|
3481
|
+
"Namespace",
|
|
3482
|
+
"NamespaceAttributes",
|
|
3483
|
+
"NamespaceProps",
|
|
3484
|
+
"OpenTableFormat",
|
|
3485
|
+
"SchemaFieldProperty",
|
|
3486
|
+
"SnapshotManagementProperty",
|
|
3487
|
+
"Status",
|
|
3488
|
+
"Table",
|
|
3489
|
+
"TableAttributes",
|
|
1461
3490
|
"TableBucket",
|
|
1462
3491
|
"TableBucketAttributes",
|
|
1463
3492
|
"TableBucketEncryption",
|
|
1464
3493
|
"TableBucketPolicy",
|
|
1465
3494
|
"TableBucketPolicyProps",
|
|
1466
3495
|
"TableBucketProps",
|
|
3496
|
+
"TablePolicy",
|
|
3497
|
+
"TablePolicyProps",
|
|
3498
|
+
"TableProps",
|
|
1467
3499
|
"UnreferencedFileRemoval",
|
|
1468
3500
|
"UnreferencedFileRemovalStatus",
|
|
1469
3501
|
]
|
|
1470
3502
|
|
|
1471
3503
|
publication.publish()
|
|
1472
3504
|
|
|
3505
|
+
def _typecheckingstub__ea606cde59917b73fdb198d73eabdbbe686fdbd73e01ef72284a9061ea612d80(
|
|
3506
|
+
*,
|
|
3507
|
+
status: Status,
|
|
3508
|
+
target_file_size_mb: jsii.Number,
|
|
3509
|
+
) -> None:
|
|
3510
|
+
"""Type checking stubs"""
|
|
3511
|
+
pass
|
|
3512
|
+
|
|
3513
|
+
def _typecheckingstub__da6cde6f4428a664d5a067b88ed42d6a9c66af2a44cb2211d25ecd28073c5cf3(
|
|
3514
|
+
statement: _aws_cdk_aws_iam_ceddda9d.PolicyStatement,
|
|
3515
|
+
) -> None:
|
|
3516
|
+
"""Type checking stubs"""
|
|
3517
|
+
pass
|
|
3518
|
+
|
|
3519
|
+
def _typecheckingstub__3e83bfa5470edaff0a4a96df441439dc54d0e9371b70d2571426e560cb4ae2eb(
|
|
3520
|
+
identity: _aws_cdk_aws_iam_ceddda9d.IGrantable,
|
|
3521
|
+
) -> None:
|
|
3522
|
+
"""Type checking stubs"""
|
|
3523
|
+
pass
|
|
3524
|
+
|
|
3525
|
+
def _typecheckingstub__6e9db385d2bd54ad234de96ad643e346812e81e4cf447d2e614c92f8ce02037d(
|
|
3526
|
+
identity: _aws_cdk_aws_iam_ceddda9d.IGrantable,
|
|
3527
|
+
) -> None:
|
|
3528
|
+
"""Type checking stubs"""
|
|
3529
|
+
pass
|
|
3530
|
+
|
|
3531
|
+
def _typecheckingstub__580625b8fab3a16de8ff8d5024b24a235d5bc9597470275f3fd5c04ef950a9d9(
|
|
3532
|
+
identity: _aws_cdk_aws_iam_ceddda9d.IGrantable,
|
|
3533
|
+
) -> None:
|
|
3534
|
+
"""Type checking stubs"""
|
|
3535
|
+
pass
|
|
3536
|
+
|
|
1473
3537
|
def _typecheckingstub__a7c10542c60e15926bb4ef59925c4f6c0878400e041897780edddaa65054d627(
|
|
1474
3538
|
statement: _aws_cdk_aws_iam_ceddda9d.PolicyStatement,
|
|
1475
3539
|
) -> None:
|
|
@@ -1497,6 +3561,152 @@ def _typecheckingstub__65fa831e505e76e1fe23a8a8d8ce97bb97ebff683edbf67f37020df64
|
|
|
1497
3561
|
"""Type checking stubs"""
|
|
1498
3562
|
pass
|
|
1499
3563
|
|
|
3564
|
+
def _typecheckingstub__f8230e6a4eadd2193ba7389b1a23bde451e68a07c19bcda56cba1c321d75d5f0(
|
|
3565
|
+
*,
|
|
3566
|
+
iceberg_schema: typing.Union[IcebergSchemaProperty, typing.Dict[builtins.str, typing.Any]],
|
|
3567
|
+
) -> None:
|
|
3568
|
+
"""Type checking stubs"""
|
|
3569
|
+
pass
|
|
3570
|
+
|
|
3571
|
+
def _typecheckingstub__f4da2961c1ead632b855491f63cf76c4886c0e7a3d1795c1533655124a5dccb6(
|
|
3572
|
+
*,
|
|
3573
|
+
schema_field_list: typing.Sequence[typing.Union[SchemaFieldProperty, typing.Dict[builtins.str, typing.Any]]],
|
|
3574
|
+
) -> None:
|
|
3575
|
+
"""Type checking stubs"""
|
|
3576
|
+
pass
|
|
3577
|
+
|
|
3578
|
+
def _typecheckingstub__ea3444f2b1f25cee0bac27bf1e4c044f18ded5f025356448c35a47f4611915d5(
|
|
3579
|
+
scope: _constructs_77d1e7e8.Construct,
|
|
3580
|
+
id: builtins.str,
|
|
3581
|
+
*,
|
|
3582
|
+
namespace_name: builtins.str,
|
|
3583
|
+
table_bucket: ITableBucket,
|
|
3584
|
+
removal_policy: typing.Optional[_aws_cdk_ceddda9d.RemovalPolicy] = None,
|
|
3585
|
+
) -> None:
|
|
3586
|
+
"""Type checking stubs"""
|
|
3587
|
+
pass
|
|
3588
|
+
|
|
3589
|
+
def _typecheckingstub__429e6100662356607de36bc4f09397c07482d4becdff99cdf1257c1b95547276(
|
|
3590
|
+
scope: _constructs_77d1e7e8.Construct,
|
|
3591
|
+
id: builtins.str,
|
|
3592
|
+
*,
|
|
3593
|
+
namespace_name: builtins.str,
|
|
3594
|
+
table_bucket: ITableBucket,
|
|
3595
|
+
) -> None:
|
|
3596
|
+
"""Type checking stubs"""
|
|
3597
|
+
pass
|
|
3598
|
+
|
|
3599
|
+
def _typecheckingstub__4a07351eb257958d2290e548252c46a7c8963c7bc2f700e83671f819e4b7dbd5(
|
|
3600
|
+
namespace_name: builtins.str,
|
|
3601
|
+
) -> None:
|
|
3602
|
+
"""Type checking stubs"""
|
|
3603
|
+
pass
|
|
3604
|
+
|
|
3605
|
+
def _typecheckingstub__8f79f8c2998fe357462fbff82a75e82ed3236dd34caffcf6f6267cffcdda3275(
|
|
3606
|
+
*,
|
|
3607
|
+
namespace_name: builtins.str,
|
|
3608
|
+
table_bucket: ITableBucket,
|
|
3609
|
+
) -> None:
|
|
3610
|
+
"""Type checking stubs"""
|
|
3611
|
+
pass
|
|
3612
|
+
|
|
3613
|
+
def _typecheckingstub__fd18f87a98f23ccaea0f0c36db6b294de2ffbbb509594c9bfa49f26b6b0d0e7a(
|
|
3614
|
+
*,
|
|
3615
|
+
namespace_name: builtins.str,
|
|
3616
|
+
table_bucket: ITableBucket,
|
|
3617
|
+
removal_policy: typing.Optional[_aws_cdk_ceddda9d.RemovalPolicy] = None,
|
|
3618
|
+
) -> None:
|
|
3619
|
+
"""Type checking stubs"""
|
|
3620
|
+
pass
|
|
3621
|
+
|
|
3622
|
+
def _typecheckingstub__798c061a7214691172814263e161286845f9f56262e641ae55c93d363ce227c1(
|
|
3623
|
+
*,
|
|
3624
|
+
name: builtins.str,
|
|
3625
|
+
type: builtins.str,
|
|
3626
|
+
required: typing.Optional[builtins.bool] = None,
|
|
3627
|
+
) -> None:
|
|
3628
|
+
"""Type checking stubs"""
|
|
3629
|
+
pass
|
|
3630
|
+
|
|
3631
|
+
def _typecheckingstub__74aebe9bead3fb2bce88d441c25d815202759baedd02c817c6e08d2e1dfad2b2(
|
|
3632
|
+
*,
|
|
3633
|
+
max_snapshot_age_hours: typing.Optional[jsii.Number] = None,
|
|
3634
|
+
min_snapshots_to_keep: typing.Optional[jsii.Number] = None,
|
|
3635
|
+
status: typing.Optional[Status] = None,
|
|
3636
|
+
) -> None:
|
|
3637
|
+
"""Type checking stubs"""
|
|
3638
|
+
pass
|
|
3639
|
+
|
|
3640
|
+
def _typecheckingstub__9e5378cdcc21935af950b3c144ea6d1e345b4c98cccbf5fe2a92dff410ed06cf(
|
|
3641
|
+
scope: _constructs_77d1e7e8.Construct,
|
|
3642
|
+
id: builtins.str,
|
|
3643
|
+
*,
|
|
3644
|
+
namespace: INamespace,
|
|
3645
|
+
open_table_format: OpenTableFormat,
|
|
3646
|
+
table_name: builtins.str,
|
|
3647
|
+
compaction: typing.Optional[typing.Union[CompactionProperty, typing.Dict[builtins.str, typing.Any]]] = None,
|
|
3648
|
+
iceberg_metadata: typing.Optional[typing.Union[IcebergMetadataProperty, typing.Dict[builtins.str, typing.Any]]] = None,
|
|
3649
|
+
removal_policy: typing.Optional[_aws_cdk_ceddda9d.RemovalPolicy] = None,
|
|
3650
|
+
snapshot_management: typing.Optional[typing.Union[SnapshotManagementProperty, typing.Dict[builtins.str, typing.Any]]] = None,
|
|
3651
|
+
without_metadata: typing.Optional[builtins.bool] = None,
|
|
3652
|
+
) -> None:
|
|
3653
|
+
"""Type checking stubs"""
|
|
3654
|
+
pass
|
|
3655
|
+
|
|
3656
|
+
def _typecheckingstub__c92fbe73fcedcf34bbbc9a2359a274432437ec47317161e4c88ea9d209155ffd(
|
|
3657
|
+
scope: _constructs_77d1e7e8.Construct,
|
|
3658
|
+
id: builtins.str,
|
|
3659
|
+
*,
|
|
3660
|
+
table_arn: builtins.str,
|
|
3661
|
+
table_name: builtins.str,
|
|
3662
|
+
) -> None:
|
|
3663
|
+
"""Type checking stubs"""
|
|
3664
|
+
pass
|
|
3665
|
+
|
|
3666
|
+
def _typecheckingstub__536e137c7e7454507b9ec796514d014c3913e8c528dfeba351b5e0e36ba8e228(
|
|
3667
|
+
table_name: builtins.str,
|
|
3668
|
+
) -> None:
|
|
3669
|
+
"""Type checking stubs"""
|
|
3670
|
+
pass
|
|
3671
|
+
|
|
3672
|
+
def _typecheckingstub__bf2cc6b0089371bf3b3d86048c16f309f2afb3d7329dc28525f622d9e8006e27(
|
|
3673
|
+
statement: _aws_cdk_aws_iam_ceddda9d.PolicyStatement,
|
|
3674
|
+
) -> None:
|
|
3675
|
+
"""Type checking stubs"""
|
|
3676
|
+
pass
|
|
3677
|
+
|
|
3678
|
+
def _typecheckingstub__f0556fb0bd61a76d9f9bdbab13c49228511a3523caa64f6dbed93963966ed96c(
|
|
3679
|
+
identity: _aws_cdk_aws_iam_ceddda9d.IGrantable,
|
|
3680
|
+
) -> None:
|
|
3681
|
+
"""Type checking stubs"""
|
|
3682
|
+
pass
|
|
3683
|
+
|
|
3684
|
+
def _typecheckingstub__f751d804f7db1fb6bfea578e65d8642e7c39a6078f8effb3cc12bd1d6e5cdd45(
|
|
3685
|
+
identity: _aws_cdk_aws_iam_ceddda9d.IGrantable,
|
|
3686
|
+
) -> None:
|
|
3687
|
+
"""Type checking stubs"""
|
|
3688
|
+
pass
|
|
3689
|
+
|
|
3690
|
+
def _typecheckingstub__782a3a885790eb02b5e9bbd37dd4b038ae3f5d0bdcf890b812c9284899e029ce(
|
|
3691
|
+
identity: _aws_cdk_aws_iam_ceddda9d.IGrantable,
|
|
3692
|
+
) -> None:
|
|
3693
|
+
"""Type checking stubs"""
|
|
3694
|
+
pass
|
|
3695
|
+
|
|
3696
|
+
def _typecheckingstub__cc8c67ff83da04c70c080f40fd29333e2e8cae2c2f37dd6606ad76db5c4cc5d7(
|
|
3697
|
+
value: builtins.bool,
|
|
3698
|
+
) -> None:
|
|
3699
|
+
"""Type checking stubs"""
|
|
3700
|
+
pass
|
|
3701
|
+
|
|
3702
|
+
def _typecheckingstub__20a648b98b2aa2a4eec0f744feac0d8ec3ee06e18fb2a623e889d224bf8fec03(
|
|
3703
|
+
*,
|
|
3704
|
+
table_arn: builtins.str,
|
|
3705
|
+
table_name: builtins.str,
|
|
3706
|
+
) -> None:
|
|
3707
|
+
"""Type checking stubs"""
|
|
3708
|
+
pass
|
|
3709
|
+
|
|
1500
3710
|
def _typecheckingstub__c8d9c0bf5c954c2a6797301b7dc6cb8abd812336f3507addc92f72b805ec0a1e(
|
|
1501
3711
|
scope: _constructs_77d1e7e8.Construct,
|
|
1502
3712
|
id: builtins.str,
|
|
@@ -1616,6 +3826,40 @@ def _typecheckingstub__aa14ccf904c2576c446af7122d6335d3a92b012274a231120ab28c942
|
|
|
1616
3826
|
"""Type checking stubs"""
|
|
1617
3827
|
pass
|
|
1618
3828
|
|
|
3829
|
+
def _typecheckingstub__8b78bf56e8d94ea2b7e7602cfb78ea18ec614a55b94a18e39d69bd1c23964cf8(
|
|
3830
|
+
scope: _constructs_77d1e7e8.Construct,
|
|
3831
|
+
id: builtins.str,
|
|
3832
|
+
*,
|
|
3833
|
+
table: ITable,
|
|
3834
|
+
removal_policy: typing.Optional[_aws_cdk_ceddda9d.RemovalPolicy] = None,
|
|
3835
|
+
resource_policy: typing.Optional[_aws_cdk_aws_iam_ceddda9d.PolicyDocument] = None,
|
|
3836
|
+
) -> None:
|
|
3837
|
+
"""Type checking stubs"""
|
|
3838
|
+
pass
|
|
3839
|
+
|
|
3840
|
+
def _typecheckingstub__b086238e24aebc145195c4cca70cd83d65abedf1539c0b11b96843994c862fb8(
|
|
3841
|
+
*,
|
|
3842
|
+
table: ITable,
|
|
3843
|
+
removal_policy: typing.Optional[_aws_cdk_ceddda9d.RemovalPolicy] = None,
|
|
3844
|
+
resource_policy: typing.Optional[_aws_cdk_aws_iam_ceddda9d.PolicyDocument] = None,
|
|
3845
|
+
) -> None:
|
|
3846
|
+
"""Type checking stubs"""
|
|
3847
|
+
pass
|
|
3848
|
+
|
|
3849
|
+
def _typecheckingstub__adbbcc05d3dc39dfd296a872f006be429c733d0afc6f602e57bd2bede716f05e(
|
|
3850
|
+
*,
|
|
3851
|
+
namespace: INamespace,
|
|
3852
|
+
open_table_format: OpenTableFormat,
|
|
3853
|
+
table_name: builtins.str,
|
|
3854
|
+
compaction: typing.Optional[typing.Union[CompactionProperty, typing.Dict[builtins.str, typing.Any]]] = None,
|
|
3855
|
+
iceberg_metadata: typing.Optional[typing.Union[IcebergMetadataProperty, typing.Dict[builtins.str, typing.Any]]] = None,
|
|
3856
|
+
removal_policy: typing.Optional[_aws_cdk_ceddda9d.RemovalPolicy] = None,
|
|
3857
|
+
snapshot_management: typing.Optional[typing.Union[SnapshotManagementProperty, typing.Dict[builtins.str, typing.Any]]] = None,
|
|
3858
|
+
without_metadata: typing.Optional[builtins.bool] = None,
|
|
3859
|
+
) -> None:
|
|
3860
|
+
"""Type checking stubs"""
|
|
3861
|
+
pass
|
|
3862
|
+
|
|
1619
3863
|
def _typecheckingstub__b3c9fa2e0832ae26e721328d6c201e9e86774721d68903a6414d69d8a77a5675(
|
|
1620
3864
|
*,
|
|
1621
3865
|
noncurrent_days: typing.Optional[jsii.Number] = None,
|
|
@@ -1624,3 +3868,6 @@ def _typecheckingstub__b3c9fa2e0832ae26e721328d6c201e9e86774721d68903a6414d69d8a
|
|
|
1624
3868
|
) -> None:
|
|
1625
3869
|
"""Type checking stubs"""
|
|
1626
3870
|
pass
|
|
3871
|
+
|
|
3872
|
+
for cls in [INamespace, ITable, ITableBucket]:
|
|
3873
|
+
typing.cast(typing.Any, cls).__protocol_attrs__ = typing.cast(typing.Any, cls).__protocol_attrs__ - set(['__jsii_proxy_class__', '__jsii_type__'])
|