Class Table
java.lang.Object
software.amazon.jsii.JsiiObject
software.constructs.Construct
software.amazon.awscdk.core.Construct
software.amazon.awscdk.core.Resource
software.amazon.awscdk.services.glue.Table
- All Implemented Interfaces:
IConstruct
,IDependable
,IResource
,ITable
,software.amazon.jsii.JsiiSerializable
,software.constructs.IConstruct
@Generated(value="jsii-pacmak/1.84.0 (build 5404dcf)",
date="2023-06-19T16:30:42.601Z")
@Stability(Experimental)
public class Table
extends Resource
implements ITable
(experimental) A Glue table.
Example:
Database myDatabase; Table.Builder.create(this, "MyTable") .database(myDatabase) .tableName("my_table") .columns(List.of(Column.builder() .name("col1") .type(Schema.STRING) .build())) .partitionKeys(List.of(Column.builder() .name("year") .type(Schema.SMALL_INT) .build(), Column.builder() .name("month") .type(Schema.SMALL_INT) .build())) .dataFormat(DataFormat.JSON) .build();
-
Nested Class Summary
Nested classes/interfaces inherited from class software.amazon.jsii.JsiiObject
software.amazon.jsii.JsiiObject.InitializationMode
Nested classes/interfaces inherited from interface software.amazon.awscdk.core.IConstruct
IConstruct.Jsii$Default
Nested classes/interfaces inherited from interface software.constructs.IConstruct
software.constructs.IConstruct.Jsii$Default
Nested classes/interfaces inherited from interface software.amazon.awscdk.core.IResource
IResource.Jsii$Default
Nested classes/interfaces inherited from interface software.amazon.awscdk.services.glue.ITable
ITable.Jsii$Default, ITable.Jsii$Proxy
-
Constructor Summary
ModifierConstructorDescriptionprotected
Table
(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protected
Table
(software.amazon.jsii.JsiiObjectRef objRef) Table
(software.constructs.Construct scope, String id, TableProps props) -
Method Summary
Modifier and TypeMethodDescriptionvoid
addPartitionIndex
(PartitionIndex index) (experimental) Add a partition index to the table.static ITable
fromTableArn
(software.constructs.Construct scope, String id, String tableArn) static ITable
fromTableAttributes
(software.constructs.Construct scope, String id, TableAttributes attrs) (experimental) Creates a Table construct that represents an external table.(experimental) S3 bucket in which the table's data resides.(experimental) This table's columns.(experimental) Indicates whether the table's data is compressed or not.(experimental) Database this table belongs to.(experimental) Format of this table's data files.(experimental) The type of encryption enabled for the table.(experimental) The KMS key used to secure the data ifencryption
is set toCSE-KMS
orSSE-KMS
.(experimental) This table's partition indexes.(experimental) This table's partition keys if the table is partitioned.(experimental) S3 Key Prefix under which this table's files are stored in S3.(experimental) ARN of this table.(experimental) Name of this table.grant
(IGrantable grantee, List<String> actions) (experimental) Grant the given identity custom permissions.grantRead
(IGrantable grantee) (experimental) Grant read permissions to the table and the underlying data stored in S3 to an IAM principal.grantReadWrite
(IGrantable grantee) (experimental) Grant read and write permissions to the table and the underlying data stored in S3 to an IAM principal.grantToUnderlyingResources
(IGrantable grantee, List<String> actions) (experimental) Grant the given identity custom permissions to ALL underlying resources of the table.grantWrite
(IGrantable grantee) (experimental) Grant write permissions to the table and the underlying data stored in S3 to an IAM principal.Methods inherited from class software.amazon.awscdk.core.Resource
applyRemovalPolicy, generatePhysicalName, getEnv, getPhysicalName, getResourceArnAttribute, getResourceNameAttribute, getStack, isResource
Methods inherited from class software.amazon.awscdk.core.Construct
getNode, isConstruct, onPrepare, onSynthesize, onValidate, prepare, synthesize, validate
Methods inherited from class software.constructs.Construct
toString
Methods inherited from class software.amazon.jsii.JsiiObject
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSet
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface software.amazon.awscdk.core.IConstruct
getNode
Methods inherited from interface software.amazon.awscdk.core.IResource
applyRemovalPolicy, getEnv, getStack
Methods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
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
-
fromTableArn
@Stability(Experimental) @NotNull public static ITable fromTableArn(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull String tableArn) - Parameters:
scope
- This parameter is required.id
- This parameter is required.tableArn
- This parameter is required.
-
fromTableAttributes
@Stability(Experimental) @NotNull public static ITable fromTableAttributes(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull TableAttributes attrs) (experimental) Creates a Table construct that represents an external table.- Parameters:
scope
- The scope creating construct (usuallythis
). This parameter is required.id
- The construct's id. This parameter is required.attrs
- Import attributes. This parameter is required.
-
addPartitionIndex
(experimental) Add a partition index to the table.You can have a maximum of 3 partition indexes to a table. Partition index keys must be a subset of the table's partition keys.
- Parameters:
index
- This parameter is required.- See Also:
-
grant
@Stability(Experimental) @NotNull public Grant grant(@NotNull IGrantable grantee, @NotNull List<String> actions) (experimental) Grant the given identity custom permissions.- Parameters:
grantee
- This parameter is required.actions
- This parameter is required.
-
grantRead
(experimental) Grant read permissions to the table and the underlying data stored in S3 to an IAM principal.- Parameters:
grantee
- the principal. This parameter is required.
-
grantReadWrite
(experimental) Grant read and write permissions to the table and the underlying data stored in S3 to an IAM principal.- Parameters:
grantee
- the principal. This parameter is required.
-
grantToUnderlyingResources
@Stability(Experimental) @NotNull public Grant grantToUnderlyingResources(@NotNull IGrantable grantee, @NotNull List<String> actions) (experimental) Grant the given identity custom permissions to ALL underlying resources of the table.Permissions will be granted to the catalog, the database, and the table.
- Parameters:
grantee
- This parameter is required.actions
- This parameter is required.
-
grantWrite
(experimental) Grant write permissions to the table and the underlying data stored in S3 to an IAM principal.- Parameters:
grantee
- the principal. This parameter is required.
-
getBucket
(experimental) S3 bucket in which the table's data resides. -
getColumns
(experimental) This table's columns. -
getCompressed
(experimental) Indicates whether the table's data is compressed or not. -
getDatabase
(experimental) Database this table belongs to. -
getDataFormat
(experimental) Format of this table's data files. -
getEncryption
(experimental) The type of encryption enabled for the table. -
getS3Prefix
(experimental) S3 Key Prefix under which this table's files are stored in S3. -
getTableArn
(experimental) ARN of this table.- Specified by:
getTableArn
in interfaceITable
-
getTableName
(experimental) Name of this table.- Specified by:
getTableName
in interfaceITable
-
getEncryptionKey
(experimental) The KMS key used to secure the data ifencryption
is set toCSE-KMS
orSSE-KMS
.Otherwise,
undefined
. -
getPartitionIndexes
(experimental) This table's partition indexes. -
getPartitionKeys
(experimental) This table's partition keys if the table is partitioned.
-