@aws-cdk/aws-glue-alpha 2.263.0-alpha.0 → 2.265.0-alpha.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (43) hide show
  1. package/.jsii +1537 -320
  2. package/.jsii.tabl.json.gz +0 -0
  3. package/.warnings.jsii.js +23 -1
  4. package/README.md +175 -1
  5. package/awslint.json +2 -1
  6. package/lib/catalog.d.ts +259 -0
  7. package/lib/catalog.js +424 -0
  8. package/lib/code.js +3 -3
  9. package/lib/connection.js +12 -4
  10. package/lib/data-format.js +5 -5
  11. package/lib/data-quality-ruleset.d.ts +7 -1
  12. package/lib/data-quality-ruleset.js +4 -3
  13. package/lib/database.d.ts +27 -15
  14. package/lib/database.js +45 -23
  15. package/lib/external-table.js +3 -3
  16. package/lib/index.d.ts +1 -0
  17. package/lib/index.js +2 -1
  18. package/lib/jobs/job.d.ts +5 -0
  19. package/lib/jobs/job.js +5 -3
  20. package/lib/jobs/pyspark-etl-job.js +1 -1
  21. package/lib/jobs/pyspark-flex-etl-job.js +3 -3
  22. package/lib/jobs/pyspark-streaming-job.js +1 -1
  23. package/lib/jobs/python-shell-job.js +1 -1
  24. package/lib/jobs/ray-job.js +1 -1
  25. package/lib/jobs/scala-spark-etl-job.js +1 -1
  26. package/lib/jobs/scala-spark-flex-etl-job.js +3 -3
  27. package/lib/jobs/scala-spark-streaming-job.js +1 -1
  28. package/lib/jobs/spark-job.js +1 -1
  29. package/lib/partition-projection.js +1 -1
  30. package/lib/private/secret-detection.d.ts +22 -0
  31. package/lib/private/secret-detection.js +42 -0
  32. package/lib/s3-table.d.ts +10 -0
  33. package/lib/s3-table.js +26 -4
  34. package/lib/schema.js +1 -1
  35. package/lib/security-configuration.d.ts +6 -0
  36. package/lib/security-configuration.js +4 -3
  37. package/lib/storage-parameter.js +1 -1
  38. package/lib/table-base.d.ts +23 -3
  39. package/lib/table-base.js +37 -7
  40. package/lib/table-deprecated.js +1 -1
  41. package/lib/triggers/trigger-options.js +1 -1
  42. package/lib/triggers/workflow.js +2 -2
  43. package/package.json +7 -7
Binary file
package/.warnings.jsii.js CHANGED
@@ -1,4 +1,26 @@
1
- const VALIDATORS = { _aws_cdk_aws_glue_alpha_ConnectionOptions: function _aws_cdk_aws_glue_alpha_ConnectionOptions(p) {
1
+ const VALIDATORS = { _aws_cdk_aws_glue_alpha_CatalogEncryptionOptions: function _aws_cdk_aws_glue_alpha_CatalogEncryptionOptions(p) {
2
+ if (p == null)
3
+ return;
4
+ visitedObjects.add(p);
5
+ try {
6
+ if (!visitedObjects.has(p.connectionPasswordEncryption))
7
+ module.exports._aws_cdk_aws_glue_alpha_ConnectionPasswordEncryption(p.connectionPasswordEncryption);
8
+ }
9
+ finally {
10
+ visitedObjects.delete(p);
11
+ }
12
+ }, _aws_cdk_aws_glue_alpha_CatalogProps: function _aws_cdk_aws_glue_alpha_CatalogProps(p) {
13
+ if (p == null)
14
+ return;
15
+ visitedObjects.add(p);
16
+ try {
17
+ if (!visitedObjects.has(p.connectionPasswordEncryption))
18
+ module.exports._aws_cdk_aws_glue_alpha_ConnectionPasswordEncryption(p.connectionPasswordEncryption);
19
+ }
20
+ finally {
21
+ visitedObjects.delete(p);
22
+ }
23
+ }, _aws_cdk_aws_glue_alpha_ConnectionOptions: function _aws_cdk_aws_glue_alpha_ConnectionOptions(p) {
2
24
  if (p == null)
3
25
  return;
4
26
  visitedObjects.add(p);
package/README.md CHANGED
@@ -190,7 +190,7 @@ new glue.PySparkStreamingJob(stack, 'PySparkStreamingJob', {
190
190
 
191
191
  The flexible execution class is appropriate for non-urgent jobs such as
192
192
  pre-production jobs, testing, and one-time data loads. Flexible jobs default
193
- to Glue version 3.0 and worker type `G_2X`. The following best practice
193
+ to Glue version 5.0 and worker type `G_2X`. The following best practice
194
194
  features are enabled by default:
195
195
  `—enable-metrics, —enable-spark-ui, —enable-continuous-cloudwatch-log`
196
196
 
@@ -458,6 +458,13 @@ new glue.Connection(this, "RdsConnection", {
458
458
  });
459
459
  ```
460
460
 
461
+ Connection `properties` are emitted verbatim into the CloudFormation template, so
462
+ any credential placed there in plaintext is stored in plaintext in the template,
463
+ `cdk.out`, and source control. Reference a Secrets Manager secret through
464
+ `SECRET_ID` (as above) instead. If a property key looks like a credential (for
465
+ example `PASSWORD`, `SECRET`, or `TOKEN`) and holds a plaintext literal, the
466
+ construct emits a synthesis-time warning.
467
+
461
468
  If you need to use a connection type that doesn't exist as a static member on `ConnectionType`, you can instantiate a `ConnectionType` object, e.g: `new glue.ConnectionType('NEW_TYPE')`.
462
469
 
463
470
  See [Adding a Connection to Your Data Store](https://docs.aws.amazon.com/glue/latest/dg/populate-add-connection.html) and [Connection Structure](https://docs.aws.amazon.com/glue/latest/dg/aws-glue-api-catalog-connections.html#aws-glue-api-catalog-connections-Connection) documentation for more information on the supported data stores and their configurations.
@@ -494,6 +501,158 @@ new glue.SecurityConfiguration(this, 'MySecurityConfiguration', {
494
501
 
495
502
  See [documentation](https://docs.aws.amazon.com/glue/latest/dg/encryption-security-configuration.html) for more info for Glue encrypting data written by Crawlers, Jobs, and Development Endpoints.
496
503
 
504
+ ## Catalog
505
+
506
+ The Glue Data Catalog is a persistent metadata store for your data assets. Every
507
+ account has an implicit, account-wide catalog that always exists, and you can also
508
+ create additional catalogs as `AWS::Glue::Catalog` resources (for example, to
509
+ federate to another metastore).
510
+
511
+ A catalog's encryption is fixed when the catalog is created: a catalog either
512
+ carries encryption settings or it does not. This keeps its configuration easy to
513
+ reason about — there are no mutation methods that change encryption after the fact.
514
+
515
+ ### The account-wide catalog
516
+
517
+ Use `Catalog.forAccount(scope)` to obtain the implicit account catalog. It is not
518
+ a CloudFormation resource — it always exists. Repeated calls within the same stack
519
+ return the same instance:
520
+
521
+ ```ts
522
+ const catalog = glue.Catalog.forAccount(this);
523
+ ```
524
+
525
+ To configure Data Catalog encryption for the account, use
526
+ `Catalog.encryptAccount(scope, options)`:
527
+
528
+ ```ts
529
+ declare const key: kms.Key;
530
+ glue.Catalog.encryptAccount(this, {
531
+ encryptionAtRest: glue.DataCatalogEncryptionAtRest.kms(key),
532
+ });
533
+ ```
534
+
535
+ Because encryption is fixed at construction, `encryptAccount` must be called
536
+ *before* the account catalog is first used in the stack — before any
537
+ `Catalog.forAccount(this)` call, and before any `Database` that uses the account
538
+ catalog. Calling it after the account catalog has been materialized throws.
539
+
540
+ The account catalog's encryption is an account- and region-wide setting, managed
541
+ through the singleton `PutDataCatalogEncryptionSettings` API. Configure it in
542
+ exactly one stack. Configuring it from multiple stacks in the same account and
543
+ region makes those stacks overwrite one another at deploy time, and the result is
544
+ order-dependent. Unlike duplicate settings within a single stack (which
545
+ CloudFormation rejects), this cross-stack conflict is not caught at synthesis
546
+ time, because each stack synthesizes to its own template.
547
+
548
+ ### Creating a catalog
549
+
550
+ To create a new catalog resource, use the `Catalog` constructor. Encryption is
551
+ configured through the `encryptionAtRest` and `connectionPasswordEncryption` props:
552
+
553
+ ```ts
554
+ new glue.Catalog(this, 'MyCatalog', {
555
+ catalogName: 'my-catalog',
556
+ description: 'my catalog description',
557
+ });
558
+ ```
559
+
560
+ ### Encryption at rest
561
+
562
+ Configure Data Catalog encryption at rest through the `encryptionAtRest` option
563
+ (on `Catalog.encryptAccount`, the `Catalog` constructor, or the import factories).
564
+ It accepts a `DataCatalogEncryptionAtRest` describing the mode:
565
+
566
+ ```ts
567
+ declare const key: kms.Key;
568
+
569
+ // SSE-KMS with a customer-managed key
570
+ glue.Catalog.encryptAccount(this, {
571
+ encryptionAtRest: glue.DataCatalogEncryptionAtRest.kms(key),
572
+ });
573
+
574
+ // SSE-KMS with an AWS-managed key (omit the key)
575
+ new glue.Catalog(this, 'ManagedKeyCatalog', {
576
+ catalogName: 'managed-key-catalog',
577
+ encryptionAtRest: glue.DataCatalogEncryptionAtRest.kms(),
578
+ });
579
+
580
+ // Disable encryption at rest
581
+ new glue.Catalog(this, 'PlaintextCatalog', {
582
+ catalogName: 'plaintext-catalog',
583
+ encryptionAtRest: glue.DataCatalogEncryptionAtRest.disabled(),
584
+ });
585
+ ```
586
+
587
+ When you use `SSE-KMS-WITH-SERVICE-ROLE`, AWS Glue accesses the KMS key through a
588
+ service role you provide. If you pass a customer-managed key, the role is
589
+ automatically granted the permissions it needs to encrypt and decrypt catalog data:
590
+
591
+ ```ts
592
+ import * as iam from 'aws-cdk-lib/aws-iam';
593
+ declare const key: kms.Key;
594
+ declare const role: iam.IRole;
595
+ glue.Catalog.encryptAccount(this, {
596
+ encryptionAtRest: glue.DataCatalogEncryptionAtRest.kmsWithServiceRole(role, key),
597
+ });
598
+ ```
599
+
600
+ The customer-managed key, when configured, is exposed on the catalog as
601
+ `encryptionKey` (and the connection-password key as `connectionPasswordKey`), so
602
+ you can reference it to grant additional access. It is undefined when encryption is
603
+ disabled or an AWS-managed key is used.
604
+
605
+ ### Connection password encryption
606
+
607
+ Independently from encryption at rest, the Data Catalog can encrypt the passwords
608
+ stored in connection properties. Configure it through the
609
+ `connectionPasswordEncryption` option:
610
+
611
+ ```ts
612
+ declare const key: kms.Key;
613
+ glue.Catalog.encryptAccount(this, {
614
+ connectionPasswordEncryption: {
615
+ kmsKey: key,
616
+ // Whether GetConnection/GetConnections return the password encrypted (default: true)
617
+ returnConnectionPasswordEncrypted: true,
618
+ },
619
+ });
620
+ ```
621
+
622
+ The two encryption blocks are independent: enabling one does not require the other,
623
+ and each may use a different KMS key. The customer-managed key for connection
624
+ passwords is exposed as `connectionPasswordKey`.
625
+
626
+ ### Importing a catalog
627
+
628
+ You can import an existing catalog by ARN or by id. An imported catalog is a pure
629
+ identity handle — it emits no resources and does not manage the catalog's
630
+ encryption:
631
+
632
+ ```ts
633
+ const byId = glue.Catalog.fromCatalogId(this, 'ById', 'my-catalog-id');
634
+ const byArn = glue.Catalog.fromCatalogArn(this, 'ByArn', 'arn:aws:glue:us-east-1:123456789012:catalog/my-catalog-id');
635
+ ```
636
+
637
+ To manage the Data Catalog encryption of a catalog you did not create in this
638
+ stack, add a `CfnDataCatalogEncryptionSettings` resource targeting its id
639
+ directly. Do this from exactly one stack: like the account catalog, a catalog has
640
+ a single encryption configuration, so two settings resources targeting the same id
641
+ race to overwrite one another at deploy time. Within a single stack this is caught
642
+ by CloudFormation template validation (E3019, duplicate primary identifiers);
643
+ across stacks it is not, since each stack synthesizes to its own template.
644
+
645
+ ```ts
646
+ import { CfnDataCatalogEncryptionSettings } from 'aws-cdk-lib/aws-glue';
647
+
648
+ new CfnDataCatalogEncryptionSettings(this, 'Encryption', {
649
+ catalogId: 'my-catalog-id',
650
+ dataCatalogEncryptionSettings: {
651
+ encryptionAtRest: { catalogEncryptionMode: 'SSE-KMS' },
652
+ },
653
+ });
654
+ ```
655
+
497
656
  ## Database
498
657
 
499
658
  A `Database` is a logical grouping of `Tables` in the Glue Catalog.
@@ -505,6 +664,19 @@ new glue.Database(this, 'MyDatabase', {
505
664
  });
506
665
  ```
507
666
 
667
+ Because a database is a container for tables and their metadata, it is retained
668
+ by default when removed from the stack, to avoid accidental data loss. Set
669
+ `removalPolicy` to `RemovalPolicy.DESTROY` to have it deleted instead:
670
+
671
+ ```ts
672
+ import { RemovalPolicy } from 'aws-cdk-lib';
673
+
674
+ new glue.Database(this, 'MyDatabase', {
675
+ databaseName: 'my_database',
676
+ removalPolicy: RemovalPolicy.DESTROY,
677
+ });
678
+ ```
679
+
508
680
  ## Table
509
681
 
510
682
  A Glue table describes a table of data in S3: its structure (column names and types), location of data (S3 objects with a common prefix in a S3 bucket), and format for the files (Json, Avro, Parquet, etc.):
@@ -877,6 +1049,8 @@ new glue.ExternalTable(this, 'MyTable', {
877
1049
 
878
1050
  ## [Encryption](https://docs.aws.amazon.com/athena/latest/ug/encryption.html)
879
1051
 
1052
+ When the table creates its own S3 bucket (i.e. you do not pass an explicit `bucket`), that bucket enforces SSL: a bucket policy denies any request made over plain HTTP. If you provide your own bucket, enabling `enforceSSL` on it is your responsibility.
1053
+
880
1054
  You can enable encryption on a Table's data:
881
1055
 
882
1056
  * [S3Managed](https://docs.aws.amazon.com/AmazonS3/latest/dev/UsingServerSideEncryption.html) - (default) Server side encryption (`SSE-S3`) with an Amazon S3-managed key.
package/awslint.json CHANGED
@@ -108,6 +108,7 @@
108
108
  "interface-extends-ref:@aws-cdk/aws-glue-alpha.IJob",
109
109
  "interface-extends-ref:@aws-cdk/aws-glue-alpha.ISecurityConfiguration",
110
110
  "interface-extends-ref:@aws-cdk/aws-glue-alpha.ITable",
111
- "interface-extends-ref:@aws-cdk/aws-glue-alpha.IWorkflow"
111
+ "interface-extends-ref:@aws-cdk/aws-glue-alpha.IWorkflow",
112
+ "prefer-ref-interface:@aws-cdk/aws-glue-alpha.DatabaseProps.catalog"
112
113
  ]
113
114
  }
@@ -0,0 +1,259 @@
1
+ import type { CatalogReference, ICatalogRef } from 'aws-cdk-lib/aws-glue';
2
+ import type * as iam from 'aws-cdk-lib/aws-iam';
3
+ import type * as kms from 'aws-cdk-lib/aws-kms';
4
+ import type { IResource } from 'aws-cdk-lib/core';
5
+ import { Resource } from 'aws-cdk-lib/core';
6
+ import type { Construct } from 'constructs';
7
+ /**
8
+ * The encryption-at-rest mode for a Glue Data Catalog.
9
+ *
10
+ * @see https://docs.aws.amazon.com/glue/latest/webapi/API_EncryptionAtRest.html#Glue-Type-EncryptionAtRest-CatalogEncryptionMode
11
+ */
12
+ export declare enum CatalogEncryptionMode {
13
+ /**
14
+ * Encryption at rest is disabled.
15
+ */
16
+ DISABLED = "DISABLED",
17
+ /**
18
+ * Server-side encryption (SSE) with an AWS KMS key.
19
+ */
20
+ SSE_KMS = "SSE-KMS",
21
+ /**
22
+ * Server-side encryption (SSE) with an AWS KMS key, using a service role that
23
+ * AWS Glue assumes to access the key on your behalf.
24
+ */
25
+ SSE_KMS_WITH_SERVICE_ROLE = "SSE-KMS-WITH-SERVICE-ROLE"
26
+ }
27
+ /**
28
+ * Encryption-at-rest configuration for a Glue Data Catalog.
29
+ *
30
+ * The Data Catalog encryption at rest and the connection password encryption
31
+ * are independent: enabling one does not require the other, and each may use a
32
+ * different KMS key.
33
+ *
34
+ * @see https://docs.aws.amazon.com/glue/latest/webapi/API_EncryptionAtRest.html
35
+ */
36
+ export declare class DataCatalogEncryptionAtRest {
37
+ /**
38
+ * Disable encryption at rest for the Data Catalog.
39
+ */
40
+ static disabled(): DataCatalogEncryptionAtRest;
41
+ /**
42
+ * Encrypt the Data Catalog at rest with an AWS KMS key.
43
+ *
44
+ * @param key the KMS key to use. If omitted, an AWS-managed key is used and
45
+ * the key is not exposed as a grantable resource.
46
+ */
47
+ static kms(key?: kms.IKey): DataCatalogEncryptionAtRest;
48
+ /**
49
+ * Encrypt the Data Catalog at rest with an AWS KMS key, accessed through a
50
+ * service role that AWS Glue assumes on your behalf.
51
+ *
52
+ * When a customer-managed `key` is provided, the `role` is automatically
53
+ * granted `kms:Encrypt`/`kms:Decrypt`/`kms:GenerateDataKey*` on it.
54
+ *
55
+ * @param role the service role that AWS Glue assumes to access the key.
56
+ * @param key the KMS key to use. If omitted, an AWS-managed key is used and
57
+ * the key is not exposed as a grantable resource.
58
+ */
59
+ static kmsWithServiceRole(role: iam.IRole, key?: kms.IKey): DataCatalogEncryptionAtRest;
60
+ /**
61
+ * The encryption mode.
62
+ */
63
+ readonly mode: CatalogEncryptionMode;
64
+ /**
65
+ * The customer-managed KMS key used for encryption at rest, if any.
66
+ */
67
+ readonly kmsKey?: kms.IKeyRef;
68
+ /**
69
+ * The service role that AWS Glue assumes to access the KMS key, if any.
70
+ */
71
+ readonly serviceRole?: iam.IRole;
72
+ private constructor();
73
+ }
74
+ /**
75
+ * Connection-password encryption configuration for a Glue Data Catalog.
76
+ *
77
+ * When enabled, the Data Catalog encrypts the password as part of
78
+ * `CreateConnection` or `UpdateConnection` and stores it in the
79
+ * `ENCRYPTED_PASSWORD` field of the connection properties. This is independent
80
+ * from catalog encryption at rest, and may use a different KMS key.
81
+ *
82
+ * @see https://docs.aws.amazon.com/glue/latest/webapi/API_ConnectionPasswordEncryption.html
83
+ */
84
+ export interface ConnectionPasswordEncryption {
85
+ /**
86
+ * The KMS key used to encrypt connection passwords.
87
+ *
88
+ * @default - an AWS-managed key is used and the key is not exposed as a grantable resource.
89
+ */
90
+ readonly kmsKey?: kms.IKeyRef;
91
+ /**
92
+ * Whether passwords remain encrypted in the responses of `GetConnection` and
93
+ * `GetConnections`. This takes effect independently from catalog encryption.
94
+ *
95
+ * @default true
96
+ */
97
+ readonly returnConnectionPasswordEncrypted?: boolean;
98
+ }
99
+ /**
100
+ * Encryption configuration for a Glue Data Catalog.
101
+ *
102
+ * Encryption is fixed at construction: a catalog either carries encryption
103
+ * settings or it does not, which keeps its configuration easy to reason about
104
+ * and avoids order-dependent mutation after the catalog is created.
105
+ */
106
+ export interface CatalogEncryptionOptions {
107
+ /**
108
+ * Encryption-at-rest configuration for the catalog.
109
+ *
110
+ * @default - encryption at rest is not managed by CDK (the catalog default applies)
111
+ */
112
+ readonly encryptionAtRest?: DataCatalogEncryptionAtRest;
113
+ /**
114
+ * Connection-password encryption configuration for the catalog.
115
+ *
116
+ * @default - connection-password encryption is not managed by CDK
117
+ */
118
+ readonly connectionPasswordEncryption?: ConnectionPasswordEncryption;
119
+ }
120
+ /**
121
+ * A Glue Data Catalog, either the implicit account-wide catalog or one created
122
+ * as an `AWS::Glue::Catalog` resource.
123
+ */
124
+ export interface ICatalog extends IResource, ICatalogRef {
125
+ /**
126
+ * The id of the catalog (for the account-wide catalog, the AWS account id).
127
+ * @attribute
128
+ */
129
+ readonly catalogId: string;
130
+ /**
131
+ * The ARN of the catalog.
132
+ * @attribute
133
+ */
134
+ readonly catalogArn: string;
135
+ /**
136
+ * The customer-managed KMS key used for the catalog's encryption at rest, if
137
+ * one was configured.
138
+ *
139
+ * Undefined when encryption is disabled or an AWS-managed key is used. Grant
140
+ * access to it via `KeyGrants`, e.g.
141
+ * `if (catalog.encryptionKey) { KeyGrants.fromKey(catalog.encryptionKey).encrypt(grantee); }`.
142
+ */
143
+ readonly encryptionKey?: kms.IKeyRef;
144
+ /**
145
+ * The customer-managed KMS key used to encrypt connection passwords, if one
146
+ * was configured.
147
+ *
148
+ * Undefined when password encryption uses an AWS-managed key or is not
149
+ * configured. Grant access to it via `KeyGrants`, e.g.
150
+ * `if (catalog.connectionPasswordKey) { KeyGrants.fromKey(catalog.connectionPasswordKey).encrypt(grantee); }`.
151
+ */
152
+ readonly connectionPasswordKey?: kms.IKeyRef;
153
+ }
154
+ /**
155
+ * Base class for all `ICatalog` implementations. Materializes the single
156
+ * `CfnDataCatalogEncryptionSettings` resource (targeting its own `catalogId`)
157
+ * from the encryption options supplied at construction. Encryption is fixed at
158
+ * construction, so a catalog either carries settings or it does not.
159
+ */
160
+ export declare abstract class CatalogBase extends Resource implements ICatalog {
161
+ abstract readonly catalogId: string;
162
+ abstract readonly catalogArn: string;
163
+ private _encryptionKey?;
164
+ private _connectionPasswordKey?;
165
+ get encryptionKey(): kms.IKeyRef | undefined;
166
+ get connectionPasswordKey(): kms.IKeyRef | undefined;
167
+ get catalogRef(): CatalogReference;
168
+ /**
169
+ * Emit the catalog's encryption settings from the options fixed at
170
+ * construction. Subclasses call this once, after `catalogId`/`catalogArn` are
171
+ * assigned. When neither block is configured, no resource is emitted, avoiding
172
+ * an empty settings resource that would reset the catalog on deploy.
173
+ */
174
+ protected configureEncryption(options: CatalogEncryptionOptions): void;
175
+ }
176
+ /**
177
+ * Construction properties for a `Catalog`.
178
+ */
179
+ export interface CatalogProps extends CatalogEncryptionOptions {
180
+ /**
181
+ * The name of the catalog.
182
+ */
183
+ readonly catalogName: string;
184
+ /**
185
+ * A description of the catalog.
186
+ *
187
+ * @default - no description
188
+ */
189
+ readonly description?: string;
190
+ }
191
+ /**
192
+ * A Glue Data Catalog.
193
+ *
194
+ * Use `Catalog.forAccount(scope)` to obtain the implicit account-wide catalog,
195
+ * `Catalog.encryptAccount(scope, options)` to configure its Data Catalog
196
+ * encryption, or `new Catalog(...)` to create an `AWS::Glue::Catalog` resource.
197
+ */
198
+ export declare class Catalog extends CatalogBase {
199
+ /** Uniquely identifies this class. */
200
+ static readonly PROPERTY_INJECTION_ID: string;
201
+ /**
202
+ * Obtain the implicit, account-wide Data Catalog.
203
+ *
204
+ * The account catalog is not a CloudFormation resource; it always exists. This
205
+ * returns a stack-scoped singleton, so repeated calls within the same stack
206
+ * return the same instance.
207
+ *
208
+ * This returns the account catalog without managing its encryption. To
209
+ * configure Data Catalog encryption for the account, use
210
+ * `Catalog.encryptAccount(scope, options)` instead - it must be called before
211
+ * the account catalog is first used in the stack.
212
+ */
213
+ static forAccount(scope: Construct): ICatalog;
214
+ /**
215
+ * Configure Data Catalog encryption for the implicit, account-wide catalog and
216
+ * return it.
217
+ *
218
+ * The account catalog's encryption is an account/region-wide setting, managed
219
+ * through the singleton `PutDataCatalogEncryptionSettings` API. Because
220
+ * encryption is fixed at construction, it must be configured before the
221
+ * account catalog is first used in the stack: calling this after the account
222
+ * catalog has already been materialized (for example by `Catalog.forAccount`,
223
+ * or by a `Database` that uses the account catalog) throws.
224
+ *
225
+ * Configure it in exactly one stack. Configuring it from multiple stacks in the
226
+ * same account and region makes those stacks overwrite one another at deploy
227
+ * time, and the result is order-dependent. Unlike duplicate settings within a
228
+ * single stack (which CloudFormation rejects), this cross-stack conflict is not
229
+ * caught at synthesis time, because each stack synthesizes to its own template.
230
+ */
231
+ static encryptAccount(scope: Construct, options: CatalogEncryptionOptions): ICatalog;
232
+ /**
233
+ * Import an existing catalog by its ARN.
234
+ *
235
+ * The ARN must be a Glue catalog ARN, either the account-wide catalog
236
+ * (`arn:aws:glue:<region>:<account>:catalog`, whose id is the account) or a
237
+ * named catalog (`arn:aws:glue:<region>:<account>:catalog/<name>`, whose id is
238
+ * the name).
239
+ *
240
+ * The imported catalog is a pure identity handle and does not manage the
241
+ * catalog's encryption. To manage an existing catalog's Data Catalog
242
+ * encryption, add a `CfnDataCatalogEncryptionSettings` resource targeting its
243
+ * id.
244
+ */
245
+ static fromCatalogArn(scope: Construct, id: string, catalogArn: string): ICatalog;
246
+ /**
247
+ * Import an existing catalog by its id.
248
+ *
249
+ * The imported catalog is a pure identity handle and does not manage the
250
+ * catalog's encryption. To manage an existing catalog's Data Catalog
251
+ * encryption, add a `CfnDataCatalogEncryptionSettings` resource targeting its
252
+ * id.
253
+ */
254
+ static fromCatalogId(scope: Construct, id: string, catalogId: string): ICatalog;
255
+ readonly catalogId: string;
256
+ readonly catalogArn: string;
257
+ private readonly resource;
258
+ constructor(scope: Construct, id: string, props: CatalogProps);
259
+ }