Show / Hide Table of Contents

Class Catalog

A Glue Data Catalog.

Inheritance
object
Resource
CatalogBase
Catalog
Implements
ICatalog
IResource
ICatalogRef
IConstruct
IDependable
IEnvironmentAware
Inherited Members
CatalogBase.ConfigureEncryption(ICatalogEncryptionOptions)
CatalogBase.CatalogRef
CatalogBase.ConnectionPasswordKey
CatalogBase.EncryptionKey
Resource.IsOwnedResource(IConstruct)
Resource.IsResource(IConstruct)
Resource.ApplyCrossStackReferenceStrength(ReferenceStrength)
Resource.ApplyRemovalPolicy(RemovalPolicy)
Resource.GeneratePhysicalName()
Resource.GetResourceArnAttribute(string, IArnComponents)
Resource.GetResourceNameAttribute(string)
Resource.With(params IMixin[])
Resource.Env
Resource.PhysicalName
Resource.Stack
Namespace: Amazon.CDK.AWS.Glue
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class Catalog : CatalogBase, ICatalog, IResource, ICatalogRef, IConstruct, IDependable, IEnvironmentAware
Syntax (vb)
Public Class Catalog Inherits CatalogBase Implements ICatalog, IResource, ICatalogRef, IConstruct, IDependable, IEnvironmentAware
Remarks

Use Catalog.forAccount(scope) to obtain the implicit account-wide catalog, Catalog.encryptAccount(scope, options) to configure its Data Catalog encryption, or new Catalog(...) to create an AWS::Glue::Catalog resource.

ExampleMetadata: infused

Examples
Key key;

             Catalog.EncryptAccount(this, new CatalogEncryptionOptions {
                 EncryptionAtRest = DataCatalogEncryptionAtRest.Kms(key)
             });

Synopsis

Constructors

Catalog(Construct, string, ICatalogProps)

A Glue Data Catalog.

Properties

CatalogArn

The ARN of the catalog.

CatalogId

The id of the catalog (for the account-wide catalog, the AWS account id).

PROPERTY_INJECTION_ID

Uniquely identifies this class.

Methods

EncryptAccount(Construct, ICatalogEncryptionOptions)

Configure Data Catalog encryption for the implicit, account-wide catalog and return it.

ForAccount(Construct)

Obtain the implicit, account-wide Data Catalog.

FromCatalogArn(Construct, string, string)

Import an existing catalog by its ARN.

FromCatalogId(Construct, string, string)

Import an existing catalog by its id.

Constructors

Catalog(Construct, string, ICatalogProps)

A Glue Data Catalog.

public Catalog(Construct scope, string id, ICatalogProps props)
Parameters
scope Construct
id string
props ICatalogProps
Remarks

Use Catalog.forAccount(scope) to obtain the implicit account-wide catalog, Catalog.encryptAccount(scope, options) to configure its Data Catalog encryption, or new Catalog(...) to create an AWS::Glue::Catalog resource.

ExampleMetadata: infused

Examples
Key key;

             Catalog.EncryptAccount(this, new CatalogEncryptionOptions {
                 EncryptionAtRest = DataCatalogEncryptionAtRest.Kms(key)
             });

Properties

CatalogArn

The ARN of the catalog.

public override string CatalogArn { get; }
Property Value

string

Overrides
CatalogBase.CatalogArn
Remarks

Use Catalog.forAccount(scope) to obtain the implicit account-wide catalog, Catalog.encryptAccount(scope, options) to configure its Data Catalog encryption, or new Catalog(...) to create an AWS::Glue::Catalog resource.

ExampleMetadata: infused

CatalogId

The id of the catalog (for the account-wide catalog, the AWS account id).

public override string CatalogId { get; }
Property Value

string

Overrides
CatalogBase.CatalogId
Remarks

Use Catalog.forAccount(scope) to obtain the implicit account-wide catalog, Catalog.encryptAccount(scope, options) to configure its Data Catalog encryption, or new Catalog(...) to create an AWS::Glue::Catalog resource.

ExampleMetadata: infused

PROPERTY_INJECTION_ID

Uniquely identifies this class.

public static string PROPERTY_INJECTION_ID { get; }
Property Value

string

Remarks

Use Catalog.forAccount(scope) to obtain the implicit account-wide catalog, Catalog.encryptAccount(scope, options) to configure its Data Catalog encryption, or new Catalog(...) to create an AWS::Glue::Catalog resource.

ExampleMetadata: infused

Methods

EncryptAccount(Construct, ICatalogEncryptionOptions)

Configure Data Catalog encryption for the implicit, account-wide catalog and return it.

public static ICatalog EncryptAccount(Construct scope, ICatalogEncryptionOptions options)
Parameters
scope Construct
options ICatalogEncryptionOptions
Returns

ICatalog

Remarks

The account catalog's encryption is an account/region-wide setting, managed through the singleton PutDataCatalogEncryptionSettings API. Because encryption is fixed at construction, it must be configured before the account catalog is first used in the stack: calling this after the account catalog has already been materialized (for example by Catalog.forAccount, or by a Database that uses the account catalog) throws.

Configure it in exactly one stack. Configuring it from multiple stacks in the same account and region makes those stacks overwrite one another at deploy time, and the result is order-dependent. Unlike duplicate settings within a single stack (which CloudFormation rejects), this cross-stack conflict is not caught at synthesis time, because each stack synthesizes to its own template.

ForAccount(Construct)

Obtain the implicit, account-wide Data Catalog.

public static ICatalog ForAccount(Construct scope)
Parameters
scope Construct
Returns

ICatalog

Remarks

The account catalog is not a CloudFormation resource; it always exists. This returns a stack-scoped singleton, so repeated calls within the same stack return the same instance.

This returns the account catalog without managing its encryption. To configure Data Catalog encryption for the account, use Catalog.encryptAccount(scope, options) instead - it must be called before the account catalog is first used in the stack.

FromCatalogArn(Construct, string, string)

Import an existing catalog by its ARN.

public static ICatalog FromCatalogArn(Construct scope, string id, string catalogArn)
Parameters
scope Construct
id string
catalogArn string
Returns

ICatalog

Remarks

The ARN must be a Glue catalog ARN, either the account-wide catalog (arn:aws:glue:<region>:<account>:catalog, whose id is the account) or a named catalog (arn:aws:glue:<region>:<account>:catalog/<name>, whose id is the name).

The imported catalog is a pure identity handle and does not manage the catalog's encryption. To manage an existing catalog's Data Catalog encryption, add a CfnDataCatalogEncryptionSettings resource targeting its id.

FromCatalogId(Construct, string, string)

Import an existing catalog by its id.

public static ICatalog FromCatalogId(Construct scope, string id, string catalogId)
Parameters
scope Construct
id string
catalogId string
Returns

ICatalog

Remarks

The imported catalog is a pure identity handle and does not manage the catalog's encryption. To manage an existing catalog's Data Catalog encryption, add a CfnDataCatalogEncryptionSettings resource targeting its id.

Implements

ICatalog
IResource
ICatalogRef
Constructs.IConstruct
Constructs.IDependable
IEnvironmentAware
Back to top Generated by DocFX