import type { Construct } from 'constructs'; import type { ICatalog } from './catalog'; import { type DatabaseReference, type IDatabaseRef } from './glue.generated'; import type { IResource } from '../../core'; import { RemovalPolicy, Resource } from '../../core'; export interface IDatabase extends IResource, IDatabaseRef { /** * The catalog this database belongs to. */ readonly catalog: ICatalog; /** * The ARN of the database. * * @attribute */ readonly databaseArn: string; /** * The name of the database. * * @attribute */ readonly databaseName: string; } export interface DatabaseProps { /** * The name of the database. * * @default - generated by CDK. */ readonly databaseName?: string; /** * The location of the database (for example, an HDFS path). * * @default undefined. This field is optional in AWS::Glue::Database DatabaseInput * @see https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-glue-database-databaseinput.html */ readonly locationUri?: string; /** * A description of the database. * * @default - no database description */ readonly description?: string; /** * The catalog in which the database will be placed. * * @default The default, account-wide catalog. */ readonly catalog?: ICatalog; /** * Policy to apply when the database is removed from the stack. * * A database is a container for tables and their metadata, so it is retained * by default to avoid accidental data loss when it is removed from a stack. * * @default RemovalPolicy.RETAIN */ readonly removalPolicy?: RemovalPolicy; } /** * A Glue database. */ export declare class Database extends Resource implements IDatabase { /** Uniquely identifies this class. */ static readonly PROPERTY_INJECTION_ID: string; static fromDatabaseArn(scope: Construct, id: string, databaseArn: string): IDatabase; /** * Location URI of this database. */ readonly locationUri?: string; private readonly _catalog?; private resource; constructor(scope: Construct, id: string, props?: DatabaseProps); /** * The catalog this database belongs to. * * Defaults to the implicit, account-wide catalog, materialized on first * access. */ get catalog(): ICatalog; get databaseName(): string; get databaseArn(): string; get databaseRef(): DatabaseReference; }