Class Table
java.lang.Object
software.amazon.jsii.JsiiObject
software.constructs.Construct
software.amazon.awscdk.Resource
software.amazon.awscdk.services.s3tables.alpha.Table
- All Implemented Interfaces:
IEnvironmentAware,IResource,ITable,software.amazon.jsii.JsiiSerializable,software.constructs.IConstruct,software.constructs.IDependable
@Generated(value="jsii-pacmak/1.126.0 (build 206d44b)",
date="2026-02-09T14:39:23.171Z")
@Stability(Experimental)
public class Table
extends Resource
implements ITable
(experimental) An S3 Table with helpers.
Example:
// Build a table
Table sampleTable = Table.Builder.create(scope, "ExampleTable")
.tableName("example_table")
.namespace(namespace)
.openTableFormat(OpenTableFormat.ICEBERG)
.withoutMetadata(true)
.build();
// Build a table with an Iceberg Schema
Table sampleTableWithSchema = Table.Builder.create(scope, "ExampleSchemaTable")
.tableName("example_table_with_schema")
.namespace(namespace)
.openTableFormat(OpenTableFormat.ICEBERG)
.icebergMetadata(IcebergMetadataProperty.builder()
.icebergSchema(IcebergSchemaProperty.builder()
.schemaFieldList(List.of(SchemaFieldProperty.builder()
.name("id")
.type("int")
.required(true)
.build(), SchemaFieldProperty.builder()
.name("name")
.type("string")
.build()))
.build())
.build())
.compaction(CompactionProperty.builder()
.status(Status.ENABLED)
.targetFileSizeMb(128)
.build())
.snapshotManagement(SnapshotManagementProperty.builder()
.status(Status.ENABLED)
.maxSnapshotAgeHours(48)
.minSnapshotsToKeep(5)
.build())
.build();
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class software.amazon.jsii.JsiiObject
software.amazon.jsii.JsiiObject.InitializationModeNested classes/interfaces inherited from interface software.constructs.IConstruct
software.constructs.IConstruct.Jsii$DefaultNested classes/interfaces inherited from interface software.amazon.awscdk.IResource
IResource.Jsii$DefaultNested classes/interfaces inherited from interface software.amazon.awscdk.services.s3tables.alpha.ITable
ITable.Jsii$Default, ITable.Jsii$Proxy -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final String(experimental) Uniquely identifies this class. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedTable(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protectedTable(software.amazon.jsii.JsiiObjectRef objRef) Table(software.constructs.Construct scope, String id, TableProps props) -
Method Summary
Modifier and TypeMethodDescriptionaddToResourcePolicy(PolicyStatement statement) (experimental) Adds a statement to the resource policy for a principal (i.e.static ITablefromTableAttributes(software.constructs.Construct scope, String id, TableAttributes attrs) (experimental) Defines a Table construct that represents an external table.protected Boolean(experimental) Indicates if a table resource policy should automatically created upon the first call toaddToResourcePolicy.(experimental) The namespace containing this table.(experimental) The unique Amazon Resource Name (arn) of this table.(experimental) The name of this table.(experimental) The resource policy for this table.grantRead(IGrantable identity) (experimental) [disable-awslint:no-grants].grantReadWrite(IGrantable identity) (experimental) [disable-awslint:no-grants].grantWrite(IGrantable identity) (experimental) [disable-awslint:no-grants].protected voidsetAutoCreatePolicy(Boolean value) (experimental) Indicates if a table resource policy should automatically created upon the first call toaddToResourcePolicy.static voidvalidateTableName(String tableName) (experimental) See https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-tables-buckets-naming.html.Methods inherited from class software.amazon.awscdk.Resource
applyRemovalPolicy, generatePhysicalName, getEnv, getPhysicalName, getResourceArnAttribute, getResourceNameAttribute, getStack, isOwnedResource, isResourceMethods inherited from class software.constructs.Construct
getNode, isConstruct, toStringMethods inherited from class software.amazon.jsii.JsiiObject
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSetMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface software.constructs.IConstruct
getNodeMethods inherited from interface software.amazon.awscdk.interfaces.IEnvironmentAware
getEnvMethods inherited from interface software.amazon.awscdk.IResource
applyRemovalPolicy, getStackMethods inherited from interface software.amazon.awscdk.services.s3tables.alpha.ITable
getAccount, getRegionMethods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Field Details
-
PROPERTY_INJECTION_ID
(experimental) Uniquely identifies this class.
-
-
Constructor Details
-
Table
protected Table(software.amazon.jsii.JsiiObjectRef objRef) -
Table
protected Table(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) -
Table
@Stability(Experimental) public Table(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull TableProps props) - Parameters:
scope- This parameter is required.id- This parameter is required.props- This parameter is required.
-
-
Method Details
-
fromTableAttributes
@Stability(Experimental) @NotNull public static ITable fromTableAttributes(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull TableAttributes attrs) (experimental) Defines a Table construct that represents an external table.- Parameters:
scope- The parent creating construct (usuallythis). This parameter is required.id- The construct's name. This parameter is required.attrs- ATableAttributesobject containing the table name and ARN. This parameter is required.
-
validateTableName
(experimental) See https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-tables-buckets-naming.html.- Parameters:
tableName- Name of the table. This parameter is required.
-
addToResourcePolicy
@Stability(Experimental) @NotNull public AddToResourcePolicyResult addToResourcePolicy(@NotNull PolicyStatement statement) (experimental) Adds a statement to the resource policy for a principal (i.e. account/role/service) to perform actions on this table.Note that the policy statement may or may not be added to the policy. For example, when an
ITableis created from an existing table, it's not possible to tell whether the table already has a policy attached, let alone to re-use that policy to add more statements to it. So it's safest to do nothing in these cases.- Specified by:
addToResourcePolicyin interfaceITable- Parameters:
statement- This parameter is required.- Returns:
- metadata about the execution of this method. If the policy
was not added, the value of
statementAddedwill befalse. You should always check this value to make sure that the operation was actually carried out. Otherwise, synthesis and deploy will terminate silently, which may be confusing.
-
grantRead
(experimental) [disable-awslint:no-grants]. -
grantReadWrite
(experimental) [disable-awslint:no-grants].- Specified by:
grantReadWritein interfaceITable- Parameters:
identity- This parameter is required.
-
grantWrite
(experimental) [disable-awslint:no-grants].- Specified by:
grantWritein interfaceITable- Parameters:
identity- This parameter is required.
-
getNamespace
(experimental) The namespace containing this table. -
getTableArn
(experimental) The unique Amazon Resource Name (arn) of this table.- Specified by:
getTableArnin interfaceITable
-
getTableName
(experimental) The name of this table.- Specified by:
getTableNamein interfaceITable
-
getTablePolicy
(experimental) The resource policy for this table. -
getAutoCreatePolicy
(experimental) Indicates if a table resource policy should automatically created upon the first call toaddToResourcePolicy. -
setAutoCreatePolicy
(experimental) Indicates if a table resource policy should automatically created upon the first call toaddToResourcePolicy.
-