@aws-cdk/aws-s3tables-alpha 2.244.0-alpha.0 → 2.246.0-alpha.0

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.
package/lib/table.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import * as iam from 'aws-cdk-lib/aws-iam';
2
2
  import { CfnTablePolicy } from 'aws-cdk-lib/aws-s3tables';
3
- import type { IResource, RemovalPolicy } from 'aws-cdk-lib/core';
3
+ import type { IResource, ITaggableV2, RemovalPolicy, TagManager } from 'aws-cdk-lib/core';
4
4
  import { Resource } from 'aws-cdk-lib/core';
5
5
  import type { Construct } from 'constructs';
6
6
  import type { INamespace } from './namespace';
@@ -198,17 +198,213 @@ export declare enum Status {
198
198
  */
199
199
  DISABLED = "disabled"
200
200
  }
201
+ /**
202
+ * Iceberg transform values for partition and sort fields.
203
+ */
204
+ export declare class IcebergTransform {
205
+ /**
206
+ * Use the column value as the transform value without transformation.
207
+ */
208
+ static readonly IDENTITY: IcebergTransform;
209
+ /**
210
+ * Transform a timestamp/date field to year.
211
+ */
212
+ static readonly YEAR: IcebergTransform;
213
+ /**
214
+ * Transform a timestamp/date field to month.
215
+ */
216
+ static readonly MONTH: IcebergTransform;
217
+ /**
218
+ * Transform a timestamp/date field to day.
219
+ */
220
+ static readonly DAY: IcebergTransform;
221
+ /**
222
+ * Transform a timestamp field to hour.
223
+ */
224
+ static readonly HOUR: IcebergTransform;
225
+ /**
226
+ * Transform values into a fixed number of buckets.
227
+ *
228
+ * @param n The number of buckets (must be a positive integer)
229
+ */
230
+ static bucket(n: number): IcebergTransform;
231
+ /**
232
+ * Truncate values to a fixed width.
233
+ *
234
+ * @param width The truncation width (must be a positive integer)
235
+ */
236
+ static truncate(width: number): IcebergTransform;
237
+ /**
238
+ * Create a custom transform from a string value.
239
+ *
240
+ * @param value The transform string value
241
+ */
242
+ static of(value: string): IcebergTransform;
243
+ /**
244
+ * The string value of the transform.
245
+ */
246
+ readonly value: string;
247
+ private constructor();
248
+ /**
249
+ * Returns the string representation of the transform.
250
+ */
251
+ toString(): string;
252
+ }
253
+ /**
254
+ * Sort direction values for Iceberg sort fields.
255
+ */
256
+ export declare enum SortDirection {
257
+ /**
258
+ * Sort values in ascending order.
259
+ */
260
+ ASC = "asc",
261
+ /**
262
+ * Sort values in descending order.
263
+ */
264
+ DESC = "desc"
265
+ }
266
+ /**
267
+ * Null ordering values for Iceberg sort fields.
268
+ */
269
+ export declare enum NullOrder {
270
+ /**
271
+ * Place null values before non-null values.
272
+ */
273
+ NULLS_FIRST = "nulls-first",
274
+ /**
275
+ * Place null values after non-null values.
276
+ */
277
+ NULLS_LAST = "nulls-last"
278
+ }
279
+ /**
280
+ * Partition field definition for Iceberg table.
281
+ *
282
+ * Defines a single partition column. Multiple partition fields can be combined
283
+ * in an IcebergPartitionSpec to create multi-level partitioning.
284
+ */
285
+ export interface IcebergPartitionField {
286
+ /**
287
+ * The source field ID from the schema.
288
+ */
289
+ readonly sourceId: number;
290
+ /**
291
+ * The partition transform function.
292
+ *
293
+ * Use `IcebergTransform` static properties for common transforms (e.g., `IcebergTransform.IDENTITY`)
294
+ * or methods for parameterized transforms (e.g., `IcebergTransform.bucket(16)`).
295
+ */
296
+ readonly transform: IcebergTransform;
297
+ /**
298
+ * The name of the partition field.
299
+ */
300
+ readonly name: string;
301
+ /**
302
+ * The unique identifier for the partition field.
303
+ *
304
+ * @default - Auto-assigned starting from 1000
305
+ */
306
+ readonly fieldId?: number;
307
+ }
308
+ /**
309
+ * Partition specification for Iceberg table.
310
+ *
311
+ * Contains the complete partitioning configuration for a table, including all partition fields.
312
+ * Use this to define multi-level partitioning (e.g., partition by date, then by region).
313
+ */
314
+ export interface IcebergPartitionSpec {
315
+ /**
316
+ * The list of partition fields.
317
+ */
318
+ readonly fields: IcebergPartitionField[];
319
+ /**
320
+ * The unique identifier for the partition specification.
321
+ *
322
+ * @default 0
323
+ */
324
+ readonly specId?: number;
325
+ }
326
+ /**
327
+ * Sort field definition for Iceberg table.
328
+ */
329
+ export interface IcebergSortField {
330
+ /**
331
+ * The source field ID from the schema.
332
+ */
333
+ readonly sourceId: number;
334
+ /**
335
+ * The sort transform function.
336
+ *
337
+ * Use `IcebergTransform` static properties for common transforms (e.g., `IcebergTransform.IDENTITY`)
338
+ * or methods for parameterized transforms (e.g., `IcebergTransform.bucket(16)`).
339
+ */
340
+ readonly transform: IcebergTransform;
341
+ /**
342
+ * The sort direction.
343
+ */
344
+ readonly direction: SortDirection;
345
+ /**
346
+ * The null ordering.
347
+ */
348
+ readonly nullOrder: NullOrder;
349
+ }
350
+ /**
351
+ * Sort order specification for Iceberg table.
352
+ */
353
+ export interface IcebergSortOrder {
354
+ /**
355
+ * The list of sort fields.
356
+ */
357
+ readonly fields: IcebergSortField[];
358
+ /**
359
+ * The unique identifier for the sort order.
360
+ *
361
+ * @default 1
362
+ */
363
+ readonly orderId?: number;
364
+ }
365
+ /**
366
+ * A single table property key-value pair for Iceberg table configuration.
367
+ */
368
+ export interface TablePropertyEntry {
369
+ /**
370
+ * The property key.
371
+ */
372
+ readonly key: string;
373
+ /**
374
+ * The property value.
375
+ */
376
+ readonly value: string;
377
+ }
201
378
  /**
202
379
  * Contains details about the metadata for an Iceberg table.
203
- * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3tables-table-icebergmetadata.html
380
+ * @see https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3tables-table-icebergmetadata.html
204
381
  */
205
382
  export interface IcebergMetadataProperty {
206
383
  /**
207
384
  * Contains details about the schema for an Iceberg table.
208
385
  *
209
- * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3tables-table-icebergmetadata.html#cfn-s3tables-table-icebergmetadata-icebergschema
386
+ * @see https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3tables-table-icebergmetadata.html#cfn-s3tables-table-icebergmetadata-icebergschema
210
387
  */
211
388
  readonly icebergSchema: IcebergSchemaProperty;
389
+ /**
390
+ * The partition specification for the Iceberg table.
391
+ *
392
+ * @default - No partition specification
393
+ */
394
+ readonly icebergPartitionSpec?: IcebergPartitionSpec;
395
+ /**
396
+ * The sort order for the Iceberg table.
397
+ *
398
+ * @default - No sort order
399
+ */
400
+ readonly icebergSortOrder?: IcebergSortOrder;
401
+ /**
402
+ * Custom properties for the Iceberg table.
403
+ * Each entry represents a key-value pair for Iceberg table configuration.
404
+ *
405
+ * @default - No custom properties
406
+ */
407
+ readonly tableProperties?: TablePropertyEntry[];
212
408
  }
213
409
  /**
214
410
  * Contains details about the schema for an Iceberg table.
@@ -223,6 +419,12 @@ export interface IcebergSchemaProperty {
223
419
  * Contains details about a schema field.
224
420
  */
225
421
  export interface SchemaFieldProperty {
422
+ /**
423
+ * The unique identifier for the field.
424
+ *
425
+ * @default - Auto-assigned by S3 Tables
426
+ */
427
+ readonly id?: number;
226
428
  /**
227
429
  * The name of the field.
228
430
  */
@@ -288,7 +490,7 @@ export interface TableAttributes {
288
490
  /**
289
491
  * An S3 Table with helpers.
290
492
  */
291
- export declare class Table extends TableBase {
493
+ export declare class Table extends TableBase implements ITaggableV2 {
292
494
  /** Uniquely identifies this class. */
293
495
  static readonly PROPERTY_INJECTION_ID: string;
294
496
  /**
@@ -314,6 +516,10 @@ export declare class Table extends TableBase {
314
516
  * @internal
315
517
  */
316
518
  private readonly _resource;
519
+ /**
520
+ * The tag manager for this resource.
521
+ */
522
+ readonly cdkTagManager: TagManager;
317
523
  /**
318
524
  * The name of this table
319
525
  */
@@ -328,5 +534,25 @@ export declare class Table extends TableBase {
328
534
  readonly tablePolicy?: CfnTablePolicy;
329
535
  protected autoCreatePolicy: boolean;
330
536
  constructor(scope: Construct, id: string, props: TableProps);
537
+ /**
538
+ * Builds the CloudFormation Iceberg metadata property from the CDK metadata model.
539
+ */
540
+ private buildIcebergMetadata;
541
+ /**
542
+ * Builds the CloudFormation Iceberg schema property.
543
+ */
544
+ private buildIcebergSchema;
545
+ /**
546
+ * Builds the CloudFormation Iceberg partition specification property.
547
+ */
548
+ private buildIcebergPartitionSpec;
549
+ /**
550
+ * Builds the CloudFormation Iceberg sort order property.
551
+ */
552
+ private buildIcebergSortOrder;
553
+ /**
554
+ * Builds the CloudFormation table properties map from key-value entries.
555
+ */
556
+ private buildTableProperties;
331
557
  }
332
558
  export {};