Show / Hide Table of Contents

Class Database

(experimental) A Glue database.

Inheritance
object
Resource
Database
Implements
IDatabase
IResource
IConstruct
IDependable
Inherited Members
Resource.IsOwnedResource(IConstruct)
Resource.IsResource(IConstruct)
Resource.ApplyRemovalPolicy(RemovalPolicy)
Resource.GeneratePhysicalName()
Resource.GetResourceArnAttribute(string, IArnComponents)
Resource.GetResourceNameAttribute(string)
Resource.Env
Resource.PhysicalName
Resource.Stack
Namespace: Amazon.CDK.AWS.Glue.Alpha
Assembly: Amazon.CDK.AWS.Glue.Alpha.dll
Syntax (csharp)
public class Database : Resource, IDatabase, IResource, IConstruct, IDependable
Syntax (vb)
Public Class Database Inherits Resource Implements IDatabase, IResource, IConstruct, IDependable
Remarks

Stability: Experimental

ExampleMetadata: infused

Examples
using Amazon.CDK;
             using Amazon.CDK.AWS.Glue.Alpha;
             using Amazon.CDK.AWS.LakeFormation;

             Stack stack;
             string accountId;


             var tagKey = "aws";
             var tagValues = new [] { "dev" };

             var database = new Database(this, "Database");

             var table = new S3Table(this, "Table", new S3TableProps {
                 Database = database,
                 Columns = new [] { new Column {
                     Name = "col1",
                     Type = Schema.STRING
                 }, new Column {
                     Name = "col2",
                     Type = Schema.STRING
                 } },
                 DataFormat = DataFormat.CSV
             });

             var synthesizer = (DefaultStackSynthesizer)stack.Synthesizer;
             new CfnDataLakeSettings(this, "DataLakeSettings", new CfnDataLakeSettingsProps {
                 Admins = new [] { new DataLakePrincipalProperty {
                     DataLakePrincipalIdentifier = stack.FormatArn(new ArnComponents {
                         Service = "iam",
                         Resource = "role",
                         Region = "",
                         Account = accountId,
                         ResourceName = "Admin"
                     })
                 }, new DataLakePrincipalProperty {
                     // The CDK cloudformation execution role.
                     DataLakePrincipalIdentifier = synthesizer.CloudFormationExecutionRoleArn.Replace("${AWS::Partition}", "aws")
                 } }
             });

             var tag = new CfnTag(this, "Tag", new CfnTagProps {
                 CatalogId = accountId,
                 TagKey = tagKey,
                 TagValues = tagValues
             });

             var lfTagPairProperty = new LFTagPairProperty {
                 CatalogId = accountId,
                 TagKey = tagKey,
                 TagValues = tagValues
             };

             var tagAssociation = new CfnTagAssociation(this, "TagAssociation", new CfnTagAssociationProps {
                 LfTags = new [] { lfTagPairProperty },
                 Resource = new ResourceProperty {
                     TableWithColumns = new TableWithColumnsResourceProperty {
                         DatabaseName = database.DatabaseName,
                         ColumnNames = new [] { "col1", "col2" },
                         CatalogId = accountId,
                         Name = table.TableName
                     }
                 }
             });

             tagAssociation.Node.AddDependency(tag);
             tagAssociation.Node.AddDependency(table);

Synopsis

Constructors

Database(Construct, string, IDatabaseProps?)

(experimental) A Glue database.

Properties

CatalogArn

(experimental) ARN of the Glue catalog in which this database is stored.

CatalogId

(experimental) The catalog id of the database (usually, the AWS account id).

DatabaseArn

(experimental) ARN of this database.

DatabaseName

(experimental) Name of this database.

LocationUri

(experimental) Location URI of this database.

PROPERTY_INJECTION_ID

(experimental) Uniquely identifies this class.

Methods

FromDatabaseArn(Construct, string, string)

(experimental) A Glue database.

Constructors

Database(Construct, string, IDatabaseProps?)

(experimental) A Glue database.

public Database(Construct scope, string id, IDatabaseProps? props = null)
Parameters
scope Construct
id string
props IDatabaseProps
Remarks

Stability: Experimental

Properties

CatalogArn

(experimental) ARN of the Glue catalog in which this database is stored.

public virtual string CatalogArn { get; }
Property Value

string

Remarks

Stability: Experimental

CatalogId

(experimental) The catalog id of the database (usually, the AWS account id).

public virtual string CatalogId { get; }
Property Value

string

Remarks

Stability: Experimental

DatabaseArn

(experimental) ARN of this database.

public virtual string DatabaseArn { get; }
Property Value

string

Remarks

Stability: Experimental

DatabaseName

(experimental) Name of this database.

public virtual string DatabaseName { get; }
Property Value

string

Remarks

Stability: Experimental

LocationUri

(experimental) Location URI of this database.

public virtual string? LocationUri { get; }
Property Value

string

Remarks

Stability: Experimental

PROPERTY_INJECTION_ID

(experimental) Uniquely identifies this class.

public static string PROPERTY_INJECTION_ID { get; }
Property Value

string

Remarks

Stability: Experimental

Methods

FromDatabaseArn(Construct, string, string)

(experimental) A Glue database.

public static IDatabase FromDatabaseArn(Construct scope, string id, string databaseArn)
Parameters
scope Construct
id string
databaseArn string
Returns

IDatabase

Remarks

Stability: Experimental

Implements

IDatabase
IResource
Constructs.IConstruct
Constructs.IDependable
Back to top Generated by DocFX