class Database (construct)
| Language | Type name |
|---|---|
.NET | Amazon.CDK.AWS.Glue.Alpha.Database |
Go | github.com/aws/aws-cdk-go/awscdkgluealpha/v2#Database |
Java | software.amazon.awscdk.services.glue.alpha.Database |
Python | aws_cdk.aws_glue_alpha.Database |
TypeScript (source) | @aws-cdk/aws-glue-alpha » Database |
⚠️ Deprecated: undefined
Implements
IConstruct, IDependable, IResource, IEnvironment, IDatabase, IDatabase
A Glue database.
Example
new glue.Database(this, 'MyDatabase', {
databaseName: 'my_database',
description: 'my_database_description',
});
Initializer
new Database(scope: Construct, id: string, props?: DatabaseProps)
⚠️ Deprecated: undefined
Parameters
- scope
Construct - id
string - props
DatabaseProps
Construct Props
| Name | Type | Description |
|---|---|---|
| catalog? | ICatalog | The catalog in which the database will be placed. |
| database | string | The name of the database. |
| description? | string | A description of the database. |
| location | string | The location of the database (for example, an HDFS path). |
| removal | Removal | Policy to apply when the database is removed from the stack. |
catalog?
⚠️ Deprecated: undefined
Type:
ICatalog
(optional, default: The default, account-wide catalog.)
The catalog in which the database will be placed.
databaseName?
⚠️ Deprecated: undefined
Type:
string
(optional, default: generated by CDK.)
The name of the database.
description?
⚠️ Deprecated: undefined
Type:
string
(optional, default: no database description)
A description of the database.
locationUri?
⚠️ Deprecated: undefined
Type:
string
(optional, default: undefined. This field is optional in AWS::Glue::Database DatabaseInput)
The location of the database (for example, an HDFS path).
removalPolicy?
⚠️ Deprecated: undefined
Type:
Removal
(optional, default: RemovalPolicy.RETAIN)
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.
Properties
| Name | Type | Description |
|---|---|---|
| catalog | ICatalog | The catalog this database belongs to. |
| database | string | The ARN of the database. |
| database | string | The name of the database. |
| database | Database | A reference to a Database resource. |
| env | Resource | The environment this resource belongs to. |
| node | Node | The tree node. |
| stack | Stack | The stack in which this resource is defined. |
| location | string | Location URI of this database. |
| static PROPERTY_INJECTION_ID | string | Uniquely identifies this class. |
catalog
⚠️ Deprecated: undefined
Type:
ICatalog
The catalog this database belongs to.
Defaults to the implicit, account-wide catalog, materialized on first access.
databaseArn
⚠️ Deprecated: undefined
Type:
string
The ARN of the database.
databaseName
⚠️ Deprecated: undefined
Type:
string
The name of the database.
databaseRef
⚠️ Deprecated: undefined
Type:
Database
A reference to a Database resource.
env
⚠️ Deprecated: undefined
Type:
Resource
The environment this resource belongs to.
For resources that are created and managed in a Stack (those created by
creating new class instances like new Role(), new Bucket(), etc.), this
is always the same as the environment of the stack they belong to.
For referenced resources (those obtained from referencing methods like
Role.fromRoleArn(), Bucket.fromBucketName(), etc.), they might be
different than the stack they were imported into.
node
⚠️ Deprecated: undefined
Type:
Node
The tree node.
stack
⚠️ Deprecated: undefined
Type:
Stack
The stack in which this resource is defined.
locationUri?
⚠️ Deprecated: undefined
Type:
string
(optional)
Location URI of this database.
static PROPERTY_INJECTION_ID
⚠️ Deprecated: undefined
Type:
string
Uniquely identifies this class.
Methods
| Name | Description |
|---|---|
| apply | Override the cross-stack reference strength for this resource. |
| apply | Apply the given removal policy to this resource. |
| to | Returns a string representation of this construct. |
| with(...mixins) | Applies one or more mixins to this construct. |
| static from |
applyCrossStackReferenceStrength(strength)
public applyCrossStackReferenceStrength(strength: ReferenceStrength): void
⚠️ Deprecated: undefined
Parameters
- strength
Reference— - The reference strength to use for this resource.Strength
Override the cross-stack reference strength for this resource.
When set, any cross-stack reference to this resource will use the specified
mechanism instead of the global default determined by the
@aws-cdk/core:defaultCrossStackReferences context key. This is useful for
selectively weakening specific references to avoid the "deadly embrace" problem
without changing the app-wide default.
applyRemovalPolicy(policy)
public applyRemovalPolicy(policy: RemovalPolicy): void
⚠️ Deprecated: undefined
Parameters
- policy
RemovalPolicy
Apply the given removal policy to this resource.
The Removal Policy controls what happens to this resource when it stops being managed by CloudFormation, either because you've removed it from the CDK application or because you've made a change that requires the resource to be replaced.
The resource can be deleted (RemovalPolicy.DESTROY), or left in your AWS
account for data recovery and cleanup later (RemovalPolicy.RETAIN).
toString()
public toString(): string
⚠️ Deprecated: undefined
Returns
string
Returns a string representation of this construct.
with(...mixins)
public with(...mixins: IMixin[]): IConstruct
⚠️ Deprecated: undefined
Parameters
- mixins
IMixin
Returns
Applies one or more mixins to this construct.
Mixins are applied in order. The list of constructs is captured at the
start of the call, so constructs added by a mixin will not be visited.
Use multiple with() calls if subsequent mixins should apply to added
constructs.
static fromDatabaseArn(scope, id, databaseArn)
public static fromDatabaseArn(scope: Construct, id: string, databaseArn: string): IDatabase
⚠️ Deprecated: undefined
Parameters
- scope
Construct - id
string - databaseArn
string
Returns

.NET
Go
Java
Python
TypeScript (