@aws-cdk/aws-glue-alpha
Version:
The CDK Construct Library for AWS::Glue
66 lines (65 loc) • 2.02 kB
TypeScript
import { CfnTable } from 'aws-cdk-lib/aws-glue';
import * as iam from 'aws-cdk-lib/aws-iam';
import { Construct } from 'constructs';
import { IConnection } from './connection';
import { PartitionIndex, TableBase, TableBaseProps } from './table-base';
export interface ExternalTableProps extends TableBaseProps {
/**
* The connection the table will use when performing reads and writes.
*
* @default - No connection
*/
readonly connection: IConnection;
/**
* The data source location of the glue table, (e.g. `default_db_public_example` for Redshift).
*
* If this property is set, it will override both `bucket` and `s3Prefix`.
*
* @default - No outsourced data source location
*/
readonly externalDataLocation: string;
}
/**
* A Glue table that targets an external data location (e.g. A table in a Redshift Cluster).
* @resource AWS::Glue::Table
*/
export declare class ExternalTable extends TableBase {
/** Uniquely identifies this class. */
static readonly PROPERTY_INJECTION_ID: string;
/**
* Name of this table.
*/
readonly tableName: string;
/**
* ARN of this table.
*/
readonly tableArn: string;
/**
* The connection associated to this table
*/
readonly connection: IConnection;
/**
* This table's partition indexes.
*/
readonly partitionIndexes?: PartitionIndex[];
protected readonly tableResource: CfnTable;
constructor(scope: Construct, id: string, props: ExternalTableProps);
/**
* Grant read permissions to the table
*
* @param grantee the principal
*/
grantRead(grantee: iam.IGrantable): iam.Grant;
/**
* Grant write permissions to the table
*
* @param grantee the principal
*/
grantWrite(grantee: iam.IGrantable): iam.Grant;
/**
* Grant read and write permissions to the table
*
* @param grantee the principal
*/
grantReadWrite(grantee: iam.IGrantable): iam.Grant;
}