Class Catalog
- All Implemented Interfaces:
ICatalogRef,IEnvironmentAware,IResource,ICatalog,software.amazon.jsii.JsiiSerializable,software.constructs.IConstruct,software.constructs.IDependable
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.
Example:
Key key;
Catalog.encryptAccount(this, CatalogEncryptionOptions.builder()
.encryptionAtRest(DataCatalogEncryptionAtRest.kms(key))
.build());
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class software.amazon.jsii.JsiiObject
software.amazon.jsii.JsiiObject.InitializationModeNested classes/interfaces inherited from interface software.amazon.awscdk.services.glue.alpha.ICatalog
ICatalog.Jsii$DefaultNested classes/interfaces inherited from interface software.constructs.IConstruct
software.constructs.IConstruct.Jsii$DefaultNested classes/interfaces inherited from interface software.amazon.awscdk.IResource
IResource.Jsii$Default -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final String(experimental) Uniquely identifies this class. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedCatalog(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protectedCatalog(software.amazon.jsii.JsiiObjectRef objRef) Catalog(software.constructs.Construct scope, String id, CatalogProps props) -
Method Summary
Modifier and TypeMethodDescriptionstatic ICatalogencryptAccount(software.constructs.Construct scope, CatalogEncryptionOptions options) (experimental) Configure Data Catalog encryption for the implicit, account-wide catalog and return it.static ICatalogforAccount(software.constructs.Construct scope) (experimental) Obtain the implicit, account-wide Data Catalog.static ICatalogfromCatalogArn(software.constructs.Construct scope, String id, String catalogArn) (experimental) Import an existing catalog by its ARN.static ICatalogfromCatalogId(software.constructs.Construct scope, String id, String catalogId) (experimental) Import an existing catalog by its id.(experimental) The ARN of the catalog.(experimental) The id of the catalog (for the account-wide catalog, the AWS account id).Methods inherited from class software.amazon.awscdk.services.glue.alpha.CatalogBase
configureEncryption, getCatalogRef, getConnectionPasswordKey, getEncryptionKeyMethods inherited from class software.amazon.awscdk.Resource
applyCrossStackReferenceStrength, applyRemovalPolicy, generatePhysicalName, getEnv, getPhysicalName, getResourceArnAttribute, getResourceNameAttribute, getStack, isOwnedResource, isResource, withMethods inherited from class software.constructs.Construct
getNode, isConstruct, toStringMethods inherited from class software.amazon.jsii.JsiiObject
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSetMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface software.constructs.IConstruct
getNode, withMethods inherited from interface software.amazon.awscdk.interfaces.IEnvironmentAware
getEnvMethods inherited from interface software.amazon.awscdk.IResource
applyRemovalPolicy, getStackMethods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Field Details
-
PROPERTY_INJECTION_ID
(experimental) Uniquely identifies this class.
-
-
Constructor Details
-
Catalog
protected Catalog(software.amazon.jsii.JsiiObjectRef objRef) -
Catalog
protected Catalog(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) -
Catalog
@Stability(Experimental) public Catalog(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull CatalogProps props) - Parameters:
scope- This parameter is required.id- This parameter is required.props- This parameter is required.
-
-
Method Details
-
encryptAccount
@Stability(Experimental) @NotNull public static ICatalog encryptAccount(@NotNull software.constructs.Construct scope, @NotNull CatalogEncryptionOptions options) (experimental) Configure Data Catalog encryption for the implicit, account-wide catalog and return it.The account catalog's encryption is an account/region-wide setting, managed through the singleton
PutDataCatalogEncryptionSettingsAPI. 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 byCatalog.forAccount, or by aDatabasethat 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.
- Parameters:
scope- This parameter is required.options- This parameter is required.
-
forAccount
@Stability(Experimental) @NotNull public static ICatalog forAccount(@NotNull software.constructs.Construct scope) (experimental) Obtain the implicit, account-wide Data Catalog.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.- Parameters:
scope- This parameter is required.
-
fromCatalogArn
@Stability(Experimental) @NotNull public static ICatalog fromCatalogArn(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull String catalogArn) (experimental) Import an existing catalog by its ARN.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
CfnDataCatalogEncryptionSettingsresource targeting its id.- Parameters:
scope- This parameter is required.id- This parameter is required.catalogArn- This parameter is required.
-
fromCatalogId
@Stability(Experimental) @NotNull public static ICatalog fromCatalogId(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull String catalogId) (experimental) Import an existing catalog by its id.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
CfnDataCatalogEncryptionSettingsresource targeting its id.- Parameters:
scope- This parameter is required.id- This parameter is required.catalogId- This parameter is required.
-
getCatalogArn
(experimental) The ARN of the catalog.- Specified by:
getCatalogArnin interfaceICatalog- Specified by:
getCatalogArnin classCatalogBase
-
getCatalogId
(experimental) The id of the catalog (for the account-wide catalog, the AWS account id).- Specified by:
getCatalogIdin interfaceICatalog- Specified by:
getCatalogIdin classCatalogBase
-