@go-to-k/cdkd 0.144.0 → 0.145.1
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.
- package/dist/cli.js +424 -14
- package/dist/cli.js.map +1 -1
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -27405,7 +27405,17 @@ var EFSProvider = class {
|
|
|
27405
27405
|
* Membership grows as each follow-up PR lands. Keep alphabetical
|
|
27406
27406
|
* to minimize merge conflicts when multiple follow-ups race.
|
|
27407
27407
|
*/
|
|
27408
|
-
const SUPPORTED_UPDATE_DESTINATIONS = new Set([
|
|
27408
|
+
const SUPPORTED_UPDATE_DESTINATIONS = new Set([
|
|
27409
|
+
"AmazonOpenSearchServerlessDestinationConfiguration",
|
|
27410
|
+
"AmazonopensearchserviceDestinationConfiguration",
|
|
27411
|
+
"ElasticsearchDestinationConfiguration",
|
|
27412
|
+
"ExtendedS3DestinationConfiguration",
|
|
27413
|
+
"HttpEndpointDestinationConfiguration",
|
|
27414
|
+
"IcebergDestinationConfiguration",
|
|
27415
|
+
"RedshiftDestinationConfiguration",
|
|
27416
|
+
"SnowflakeDestinationConfiguration",
|
|
27417
|
+
"SplunkDestinationConfiguration"
|
|
27418
|
+
]);
|
|
27409
27419
|
/**
|
|
27410
27420
|
* SDK Provider for AWS Kinesis Firehose resources
|
|
27411
27421
|
*
|
|
@@ -27609,18 +27619,85 @@ var FirehoseProvider = class {
|
|
|
27609
27619
|
* `CloudWatchLoggingOptions`, `Username` / `Password` /
|
|
27610
27620
|
* `RoleARN` / `ClusterJDBCURL`.
|
|
27611
27621
|
*
|
|
27612
|
-
*
|
|
27613
|
-
* `
|
|
27614
|
-
* `
|
|
27615
|
-
* `
|
|
27616
|
-
* `
|
|
27617
|
-
* `
|
|
27618
|
-
* `
|
|
27619
|
-
* `
|
|
27620
|
-
*
|
|
27621
|
-
*
|
|
27622
|
-
*
|
|
27623
|
-
*
|
|
27622
|
+
* - `SplunkDestinationConfiguration` (#549) — same flow as
|
|
27623
|
+
* Redshift: `DescribeDeliveryStream` recovers VersionId +
|
|
27624
|
+
* DestinationId, then `UpdateDestinationCommand` issues the
|
|
27625
|
+
* diff with a `SplunkDestinationUpdate` payload produced by
|
|
27626
|
+
* {@link mapSplunkConfigToUpdate}. Handles `HECEndpoint`,
|
|
27627
|
+
* `HECEndpointType`, `HECToken`,
|
|
27628
|
+
* `HECAcknowledgmentTimeoutInSeconds`, `RetryOptions`,
|
|
27629
|
+
* `S3BackupMode`, `S3Configuration` → `S3Update`,
|
|
27630
|
+
* `ProcessingConfiguration`, `CloudWatchLoggingOptions`,
|
|
27631
|
+
* `BufferingHints`, `SecretsManagerConfiguration`. Splunk has
|
|
27632
|
+
* no S3 backup destination shape (no `S3BackupConfiguration`
|
|
27633
|
+
* field) — unlike Redshift / ExtendedS3.
|
|
27634
|
+
*
|
|
27635
|
+
* - `AmazonopensearchserviceDestinationConfiguration` (#549) —
|
|
27636
|
+
* `AmazonopensearchserviceDestinationUpdate` payload produced
|
|
27637
|
+
* by {@link mapAmazonopensearchserviceConfigToUpdate}. Handles
|
|
27638
|
+
* `RoleARN`, `DomainARN`, `ClusterEndpoint`, `IndexName`,
|
|
27639
|
+
* `TypeName`, `IndexRotationPeriod`, `BufferingHints`,
|
|
27640
|
+
* `RetryOptions`, `S3Configuration` → `S3Update`,
|
|
27641
|
+
* `ProcessingConfiguration`, `CloudWatchLoggingOptions`,
|
|
27642
|
+
* `DocumentIdOptions`. `VpcConfiguration` is read-only on
|
|
27643
|
+
* AWS-side Update — diffs to that field will not be forwarded
|
|
27644
|
+
* and surface on the next `cdkd drift` run.
|
|
27645
|
+
*
|
|
27646
|
+
* - `AmazonOpenSearchServerlessDestinationConfiguration` (#549) —
|
|
27647
|
+
* `AmazonOpenSearchServerlessDestinationUpdate` payload
|
|
27648
|
+
* produced by {@link mapAmazonOpenSearchServerlessConfigToUpdate}.
|
|
27649
|
+
* Simpler than the service variant — `RoleARN`,
|
|
27650
|
+
* `CollectionEndpoint`, `IndexName`, `BufferingHints`,
|
|
27651
|
+
* `RetryOptions`, `S3Configuration` → `S3Update`,
|
|
27652
|
+
* `ProcessingConfiguration`, `CloudWatchLoggingOptions`.
|
|
27653
|
+
*
|
|
27654
|
+
* - `HttpEndpointDestinationConfiguration` (#549) —
|
|
27655
|
+
* `HttpEndpointDestinationUpdate` payload produced by
|
|
27656
|
+
* {@link mapHttpEndpointConfigToUpdate}. Handles
|
|
27657
|
+
* `EndpointConfiguration`, `BufferingHints`,
|
|
27658
|
+
* `CloudWatchLoggingOptions`, `RequestConfiguration`,
|
|
27659
|
+
* `ProcessingConfiguration`, `RoleARN`, `RetryOptions`,
|
|
27660
|
+
* `S3BackupMode`, `S3Configuration` → `S3Update`,
|
|
27661
|
+
* `SecretsManagerConfiguration`.
|
|
27662
|
+
*
|
|
27663
|
+
* - `ElasticsearchDestinationConfiguration` (#549) —
|
|
27664
|
+
* `ElasticsearchDestinationUpdate` payload produced by
|
|
27665
|
+
* {@link mapElasticsearchConfigToUpdate}. Legacy variant of
|
|
27666
|
+
* `Amazonopensearchservice*`; same field shape sans
|
|
27667
|
+
* `VpcConfiguration` (also read-only on Update).
|
|
27668
|
+
*
|
|
27669
|
+
* - `IcebergDestinationConfiguration` (#549) —
|
|
27670
|
+
* `IcebergDestinationUpdate` payload produced by
|
|
27671
|
+
* {@link mapIcebergConfigToUpdate}. Handles
|
|
27672
|
+
* `DestinationTableConfigurationList`,
|
|
27673
|
+
* `SchemaEvolutionConfiguration`,
|
|
27674
|
+
* `TableCreationConfiguration`, `BufferingHints`,
|
|
27675
|
+
* `CloudWatchLoggingOptions`, `ProcessingConfiguration`,
|
|
27676
|
+
* `S3BackupMode`, `RetryOptions`, `RoleARN`, `AppendOnly`,
|
|
27677
|
+
* `CatalogConfiguration`, `S3Configuration`. **Quirk**: the
|
|
27678
|
+
* SDK Update shape's S3 field is named `S3Configuration` (full
|
|
27679
|
+
* `S3DestinationConfiguration` shape), NOT `S3Update` — unlike
|
|
27680
|
+
* every other destination type. The reverse-mapper forwards it
|
|
27681
|
+
* verbatim without renaming.
|
|
27682
|
+
*
|
|
27683
|
+
* - `SnowflakeDestinationConfiguration` (#549) —
|
|
27684
|
+
* `SnowflakeDestinationUpdate` payload produced by
|
|
27685
|
+
* {@link mapSnowflakeConfigToUpdate}. Handles many connector
|
|
27686
|
+
* credentials (`AccountUrl` / `PrivateKey` / `KeyPassphrase` /
|
|
27687
|
+
* `User` / `Database` / `Schema` / `Table` /
|
|
27688
|
+
* `SnowflakeRoleConfiguration`) plus the standard suite
|
|
27689
|
+
* (`DataLoadingOption`, `MetaDataColumnName`,
|
|
27690
|
+
* `ContentColumnName`, `CloudWatchLoggingOptions`,
|
|
27691
|
+
* `ProcessingConfiguration`, `RoleARN`, `RetryOptions`,
|
|
27692
|
+
* `S3BackupMode`, `S3Configuration` → `S3Update`,
|
|
27693
|
+
* `SecretsManagerConfiguration`, `BufferingHints`).
|
|
27694
|
+
*
|
|
27695
|
+
* The legacy `S3DestinationConfiguration` (deprecated by AWS in
|
|
27696
|
+
* favor of `ExtendedS3DestinationConfiguration`) stays rejected
|
|
27697
|
+
* with a tightened error — CDK constructs always emit Extended.
|
|
27698
|
+
* Templates that still pin the legacy shape should migrate to
|
|
27699
|
+
* Extended; in-place update of the deprecated shape isn't a
|
|
27700
|
+
* priority follow-up.
|
|
27624
27701
|
*
|
|
27625
27702
|
* Destination-type SWITCHES (e.g. ExtendedS3 → Redshift) are immutable
|
|
27626
27703
|
* on AWS; cdkd surfaces `ResourceUpdateNotSupportedError` so the caller
|
|
@@ -27648,6 +27725,41 @@ var FirehoseProvider = class {
|
|
|
27648
27725
|
const prevDest = previousProperties[activeDest] ?? {};
|
|
27649
27726
|
if (JSON.stringify(nextDest) !== JSON.stringify(prevDest)) await this.applyRedshiftDestinationUpdate(physicalId, nextDest);
|
|
27650
27727
|
}
|
|
27728
|
+
if (activeDest === "SplunkDestinationConfiguration") {
|
|
27729
|
+
const nextDest = properties[activeDest] ?? {};
|
|
27730
|
+
const prevDest = previousProperties[activeDest] ?? {};
|
|
27731
|
+
if (JSON.stringify(nextDest) !== JSON.stringify(prevDest)) await this.applySplunkDestinationUpdate(physicalId, nextDest);
|
|
27732
|
+
}
|
|
27733
|
+
if (activeDest === "AmazonopensearchserviceDestinationConfiguration") {
|
|
27734
|
+
const nextDest = properties[activeDest] ?? {};
|
|
27735
|
+
const prevDest = previousProperties[activeDest] ?? {};
|
|
27736
|
+
if (JSON.stringify(nextDest) !== JSON.stringify(prevDest)) await this.applyAmazonopensearchserviceDestinationUpdate(physicalId, nextDest);
|
|
27737
|
+
}
|
|
27738
|
+
if (activeDest === "AmazonOpenSearchServerlessDestinationConfiguration") {
|
|
27739
|
+
const nextDest = properties[activeDest] ?? {};
|
|
27740
|
+
const prevDest = previousProperties[activeDest] ?? {};
|
|
27741
|
+
if (JSON.stringify(nextDest) !== JSON.stringify(prevDest)) await this.applyAmazonOpenSearchServerlessDestinationUpdate(physicalId, nextDest);
|
|
27742
|
+
}
|
|
27743
|
+
if (activeDest === "HttpEndpointDestinationConfiguration") {
|
|
27744
|
+
const nextDest = properties[activeDest] ?? {};
|
|
27745
|
+
const prevDest = previousProperties[activeDest] ?? {};
|
|
27746
|
+
if (JSON.stringify(nextDest) !== JSON.stringify(prevDest)) await this.applyHttpEndpointDestinationUpdate(physicalId, nextDest);
|
|
27747
|
+
}
|
|
27748
|
+
if (activeDest === "ElasticsearchDestinationConfiguration") {
|
|
27749
|
+
const nextDest = properties[activeDest] ?? {};
|
|
27750
|
+
const prevDest = previousProperties[activeDest] ?? {};
|
|
27751
|
+
if (JSON.stringify(nextDest) !== JSON.stringify(prevDest)) await this.applyElasticsearchDestinationUpdate(physicalId, nextDest);
|
|
27752
|
+
}
|
|
27753
|
+
if (activeDest === "IcebergDestinationConfiguration") {
|
|
27754
|
+
const nextDest = properties[activeDest] ?? {};
|
|
27755
|
+
const prevDest = previousProperties[activeDest] ?? {};
|
|
27756
|
+
if (JSON.stringify(nextDest) !== JSON.stringify(prevDest)) await this.applyIcebergDestinationUpdate(physicalId, nextDest);
|
|
27757
|
+
}
|
|
27758
|
+
if (activeDest === "SnowflakeDestinationConfiguration") {
|
|
27759
|
+
const nextDest = properties[activeDest] ?? {};
|
|
27760
|
+
const prevDest = previousProperties[activeDest] ?? {};
|
|
27761
|
+
if (JSON.stringify(nextDest) !== JSON.stringify(prevDest)) await this.applySnowflakeDestinationUpdate(physicalId, nextDest);
|
|
27762
|
+
}
|
|
27651
27763
|
const desc = (await this.getClient().send(new DescribeDeliveryStreamCommand({ DeliveryStreamName: physicalId }))).DeliveryStreamDescription;
|
|
27652
27764
|
return {
|
|
27653
27765
|
physicalId,
|
|
@@ -27889,6 +28001,304 @@ var FirehoseProvider = class {
|
|
|
27889
28001
|
return result;
|
|
27890
28002
|
}
|
|
27891
28003
|
/**
|
|
28004
|
+
* Recover `CurrentDeliveryStreamVersionId` + `DestinationId` from
|
|
28005
|
+
* `DescribeDeliveryStream` and issue `UpdateDestination` with the new
|
|
28006
|
+
* Splunk shape. The reverse-mapper at
|
|
28007
|
+
* {@link mapSplunkConfigToUpdate} produces the
|
|
28008
|
+
* `SplunkDestinationUpdate` payload — only fields present in the
|
|
28009
|
+
* input are forwarded so omitted CFn keys don't clobber AWS-side
|
|
28010
|
+
* state. Mirrors {@link applyRedshiftDestinationUpdate} (#549).
|
|
28011
|
+
*/
|
|
28012
|
+
async applySplunkDestinationUpdate(physicalId, nextConfig) {
|
|
28013
|
+
const desc = (await this.getClient().send(new DescribeDeliveryStreamCommand({ DeliveryStreamName: physicalId }))).DeliveryStreamDescription;
|
|
28014
|
+
const currentVersionId = desc?.VersionId;
|
|
28015
|
+
const destinationId = (desc?.Destinations?.[0])?.DestinationId;
|
|
28016
|
+
if (!currentVersionId || !destinationId) throw new ProvisioningError(`DescribeDeliveryStream for ${physicalId} did not return VersionId or DestinationId; UpdateDestination cannot proceed.`, "AWS::KinesisFirehose::DeliveryStream", physicalId);
|
|
28017
|
+
await this.getClient().send(new UpdateDestinationCommand({
|
|
28018
|
+
DeliveryStreamName: physicalId,
|
|
28019
|
+
CurrentDeliveryStreamVersionId: currentVersionId,
|
|
28020
|
+
DestinationId: destinationId,
|
|
28021
|
+
SplunkDestinationUpdate: this.mapSplunkConfigToUpdate(nextConfig)
|
|
28022
|
+
}));
|
|
28023
|
+
}
|
|
28024
|
+
/**
|
|
28025
|
+
* Map CFn `SplunkDestinationConfiguration` to the
|
|
28026
|
+
* `SplunkDestinationUpdate` shape used by AWS
|
|
28027
|
+
* `UpdateDestinationCommand` (#549). Every field is `!== undefined`
|
|
28028
|
+
* gated so omitted CFn keys do not clobber AWS-side state. The CFn
|
|
28029
|
+
* `S3Configuration` field is mapped through
|
|
28030
|
+
* {@link mapS3ConfigToUpdate} into the SDK-side `S3Update` slot.
|
|
28031
|
+
* Splunk has no `S3BackupConfiguration` field (unlike Redshift /
|
|
28032
|
+
* ExtendedS3).
|
|
28033
|
+
*/
|
|
28034
|
+
mapSplunkConfigToUpdate(config) {
|
|
28035
|
+
const result = {};
|
|
28036
|
+
if (config["HECEndpoint"] !== void 0) result.HECEndpoint = config["HECEndpoint"];
|
|
28037
|
+
if (config["HECEndpointType"] !== void 0) result.HECEndpointType = config["HECEndpointType"];
|
|
28038
|
+
if (config["HECToken"] !== void 0) result.HECToken = config["HECToken"];
|
|
28039
|
+
if (config["HECAcknowledgmentTimeoutInSeconds"] !== void 0) result.HECAcknowledgmentTimeoutInSeconds = config["HECAcknowledgmentTimeoutInSeconds"];
|
|
28040
|
+
if (config["RetryOptions"] !== void 0) result.RetryOptions = config["RetryOptions"];
|
|
28041
|
+
if (config["S3BackupMode"] !== void 0) result.S3BackupMode = config["S3BackupMode"];
|
|
28042
|
+
if (config["S3Configuration"] !== void 0) result.S3Update = this.mapS3ConfigToUpdate(config["S3Configuration"]);
|
|
28043
|
+
if (config["ProcessingConfiguration"] !== void 0) result.ProcessingConfiguration = config["ProcessingConfiguration"];
|
|
28044
|
+
if (config["CloudWatchLoggingOptions"] !== void 0) result.CloudWatchLoggingOptions = config["CloudWatchLoggingOptions"];
|
|
28045
|
+
if (config["BufferingHints"] !== void 0) result.BufferingHints = config["BufferingHints"];
|
|
28046
|
+
if (config["SecretsManagerConfiguration"] !== void 0) result.SecretsManagerConfiguration = config["SecretsManagerConfiguration"];
|
|
28047
|
+
return result;
|
|
28048
|
+
}
|
|
28049
|
+
/**
|
|
28050
|
+
* Apply UpdateDestination for `AmazonopensearchserviceDestinationConfiguration` (#549).
|
|
28051
|
+
* Mirrors {@link applyRedshiftDestinationUpdate}.
|
|
28052
|
+
*/
|
|
28053
|
+
async applyAmazonopensearchserviceDestinationUpdate(physicalId, nextConfig) {
|
|
28054
|
+
const desc = (await this.getClient().send(new DescribeDeliveryStreamCommand({ DeliveryStreamName: physicalId }))).DeliveryStreamDescription;
|
|
28055
|
+
const currentVersionId = desc?.VersionId;
|
|
28056
|
+
const destinationId = desc?.Destinations?.[0]?.DestinationId;
|
|
28057
|
+
if (!currentVersionId || !destinationId) throw new ProvisioningError(`DescribeDeliveryStream for ${physicalId} did not return VersionId or DestinationId; UpdateDestination cannot proceed.`, "AWS::KinesisFirehose::DeliveryStream", physicalId);
|
|
28058
|
+
await this.getClient().send(new UpdateDestinationCommand({
|
|
28059
|
+
DeliveryStreamName: physicalId,
|
|
28060
|
+
CurrentDeliveryStreamVersionId: currentVersionId,
|
|
28061
|
+
DestinationId: destinationId,
|
|
28062
|
+
AmazonopensearchserviceDestinationUpdate: this.mapAmazonopensearchserviceConfigToUpdate(nextConfig)
|
|
28063
|
+
}));
|
|
28064
|
+
}
|
|
28065
|
+
/**
|
|
28066
|
+
* Map CFn `AmazonopensearchserviceDestinationConfiguration` to the
|
|
28067
|
+
* `AmazonopensearchserviceDestinationUpdate` shape (#549). Every field
|
|
28068
|
+
* `!== undefined` gated. CFn `S3Configuration` → SDK `S3Update`.
|
|
28069
|
+
* `VpcConfiguration` is intentionally NOT included — the SDK Update
|
|
28070
|
+
* shape has no field for it (AWS treats Vpc placement as immutable
|
|
28071
|
+
* post-create). VpcConfiguration-only diffs will surface on the next
|
|
28072
|
+
* `cdkd drift` run if the user re-applies a different Vpc on the
|
|
28073
|
+
* console side.
|
|
28074
|
+
*/
|
|
28075
|
+
mapAmazonopensearchserviceConfigToUpdate(config) {
|
|
28076
|
+
const result = {};
|
|
28077
|
+
const roleArn = config["RoleARN"] ?? config["RoleArn"];
|
|
28078
|
+
if (roleArn !== void 0) result.RoleARN = roleArn;
|
|
28079
|
+
const domainArn = config["DomainARN"] ?? config["DomainArn"];
|
|
28080
|
+
if (domainArn !== void 0) result.DomainARN = domainArn;
|
|
28081
|
+
if (config["ClusterEndpoint"] !== void 0) result.ClusterEndpoint = config["ClusterEndpoint"];
|
|
28082
|
+
if (config["IndexName"] !== void 0) result.IndexName = config["IndexName"];
|
|
28083
|
+
if (config["TypeName"] !== void 0) result.TypeName = config["TypeName"];
|
|
28084
|
+
if (config["IndexRotationPeriod"] !== void 0) result.IndexRotationPeriod = config["IndexRotationPeriod"];
|
|
28085
|
+
if (config["BufferingHints"] !== void 0) result.BufferingHints = config["BufferingHints"];
|
|
28086
|
+
if (config["RetryOptions"] !== void 0) result.RetryOptions = config["RetryOptions"];
|
|
28087
|
+
if (config["S3Configuration"] !== void 0) result.S3Update = this.mapS3ConfigToUpdate(config["S3Configuration"]);
|
|
28088
|
+
if (config["ProcessingConfiguration"] !== void 0) result.ProcessingConfiguration = config["ProcessingConfiguration"];
|
|
28089
|
+
if (config["CloudWatchLoggingOptions"] !== void 0) result.CloudWatchLoggingOptions = config["CloudWatchLoggingOptions"];
|
|
28090
|
+
if (config["DocumentIdOptions"] !== void 0) result.DocumentIdOptions = config["DocumentIdOptions"];
|
|
28091
|
+
return result;
|
|
28092
|
+
}
|
|
28093
|
+
/**
|
|
28094
|
+
* Apply UpdateDestination for `AmazonOpenSearchServerlessDestinationConfiguration` (#549).
|
|
28095
|
+
* Mirrors {@link applyRedshiftDestinationUpdate}.
|
|
28096
|
+
*/
|
|
28097
|
+
async applyAmazonOpenSearchServerlessDestinationUpdate(physicalId, nextConfig) {
|
|
28098
|
+
const desc = (await this.getClient().send(new DescribeDeliveryStreamCommand({ DeliveryStreamName: physicalId }))).DeliveryStreamDescription;
|
|
28099
|
+
const currentVersionId = desc?.VersionId;
|
|
28100
|
+
const destinationId = desc?.Destinations?.[0]?.DestinationId;
|
|
28101
|
+
if (!currentVersionId || !destinationId) throw new ProvisioningError(`DescribeDeliveryStream for ${physicalId} did not return VersionId or DestinationId; UpdateDestination cannot proceed.`, "AWS::KinesisFirehose::DeliveryStream", physicalId);
|
|
28102
|
+
await this.getClient().send(new UpdateDestinationCommand({
|
|
28103
|
+
DeliveryStreamName: physicalId,
|
|
28104
|
+
CurrentDeliveryStreamVersionId: currentVersionId,
|
|
28105
|
+
DestinationId: destinationId,
|
|
28106
|
+
AmazonOpenSearchServerlessDestinationUpdate: this.mapAmazonOpenSearchServerlessConfigToUpdate(nextConfig)
|
|
28107
|
+
}));
|
|
28108
|
+
}
|
|
28109
|
+
/**
|
|
28110
|
+
* Map CFn `AmazonOpenSearchServerlessDestinationConfiguration` to the
|
|
28111
|
+
* `AmazonOpenSearchServerlessDestinationUpdate` shape (#549). Every
|
|
28112
|
+
* field `!== undefined` gated. CFn `S3Configuration` → SDK `S3Update`.
|
|
28113
|
+
* Simpler than the service variant — no VpcConfiguration / TypeName /
|
|
28114
|
+
* IndexRotationPeriod / DocumentIdOptions.
|
|
28115
|
+
*/
|
|
28116
|
+
mapAmazonOpenSearchServerlessConfigToUpdate(config) {
|
|
28117
|
+
const result = {};
|
|
28118
|
+
const roleArn = config["RoleARN"] ?? config["RoleArn"];
|
|
28119
|
+
if (roleArn !== void 0) result.RoleARN = roleArn;
|
|
28120
|
+
if (config["CollectionEndpoint"] !== void 0) result.CollectionEndpoint = config["CollectionEndpoint"];
|
|
28121
|
+
if (config["IndexName"] !== void 0) result.IndexName = config["IndexName"];
|
|
28122
|
+
if (config["BufferingHints"] !== void 0) result.BufferingHints = config["BufferingHints"];
|
|
28123
|
+
if (config["RetryOptions"] !== void 0) result.RetryOptions = config["RetryOptions"];
|
|
28124
|
+
if (config["S3Configuration"] !== void 0) result.S3Update = this.mapS3ConfigToUpdate(config["S3Configuration"]);
|
|
28125
|
+
if (config["ProcessingConfiguration"] !== void 0) result.ProcessingConfiguration = config["ProcessingConfiguration"];
|
|
28126
|
+
if (config["CloudWatchLoggingOptions"] !== void 0) result.CloudWatchLoggingOptions = config["CloudWatchLoggingOptions"];
|
|
28127
|
+
return result;
|
|
28128
|
+
}
|
|
28129
|
+
/**
|
|
28130
|
+
* Apply UpdateDestination for `HttpEndpointDestinationConfiguration` (#549).
|
|
28131
|
+
* Mirrors {@link applyRedshiftDestinationUpdate}.
|
|
28132
|
+
*/
|
|
28133
|
+
async applyHttpEndpointDestinationUpdate(physicalId, nextConfig) {
|
|
28134
|
+
const desc = (await this.getClient().send(new DescribeDeliveryStreamCommand({ DeliveryStreamName: physicalId }))).DeliveryStreamDescription;
|
|
28135
|
+
const currentVersionId = desc?.VersionId;
|
|
28136
|
+
const destinationId = desc?.Destinations?.[0]?.DestinationId;
|
|
28137
|
+
if (!currentVersionId || !destinationId) throw new ProvisioningError(`DescribeDeliveryStream for ${physicalId} did not return VersionId or DestinationId; UpdateDestination cannot proceed.`, "AWS::KinesisFirehose::DeliveryStream", physicalId);
|
|
28138
|
+
await this.getClient().send(new UpdateDestinationCommand({
|
|
28139
|
+
DeliveryStreamName: physicalId,
|
|
28140
|
+
CurrentDeliveryStreamVersionId: currentVersionId,
|
|
28141
|
+
DestinationId: destinationId,
|
|
28142
|
+
HttpEndpointDestinationUpdate: this.mapHttpEndpointConfigToUpdate(nextConfig)
|
|
28143
|
+
}));
|
|
28144
|
+
}
|
|
28145
|
+
/**
|
|
28146
|
+
* Map CFn `HttpEndpointDestinationConfiguration` to the
|
|
28147
|
+
* `HttpEndpointDestinationUpdate` shape (#549). Every field
|
|
28148
|
+
* `!== undefined` gated. CFn `S3Configuration` → SDK `S3Update`.
|
|
28149
|
+
* `EndpointConfiguration` (Url / Name / AccessKey) and
|
|
28150
|
+
* `SecretsManagerConfiguration` are both pass-through (AWS accepts
|
|
28151
|
+
* either auth mode on Update).
|
|
28152
|
+
*/
|
|
28153
|
+
mapHttpEndpointConfigToUpdate(config) {
|
|
28154
|
+
const result = {};
|
|
28155
|
+
if (config["EndpointConfiguration"] !== void 0) result.EndpointConfiguration = config["EndpointConfiguration"];
|
|
28156
|
+
if (config["BufferingHints"] !== void 0) result.BufferingHints = config["BufferingHints"];
|
|
28157
|
+
if (config["CloudWatchLoggingOptions"] !== void 0) result.CloudWatchLoggingOptions = config["CloudWatchLoggingOptions"];
|
|
28158
|
+
if (config["RequestConfiguration"] !== void 0) result.RequestConfiguration = config["RequestConfiguration"];
|
|
28159
|
+
if (config["ProcessingConfiguration"] !== void 0) result.ProcessingConfiguration = config["ProcessingConfiguration"];
|
|
28160
|
+
const roleArn = config["RoleARN"] ?? config["RoleArn"];
|
|
28161
|
+
if (roleArn !== void 0) result.RoleARN = roleArn;
|
|
28162
|
+
if (config["RetryOptions"] !== void 0) result.RetryOptions = config["RetryOptions"];
|
|
28163
|
+
if (config["S3BackupMode"] !== void 0) result.S3BackupMode = config["S3BackupMode"];
|
|
28164
|
+
if (config["S3Configuration"] !== void 0) result.S3Update = this.mapS3ConfigToUpdate(config["S3Configuration"]);
|
|
28165
|
+
if (config["SecretsManagerConfiguration"] !== void 0) result.SecretsManagerConfiguration = config["SecretsManagerConfiguration"];
|
|
28166
|
+
return result;
|
|
28167
|
+
}
|
|
28168
|
+
/**
|
|
28169
|
+
* Apply UpdateDestination for `ElasticsearchDestinationConfiguration` (#549).
|
|
28170
|
+
* Mirrors {@link applyRedshiftDestinationUpdate}. Elasticsearch is the
|
|
28171
|
+
* legacy variant — AWS still accepts it for stacks that pre-date the
|
|
28172
|
+
* Amazonopensearchservice rename.
|
|
28173
|
+
*/
|
|
28174
|
+
async applyElasticsearchDestinationUpdate(physicalId, nextConfig) {
|
|
28175
|
+
const desc = (await this.getClient().send(new DescribeDeliveryStreamCommand({ DeliveryStreamName: physicalId }))).DeliveryStreamDescription;
|
|
28176
|
+
const currentVersionId = desc?.VersionId;
|
|
28177
|
+
const destinationId = desc?.Destinations?.[0]?.DestinationId;
|
|
28178
|
+
if (!currentVersionId || !destinationId) throw new ProvisioningError(`DescribeDeliveryStream for ${physicalId} did not return VersionId or DestinationId; UpdateDestination cannot proceed.`, "AWS::KinesisFirehose::DeliveryStream", physicalId);
|
|
28179
|
+
await this.getClient().send(new UpdateDestinationCommand({
|
|
28180
|
+
DeliveryStreamName: physicalId,
|
|
28181
|
+
CurrentDeliveryStreamVersionId: currentVersionId,
|
|
28182
|
+
DestinationId: destinationId,
|
|
28183
|
+
ElasticsearchDestinationUpdate: this.mapElasticsearchConfigToUpdate(nextConfig)
|
|
28184
|
+
}));
|
|
28185
|
+
}
|
|
28186
|
+
/**
|
|
28187
|
+
* Map CFn `ElasticsearchDestinationConfiguration` to the
|
|
28188
|
+
* `ElasticsearchDestinationUpdate` shape (#549). Every field
|
|
28189
|
+
* `!== undefined` gated. CFn `S3Configuration` → SDK `S3Update`.
|
|
28190
|
+
* Field set mirrors {@link mapAmazonopensearchserviceConfigToUpdate}
|
|
28191
|
+
* — Elasticsearch is the legacy variant of the same destination.
|
|
28192
|
+
*/
|
|
28193
|
+
mapElasticsearchConfigToUpdate(config) {
|
|
28194
|
+
const result = {};
|
|
28195
|
+
const roleArn = config["RoleARN"] ?? config["RoleArn"];
|
|
28196
|
+
if (roleArn !== void 0) result.RoleARN = roleArn;
|
|
28197
|
+
const domainArn = config["DomainARN"] ?? config["DomainArn"];
|
|
28198
|
+
if (domainArn !== void 0) result.DomainARN = domainArn;
|
|
28199
|
+
if (config["ClusterEndpoint"] !== void 0) result.ClusterEndpoint = config["ClusterEndpoint"];
|
|
28200
|
+
if (config["IndexName"] !== void 0) result.IndexName = config["IndexName"];
|
|
28201
|
+
if (config["TypeName"] !== void 0) result.TypeName = config["TypeName"];
|
|
28202
|
+
if (config["IndexRotationPeriod"] !== void 0) result.IndexRotationPeriod = config["IndexRotationPeriod"];
|
|
28203
|
+
if (config["BufferingHints"] !== void 0) result.BufferingHints = config["BufferingHints"];
|
|
28204
|
+
if (config["RetryOptions"] !== void 0) result.RetryOptions = config["RetryOptions"];
|
|
28205
|
+
if (config["S3Configuration"] !== void 0) result.S3Update = this.mapS3ConfigToUpdate(config["S3Configuration"]);
|
|
28206
|
+
if (config["ProcessingConfiguration"] !== void 0) result.ProcessingConfiguration = config["ProcessingConfiguration"];
|
|
28207
|
+
if (config["CloudWatchLoggingOptions"] !== void 0) result.CloudWatchLoggingOptions = config["CloudWatchLoggingOptions"];
|
|
28208
|
+
if (config["DocumentIdOptions"] !== void 0) result.DocumentIdOptions = config["DocumentIdOptions"];
|
|
28209
|
+
return result;
|
|
28210
|
+
}
|
|
28211
|
+
/**
|
|
28212
|
+
* Apply UpdateDestination for `IcebergDestinationConfiguration` (#549).
|
|
28213
|
+
* Mirrors {@link applyRedshiftDestinationUpdate}.
|
|
28214
|
+
*/
|
|
28215
|
+
async applyIcebergDestinationUpdate(physicalId, nextConfig) {
|
|
28216
|
+
const desc = (await this.getClient().send(new DescribeDeliveryStreamCommand({ DeliveryStreamName: physicalId }))).DeliveryStreamDescription;
|
|
28217
|
+
const currentVersionId = desc?.VersionId;
|
|
28218
|
+
const destinationId = desc?.Destinations?.[0]?.DestinationId;
|
|
28219
|
+
if (!currentVersionId || !destinationId) throw new ProvisioningError(`DescribeDeliveryStream for ${physicalId} did not return VersionId or DestinationId; UpdateDestination cannot proceed.`, "AWS::KinesisFirehose::DeliveryStream", physicalId);
|
|
28220
|
+
await this.getClient().send(new UpdateDestinationCommand({
|
|
28221
|
+
DeliveryStreamName: physicalId,
|
|
28222
|
+
CurrentDeliveryStreamVersionId: currentVersionId,
|
|
28223
|
+
DestinationId: destinationId,
|
|
28224
|
+
IcebergDestinationUpdate: this.mapIcebergConfigToUpdate(nextConfig)
|
|
28225
|
+
}));
|
|
28226
|
+
}
|
|
28227
|
+
/**
|
|
28228
|
+
* Map CFn `IcebergDestinationConfiguration` to the
|
|
28229
|
+
* `IcebergDestinationUpdate` shape (#549). Every field
|
|
28230
|
+
* `!== undefined` gated. **Quirk vs every other destination**: the
|
|
28231
|
+
* SDK Update shape's S3 field is `S3Configuration` (a full
|
|
28232
|
+
* `S3DestinationConfiguration`), NOT `S3Update`. Iceberg is a newer
|
|
28233
|
+
* destination type and AWS chose to keep the field name aligned with
|
|
28234
|
+
* the create shape; this reverse-mapper forwards it verbatim.
|
|
28235
|
+
*/
|
|
28236
|
+
mapIcebergConfigToUpdate(config) {
|
|
28237
|
+
const result = {};
|
|
28238
|
+
if (config["DestinationTableConfigurationList"] !== void 0) result.DestinationTableConfigurationList = config["DestinationTableConfigurationList"];
|
|
28239
|
+
if (config["SchemaEvolutionConfiguration"] !== void 0) result.SchemaEvolutionConfiguration = config["SchemaEvolutionConfiguration"];
|
|
28240
|
+
if (config["TableCreationConfiguration"] !== void 0) result.TableCreationConfiguration = config["TableCreationConfiguration"];
|
|
28241
|
+
if (config["BufferingHints"] !== void 0) result.BufferingHints = config["BufferingHints"];
|
|
28242
|
+
if (config["CloudWatchLoggingOptions"] !== void 0) result.CloudWatchLoggingOptions = config["CloudWatchLoggingOptions"];
|
|
28243
|
+
if (config["ProcessingConfiguration"] !== void 0) result.ProcessingConfiguration = config["ProcessingConfiguration"];
|
|
28244
|
+
if (config["S3BackupMode"] !== void 0) result.S3BackupMode = config["S3BackupMode"];
|
|
28245
|
+
if (config["RetryOptions"] !== void 0) result.RetryOptions = config["RetryOptions"];
|
|
28246
|
+
const roleArn = config["RoleARN"] ?? config["RoleArn"];
|
|
28247
|
+
if (roleArn !== void 0) result.RoleARN = roleArn;
|
|
28248
|
+
if (config["AppendOnly"] !== void 0) result.AppendOnly = config["AppendOnly"];
|
|
28249
|
+
if (config["CatalogConfiguration"] !== void 0) result.CatalogConfiguration = config["CatalogConfiguration"];
|
|
28250
|
+
if (config["S3Configuration"] !== void 0) result.S3Configuration = this.mapS3DestinationConfiguration(config["S3Configuration"]);
|
|
28251
|
+
return result;
|
|
28252
|
+
}
|
|
28253
|
+
/**
|
|
28254
|
+
* Apply UpdateDestination for `SnowflakeDestinationConfiguration` (#549).
|
|
28255
|
+
* Mirrors {@link applyRedshiftDestinationUpdate}.
|
|
28256
|
+
*/
|
|
28257
|
+
async applySnowflakeDestinationUpdate(physicalId, nextConfig) {
|
|
28258
|
+
const desc = (await this.getClient().send(new DescribeDeliveryStreamCommand({ DeliveryStreamName: physicalId }))).DeliveryStreamDescription;
|
|
28259
|
+
const currentVersionId = desc?.VersionId;
|
|
28260
|
+
const destinationId = desc?.Destinations?.[0]?.DestinationId;
|
|
28261
|
+
if (!currentVersionId || !destinationId) throw new ProvisioningError(`DescribeDeliveryStream for ${physicalId} did not return VersionId or DestinationId; UpdateDestination cannot proceed.`, "AWS::KinesisFirehose::DeliveryStream", physicalId);
|
|
28262
|
+
await this.getClient().send(new UpdateDestinationCommand({
|
|
28263
|
+
DeliveryStreamName: physicalId,
|
|
28264
|
+
CurrentDeliveryStreamVersionId: currentVersionId,
|
|
28265
|
+
DestinationId: destinationId,
|
|
28266
|
+
SnowflakeDestinationUpdate: this.mapSnowflakeConfigToUpdate(nextConfig)
|
|
28267
|
+
}));
|
|
28268
|
+
}
|
|
28269
|
+
/**
|
|
28270
|
+
* Map CFn `SnowflakeDestinationConfiguration` to the
|
|
28271
|
+
* `SnowflakeDestinationUpdate` shape (#549). Every field
|
|
28272
|
+
* `!== undefined` gated. CFn `S3Configuration` → SDK `S3Update`.
|
|
28273
|
+
* Snowflake carries many connector-side credential / target-table
|
|
28274
|
+
* fields (`AccountUrl` / `PrivateKey` / `KeyPassphrase` / `User` /
|
|
28275
|
+
* `Database` / `Schema` / `Table`) all pass-through.
|
|
28276
|
+
*/
|
|
28277
|
+
mapSnowflakeConfigToUpdate(config) {
|
|
28278
|
+
const result = {};
|
|
28279
|
+
if (config["AccountUrl"] !== void 0) result.AccountUrl = config["AccountUrl"];
|
|
28280
|
+
if (config["PrivateKey"] !== void 0) result.PrivateKey = config["PrivateKey"];
|
|
28281
|
+
if (config["KeyPassphrase"] !== void 0) result.KeyPassphrase = config["KeyPassphrase"];
|
|
28282
|
+
if (config["User"] !== void 0) result.User = config["User"];
|
|
28283
|
+
if (config["Database"] !== void 0) result.Database = config["Database"];
|
|
28284
|
+
if (config["Schema"] !== void 0) result.Schema = config["Schema"];
|
|
28285
|
+
if (config["Table"] !== void 0) result.Table = config["Table"];
|
|
28286
|
+
if (config["SnowflakeRoleConfiguration"] !== void 0) result.SnowflakeRoleConfiguration = config["SnowflakeRoleConfiguration"];
|
|
28287
|
+
if (config["DataLoadingOption"] !== void 0) result.DataLoadingOption = config["DataLoadingOption"];
|
|
28288
|
+
if (config["MetaDataColumnName"] !== void 0) result.MetaDataColumnName = config["MetaDataColumnName"];
|
|
28289
|
+
if (config["ContentColumnName"] !== void 0) result.ContentColumnName = config["ContentColumnName"];
|
|
28290
|
+
if (config["CloudWatchLoggingOptions"] !== void 0) result.CloudWatchLoggingOptions = config["CloudWatchLoggingOptions"];
|
|
28291
|
+
if (config["ProcessingConfiguration"] !== void 0) result.ProcessingConfiguration = config["ProcessingConfiguration"];
|
|
28292
|
+
const roleArn = config["RoleARN"] ?? config["RoleArn"];
|
|
28293
|
+
if (roleArn !== void 0) result.RoleARN = roleArn;
|
|
28294
|
+
if (config["RetryOptions"] !== void 0) result.RetryOptions = config["RetryOptions"];
|
|
28295
|
+
if (config["S3BackupMode"] !== void 0) result.S3BackupMode = config["S3BackupMode"];
|
|
28296
|
+
if (config["S3Configuration"] !== void 0) result.S3Update = this.mapS3ConfigToUpdate(config["S3Configuration"]);
|
|
28297
|
+
if (config["SecretsManagerConfiguration"] !== void 0) result.SecretsManagerConfiguration = config["SecretsManagerConfiguration"];
|
|
28298
|
+
if (config["BufferingHints"] !== void 0) result.BufferingHints = config["BufferingHints"];
|
|
28299
|
+
return result;
|
|
28300
|
+
}
|
|
28301
|
+
/**
|
|
27892
28302
|
* Map CFn `S3DestinationConfiguration` to the `S3DestinationUpdate`
|
|
27893
28303
|
* shape used by AWS `UpdateDestinationCommand` (#477; consumed by
|
|
27894
28304
|
* {@link mapExtendedS3ConfigToUpdate} for the `S3BackupUpdate` field).
|
|
@@ -55565,7 +55975,7 @@ function reorderArgs(argv) {
|
|
|
55565
55975
|
*/
|
|
55566
55976
|
async function main() {
|
|
55567
55977
|
const program = new Command();
|
|
55568
|
-
program.name("cdkd").description("CDK Direct - Deploy AWS CDK apps directly via SDK/Cloud Control API").version("0.
|
|
55978
|
+
program.name("cdkd").description("CDK Direct - Deploy AWS CDK apps directly via SDK/Cloud Control API").version("0.145.1");
|
|
55569
55979
|
program.addCommand(createBootstrapCommand());
|
|
55570
55980
|
program.addCommand(createSynthCommand());
|
|
55571
55981
|
program.addCommand(createListCommand());
|