@go-to-k/cdkd 0.139.0 → 0.140.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.
package/dist/cli.js CHANGED
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env node
2
2
  import { _ as withSkipPrefix, a as runDockerStreaming, c as getLogger, d as getLiveRenderer, f as PATTERN_B_NAME_PROPERTIES, g as generateResourceNameWithFallback, h as generateResourceName, i as runDockerForeground, n as formatDockerLoginError, p as PATTERN_B_RESOURCE_TYPES, r as getDockerCmd, u as runStackBuffered, v as withStackName } from "./docker-cmd-EtWSTAje.js";
3
- import { A as AssetPublisher, B as resolveStateBucketWithDefault, C as applyRoleArnIfSet, D as LockManager, E as TemplateParser, F as getDefaultStateBucketName, G as MIGRATE_TMP_PREFIX, H as warnDeprecatedNoPrefixCliFlag, I as getLegacyStateBucketName, J as AssemblyReader, K as findLargeInlineResources, L as resolveApp, M as WorkGraph, N as buildDockerImage, O as S3StateBackend, P as Synthesizer, Q as CdkdError, R as resolveCaptureObservedState, S as IntrinsicFunctionResolver, T as DagBuilder, U as CFN_TEMPLATE_BODY_LIMIT, V as resolveStateBucketWithDefaultAndSource, W as CFN_TEMPLATE_URL_LIMIT, X as resolveBucketRegion, _ as normalizeAwsTagsToCfn, _t as normalizeAwsError, a as withRetry, at as MissingCdkCliError, b as CloudControlProvider, c as cyan, ct as ResourceTimeoutError, d as red, dt as StackHasActiveImportsError, f as yellow, ft as StackTerminationProtectionError, g as matchesCdkPath, h as CDK_PATH_TAG, i as withResourceDeadline, j as stringifyValue, k as shouldRetainResource, l as gray, lt as ResourceUpdateNotSupportedError, m as collectInlinePolicyNamesManagedBySiblings, n as DEFAULT_RESOURCE_WARN_AFTER_MS, nt as LocalMigrateError, o as IMPLICIT_DELETE_DEPENDENCIES, ot as PartialFailureError, p as IAMRoleProvider, q as uploadCfnTemplate, r as DeployEngine, rt as LocalStartServiceError, s as bold, st as ProvisioningError, t as DEFAULT_RESOURCE_TIMEOUT_MS, tt as LocalInvokeBuildError, u as green, ut as RouteDiscoveryError, v as resolveExplicitPhysicalId, vt as withErrorHandling, w as DiffCalculator, x as assertRegionMatch, y as ProviderRegistry, z as resolveSkipPrefix } from "./deploy-engine-DZYchTh6.js";
3
+ import { A as AssetPublisher, B as resolveStateBucketWithDefault, C as applyRoleArnIfSet, D as LockManager, E as TemplateParser, F as getDefaultStateBucketName, G as MIGRATE_TMP_PREFIX, H as warnDeprecatedNoPrefixCliFlag, I as getLegacyStateBucketName, J as AssemblyReader, K as findLargeInlineResources, L as resolveApp, M as WorkGraph, N as buildDockerImage, O as S3StateBackend, P as Synthesizer, Q as CdkdError, R as resolveCaptureObservedState, S as IntrinsicFunctionResolver, T as DagBuilder, U as CFN_TEMPLATE_BODY_LIMIT, V as resolveStateBucketWithDefaultAndSource, W as CFN_TEMPLATE_URL_LIMIT, X as resolveBucketRegion, _ as normalizeAwsTagsToCfn, _t as normalizeAwsError, a as withRetry, at as MissingCdkCliError, b as CloudControlProvider, c as cyan, ct as ResourceTimeoutError, d as red, dt as StackHasActiveImportsError, f as yellow, ft as StackTerminationProtectionError, g as matchesCdkPath, h as CDK_PATH_TAG, i as withResourceDeadline, j as stringifyValue, k as shouldRetainResource, l as gray, lt as ResourceUpdateNotSupportedError, m as collectInlinePolicyNamesManagedBySiblings, n as DEFAULT_RESOURCE_WARN_AFTER_MS, nt as LocalMigrateError, o as IMPLICIT_DELETE_DEPENDENCIES, ot as PartialFailureError, p as IAMRoleProvider, q as uploadCfnTemplate, r as DeployEngine, rt as LocalStartServiceError, s as bold, st as ProvisioningError, t as DEFAULT_RESOURCE_TIMEOUT_MS, tt as LocalInvokeBuildError, u as green, ut as RouteDiscoveryError, v as resolveExplicitPhysicalId, vt as withErrorHandling, w as DiffCalculator, x as assertRegionMatch, y as ProviderRegistry, z as resolveSkipPrefix } from "./deploy-engine-wdfQVR__.js";
4
4
  import { a as setAwsClients, i as resetAwsClients, r as getAwsClients, t as AwsClients } from "./aws-clients-BF03Alpe.js";
5
5
  import { createHash, createHmac, createPublicKey, createVerify, randomBytes, randomUUID, timingSafeEqual } from "node:crypto";
6
6
  import { CopyObjectCommand, CreateBucketCommand, DeleteBucketAnalyticsConfigurationCommand, DeleteBucketCommand, DeleteBucketCorsCommand, DeleteBucketIntelligentTieringConfigurationCommand, DeleteBucketInventoryConfigurationCommand, DeleteBucketLifecycleCommand, DeleteBucketMetricsConfigurationCommand, DeleteBucketPolicyCommand, DeleteBucketReplicationCommand, DeleteBucketTaggingCommand, DeleteBucketWebsiteCommand, DeleteObjectsCommand, GetBucketAccelerateConfigurationCommand, GetBucketCorsCommand, GetBucketEncryptionCommand, GetBucketLifecycleConfigurationCommand, GetBucketLocationCommand, GetBucketLoggingCommand, GetBucketNotificationConfigurationCommand, GetBucketPolicyCommand, GetBucketReplicationCommand, GetBucketTaggingCommand, GetBucketVersioningCommand, GetBucketWebsiteCommand, GetObjectCommand, GetObjectLockConfigurationCommand, GetPublicAccessBlockCommand, HeadBucketCommand, ListBucketAnalyticsConfigurationsCommand, ListBucketIntelligentTieringConfigurationsCommand, ListBucketInventoryConfigurationsCommand, ListBucketMetricsConfigurationsCommand, ListBucketsCommand, ListDirectoryBucketsCommand, ListObjectVersionsCommand, ListObjectsV2Command, NoSuchBucket, PutBucketAccelerateConfigurationCommand, PutBucketAnalyticsConfigurationCommand, PutBucketCorsCommand, PutBucketEncryptionCommand, PutBucketIntelligentTieringConfigurationCommand, PutBucketInventoryConfigurationCommand, PutBucketLifecycleConfigurationCommand, PutBucketLoggingCommand, PutBucketMetricsConfigurationCommand, PutBucketNotificationConfigurationCommand, PutBucketOwnershipControlsCommand, PutBucketPolicyCommand, PutBucketReplicationCommand, PutBucketTaggingCommand, PutBucketVersioningCommand, PutBucketWebsiteCommand, PutObjectCommand, PutObjectLockConfigurationCommand, PutPublicAccessBlockCommand, S3Client, S3ServiceException } from "@aws-sdk/client-s3";
@@ -50,7 +50,7 @@ import { parse, print } from "graphql";
50
50
  import { CreateConnectionCommand, CreateCrawlerCommand, CreateDatabaseCommand, CreateJobCommand, CreateSecurityConfigurationCommand, CreateTableCommand as CreateTableCommand$1, CreateTriggerCommand, CreateWorkflowCommand, DeleteConnectionCommand, DeleteCrawlerCommand, DeleteDatabaseCommand, DeleteJobCommand, DeleteSecurityConfigurationCommand, DeleteTableCommand as DeleteTableCommand$1, DeleteTriggerCommand, DeleteWorkflowCommand, EntityNotFoundException, GetConnectionCommand, GetCrawlerCommand, GetDatabaseCommand, GetDatabasesCommand, GetJobCommand, GetSecurityConfigurationCommand, GetSecurityConfigurationsCommand, GetTableCommand, GetTablesCommand, GetTagsCommand, GetTriggerCommand, GetWorkflowCommand, GlueClient, ListWorkflowsCommand, StartCrawlerScheduleCommand, StartTriggerCommand, StopCrawlerScheduleCommand, StopTriggerCommand, UpdateConnectionCommand, UpdateCrawlerCommand, UpdateDatabaseCommand, UpdateJobCommand, UpdateTableCommand as UpdateTableCommand$1, UpdateTriggerCommand, UpdateWorkflowCommand } from "@aws-sdk/client-glue";
51
51
  import { AddTagsToStreamCommand, CreateStreamCommand, DecreaseStreamRetentionPeriodCommand, DeleteStreamCommand, DeregisterStreamConsumerCommand, DescribeStreamCommand, DescribeStreamConsumerCommand, IncreaseStreamRetentionPeriodCommand, KinesisClient, ListStreamsCommand, ListTagsForResourceCommand as ListTagsForResourceCommand$17, ListTagsForStreamCommand, RegisterStreamConsumerCommand, RemoveTagsFromStreamCommand, ResourceNotFoundException as ResourceNotFoundException$7, StartStreamEncryptionCommand, StopStreamEncryptionCommand, TagResourceCommand as TagResourceCommand$14, UntagResourceCommand as UntagResourceCommand$13, UpdateShardCountCommand } from "@aws-sdk/client-kinesis";
52
52
  import { AccessPointNotFound, CreateAccessPointCommand, CreateFileSystemCommand, CreateMountTargetCommand, DeleteAccessPointCommand, DeleteFileSystemCommand, DeleteMountTargetCommand, DescribeAccessPointsCommand, DescribeBackupPolicyCommand, DescribeFileSystemsCommand, DescribeLifecycleConfigurationCommand, DescribeMountTargetSecurityGroupsCommand, DescribeMountTargetsCommand, EFSClient, FileSystemNotFound, ModifyMountTargetSecurityGroupsCommand, MountTargetNotFound, UpdateFileSystemCommand } from "@aws-sdk/client-efs";
53
- import { CreateDeliveryStreamCommand, DeleteDeliveryStreamCommand, DescribeDeliveryStreamCommand, FirehoseClient, ListDeliveryStreamsCommand, ListTagsForDeliveryStreamCommand, ResourceNotFoundException as ResourceNotFoundException$8 } from "@aws-sdk/client-firehose";
53
+ import { CreateDeliveryStreamCommand, DeleteDeliveryStreamCommand, DescribeDeliveryStreamCommand, FirehoseClient, ListDeliveryStreamsCommand, ListTagsForDeliveryStreamCommand, ResourceNotFoundException as ResourceNotFoundException$8, TagDeliveryStreamCommand, UntagDeliveryStreamCommand, UpdateDestinationCommand } from "@aws-sdk/client-firehose";
54
54
  import { AddTagsCommand as AddTagsCommand$1, CloudTrailClient, CreateTrailCommand, DeleteTrailCommand, GetEventSelectorsCommand, GetInsightSelectorsCommand, GetTrailCommand, GetTrailStatusCommand, ListTagsCommand as ListTagsCommand$1, ListTrailsCommand, PutEventSelectorsCommand, PutInsightSelectorsCommand, RemoveTagsCommand as RemoveTagsCommand$1, StartLoggingCommand, StopLoggingCommand, TrailNotFoundException, UpdateTrailCommand } from "@aws-sdk/client-cloudtrail";
55
55
  import { BatchGetProjectsCommand, CodeBuildClient, CreateProjectCommand, DeleteProjectCommand, ListProjectsCommand, ResourceNotFoundException as ResourceNotFoundException$9, UpdateProjectCommand } from "@aws-sdk/client-codebuild";
56
56
  import { CreateVectorBucketCommand, DeleteIndexCommand, DeleteVectorBucketCommand, GetVectorBucketCommand, ListIndexesCommand, ListTagsForResourceCommand as ListTagsForResourceCommand$18, ListVectorBucketsCommand, S3VectorsClient } from "@aws-sdk/client-s3vectors";
@@ -27575,19 +27575,133 @@ var FirehoseProvider = class {
27575
27575
  }
27576
27576
  }
27577
27577
  /**
27578
- * Firehose delivery streams are treated as immutable by cdkd. AWS DOES
27579
- * provide an `UpdateDestination` API, but the per-destination shape
27580
- * matrix (Extended S3 / Redshift / OpenSearch / Splunk / HttpEndpoint /
27581
- * Iceberg / etc.) is deep enough that the deploy engine's immutable-
27582
- * property replacement path covers the common cases more reliably.
27583
- * Treating the type as fully immutable for `cdkd drift --revert` is
27584
- * the conservative choice; users who want in-place destination updates
27585
- * should re-deploy with `cdkd deploy --replace` so the new shape is
27586
- * applied via a fresh `CreateDeliveryStream`. Tracked as a follow-up
27587
- * to issue (#443).
27578
+ * Apply in-place updates to a Firehose delivery stream via the per-shape
27579
+ * AWS APIs (#477):
27580
+ *
27581
+ * - **Tags** (`TagDeliveryStream` / `UntagDeliveryStream`) always
27582
+ * supported; runs first since it is destination-independent.
27583
+ * - **`ExtendedS3DestinationConfiguration`** (`UpdateDestination` with
27584
+ * an `ExtendedS3DestinationUpdate` payload) recovers
27585
+ * `CurrentDeliveryStreamVersionId` + `DestinationId` from a
27586
+ * `DescribeDeliveryStream` call, then applies the diff. Only fires
27587
+ * when the destination shape actually differs.
27588
+ *
27589
+ * Other destination types (`S3DestinationConfiguration`,
27590
+ * `HttpEndpointDestinationConfiguration`, `RedshiftDestinationConfiguration`,
27591
+ * `ElasticsearchDestinationConfiguration`,
27592
+ * `AmazonopensearchserviceDestinationConfiguration`,
27593
+ * `SplunkDestinationConfiguration`,
27594
+ * `AmazonOpenSearchServerlessDestinationConfiguration`) stay rejected
27595
+ * with a tightened error message naming the AWS API. Each one is a
27596
+ * follow-up to (#477) — AWS provides `UpdateDestination` for them too,
27597
+ * but the per-shape reverse-mappers are deep and each warrants its own
27598
+ * focused PR. Re-deploy with `cdkd deploy --replace` until they land.
27599
+ *
27600
+ * Destination-type SWITCHES (e.g. ExtendedS3 → Redshift) are immutable
27601
+ * on AWS; cdkd surfaces `ResourceUpdateNotSupportedError` so the caller
27602
+ * can `cdkd deploy --replace`.
27588
27603
  */
27589
- update(logicalId, _physicalId, resourceType, _properties, _previousProperties) {
27590
- return Promise.reject(new ResourceUpdateNotSupportedError(resourceType, logicalId, "AWS::KinesisFirehose::DeliveryStream in-place update is not implemented in cdkd; AWS provides UpdateDestination but the per-destination shape matrix is large. Re-deploy with cdkd deploy --replace, or destroy + redeploy the stack."));
27604
+ async update(logicalId, physicalId, resourceType, properties, previousProperties) {
27605
+ this.logger.debug(`Updating Firehose delivery stream ${logicalId}: ${physicalId}`);
27606
+ const destKey = this.findDestinationKey(properties);
27607
+ const prevDestKey = this.findDestinationKey(previousProperties);
27608
+ if (destKey && prevDestKey && destKey !== prevDestKey) throw new ResourceUpdateNotSupportedError(resourceType, logicalId, `Switching Firehose destination type from '${prevDestKey}' to '${destKey}' is not supported in-place — AWS UpdateDestination requires the same destination type as the original CreateDeliveryStream. Re-deploy with cdkd deploy --replace.`);
27609
+ const activeDest = destKey ?? prevDestKey;
27610
+ if (activeDest && activeDest !== "ExtendedS3DestinationConfiguration") {
27611
+ const nextDest = properties[activeDest] ?? {};
27612
+ const prevDest = previousProperties[activeDest] ?? {};
27613
+ if (JSON.stringify(nextDest) !== JSON.stringify(prevDest)) throw new ResourceUpdateNotSupportedError(resourceType, logicalId, `In-place update for '${activeDest}' on AWS::KinesisFirehose::DeliveryStream is not yet implemented in cdkd (AWS exposes UpdateDestination for it; the per-shape reverse-mapper is a follow-up to #477). Re-deploy with cdkd deploy --replace.`);
27614
+ }
27615
+ await this.applyTagsDiff(physicalId, properties["Tags"], previousProperties["Tags"]);
27616
+ if (activeDest === "ExtendedS3DestinationConfiguration") {
27617
+ const nextDest = properties[activeDest] ?? {};
27618
+ const prevDest = previousProperties[activeDest] ?? {};
27619
+ if (JSON.stringify(nextDest) !== JSON.stringify(prevDest)) await this.applyExtendedS3DestinationUpdate(physicalId, nextDest);
27620
+ }
27621
+ const desc = (await this.getClient().send(new DescribeDeliveryStreamCommand({ DeliveryStreamName: physicalId }))).DeliveryStreamDescription;
27622
+ return {
27623
+ physicalId,
27624
+ wasReplaced: false,
27625
+ attributes: { ...desc?.DeliveryStreamARN !== void 0 && { Arn: desc.DeliveryStreamARN } }
27626
+ };
27627
+ }
27628
+ /**
27629
+ * Recover `CurrentDeliveryStreamVersionId` + `DestinationId` from
27630
+ * `DescribeDeliveryStream` and issue `UpdateDestination` with the new
27631
+ * ExtendedS3 shape. The reverse-mapper at
27632
+ * {@link mapExtendedS3ConfigToUpdate} produces the
27633
+ * `ExtendedS3DestinationUpdate` payload (CFn property names →
27634
+ * SDK camelCase, omitting `Prefix` / `BufferingHints` / etc. when the
27635
+ * source is undefined so an empty diff doesn't clear AWS-side fields).
27636
+ */
27637
+ async applyExtendedS3DestinationUpdate(physicalId, nextConfig) {
27638
+ const desc = (await this.getClient().send(new DescribeDeliveryStreamCommand({ DeliveryStreamName: physicalId }))).DeliveryStreamDescription;
27639
+ const currentVersionId = desc?.VersionId;
27640
+ const destinationId = (desc?.Destinations?.[0])?.DestinationId;
27641
+ if (!currentVersionId || !destinationId) throw new ProvisioningError(`DescribeDeliveryStream for ${physicalId} did not return VersionId or DestinationId; UpdateDestination cannot proceed.`, "AWS::KinesisFirehose::DeliveryStream", physicalId);
27642
+ await this.getClient().send(new UpdateDestinationCommand({
27643
+ DeliveryStreamName: physicalId,
27644
+ CurrentDeliveryStreamVersionId: currentVersionId,
27645
+ DestinationId: destinationId,
27646
+ ExtendedS3DestinationUpdate: this.mapExtendedS3ConfigToUpdate(nextConfig)
27647
+ }));
27648
+ }
27649
+ /**
27650
+ * Diff and apply changes to a Firehose delivery stream's Tags via the
27651
+ * `TagDeliveryStream` / `UntagDeliveryStream` AWS APIs.
27652
+ *
27653
+ * Tags shape is `[{Key, Value}]`. Removed keys go through
27654
+ * `UntagDeliveryStream` (key-only); added / modified entries go through
27655
+ * `TagDeliveryStream` (full {Key, Value}). No-op when before/after JSON
27656
+ * is identical.
27657
+ */
27658
+ async applyTagsDiff(physicalId, next, prev) {
27659
+ if (JSON.stringify(next ?? []) === JSON.stringify(prev ?? [])) return;
27660
+ const nextEntries = Array.isArray(next) ? next : [];
27661
+ const prevEntries = Array.isArray(prev) ? prev : [];
27662
+ const nextByKey = /* @__PURE__ */ new Map();
27663
+ for (const t of nextEntries) if (t.Key) nextByKey.set(t.Key, t);
27664
+ const prevByKey = /* @__PURE__ */ new Map();
27665
+ for (const t of prevEntries) if (t.Key) prevByKey.set(t.Key, t);
27666
+ const tagKeysToRemove = [];
27667
+ for (const key of prevByKey.keys()) if (!nextByKey.has(key)) tagKeysToRemove.push(key);
27668
+ if (tagKeysToRemove.length > 0) await this.getClient().send(new UntagDeliveryStreamCommand({
27669
+ DeliveryStreamName: physicalId,
27670
+ TagKeys: tagKeysToRemove
27671
+ }));
27672
+ const tagsToUpsert = [];
27673
+ for (const [key, tag] of nextByKey) {
27674
+ const before = prevByKey.get(key);
27675
+ if (JSON.stringify(before) === JSON.stringify(tag)) continue;
27676
+ tagsToUpsert.push(tag);
27677
+ }
27678
+ if (tagsToUpsert.length > 0) await this.getClient().send(new TagDeliveryStreamCommand({
27679
+ DeliveryStreamName: physicalId,
27680
+ Tags: tagsToUpsert.map((t) => ({
27681
+ Key: t.Key,
27682
+ ...t.Value !== void 0 && { Value: t.Value }
27683
+ }))
27684
+ }));
27685
+ }
27686
+ /**
27687
+ * Return the key of the destination property present on a properties
27688
+ * record, or `undefined` if none is present. AWS allows exactly one
27689
+ * destination configuration per delivery stream, so the first match is
27690
+ * authoritative; the ordering walks the most-common types first.
27691
+ */
27692
+ findDestinationKey(properties) {
27693
+ for (const key of [
27694
+ "ExtendedS3DestinationConfiguration",
27695
+ "S3DestinationConfiguration",
27696
+ "HttpEndpointDestinationConfiguration",
27697
+ "RedshiftDestinationConfiguration",
27698
+ "ElasticsearchDestinationConfiguration",
27699
+ "AmazonopensearchserviceDestinationConfiguration",
27700
+ "SplunkDestinationConfiguration",
27701
+ "AmazonOpenSearchServerlessDestinationConfiguration",
27702
+ "IcebergDestinationConfiguration",
27703
+ "SnowflakeDestinationConfiguration"
27704
+ ]) if (properties[key] !== void 0) return key;
27591
27705
  }
27592
27706
  /**
27593
27707
  * Delete a Firehose delivery stream
@@ -27662,6 +27776,67 @@ var FirehoseProvider = class {
27662
27776
  return result;
27663
27777
  }
27664
27778
  /**
27779
+ * Map CFn `ExtendedS3DestinationConfiguration` to the
27780
+ * `ExtendedS3DestinationUpdate` shape expected by AWS
27781
+ * `UpdateDestinationCommand` (#477). Shape is structurally identical
27782
+ * to `ExtendedS3DestinationConfiguration` but every field is optional
27783
+ * — only the fields present in `config` are forwarded so undefined
27784
+ * keys do not clobber AWS-side state.
27785
+ *
27786
+ * `S3BackupConfiguration` is mapped through {@link mapS3ConfigToUpdate}
27787
+ * so its own optional fields likewise round-trip cleanly.
27788
+ */
27789
+ mapExtendedS3ConfigToUpdate(config) {
27790
+ const result = {};
27791
+ const bucketArn = config["BucketArn"] ?? config["BucketARN"];
27792
+ if (bucketArn !== void 0) result.BucketARN = bucketArn;
27793
+ const roleArn = config["RoleArn"] ?? config["RoleARN"];
27794
+ if (roleArn !== void 0) result.RoleARN = roleArn;
27795
+ if (config["Prefix"] !== void 0) result.Prefix = config["Prefix"];
27796
+ if (config["ErrorOutputPrefix"] !== void 0) result.ErrorOutputPrefix = config["ErrorOutputPrefix"];
27797
+ if (config["CompressionFormat"] !== void 0) result.CompressionFormat = config["CompressionFormat"];
27798
+ if (config["BufferingHints"] !== void 0) {
27799
+ const hints = config["BufferingHints"];
27800
+ result.BufferingHints = {
27801
+ ...hints["SizeInMBs"] !== void 0 && { SizeInMBs: hints["SizeInMBs"] },
27802
+ ...hints["IntervalInSeconds"] !== void 0 && { IntervalInSeconds: hints["IntervalInSeconds"] }
27803
+ };
27804
+ }
27805
+ if (config["EncryptionConfiguration"] !== void 0) result.EncryptionConfiguration = config["EncryptionConfiguration"];
27806
+ if (config["CloudWatchLoggingOptions"] !== void 0) result.CloudWatchLoggingOptions = config["CloudWatchLoggingOptions"];
27807
+ if (config["ProcessingConfiguration"] !== void 0) result.ProcessingConfiguration = config["ProcessingConfiguration"];
27808
+ if (config["S3BackupMode"] !== void 0) result.S3BackupMode = config["S3BackupMode"];
27809
+ if (config["S3BackupConfiguration"] !== void 0) result.S3BackupUpdate = this.mapS3ConfigToUpdate(config["S3BackupConfiguration"]);
27810
+ if (config["DataFormatConversionConfiguration"] !== void 0) result.DataFormatConversionConfiguration = config["DataFormatConversionConfiguration"];
27811
+ return result;
27812
+ }
27813
+ /**
27814
+ * Map CFn `S3DestinationConfiguration` to the `S3DestinationUpdate`
27815
+ * shape used by AWS `UpdateDestinationCommand` (#477; consumed by
27816
+ * {@link mapExtendedS3ConfigToUpdate} for the `S3BackupUpdate` field).
27817
+ * Every field optional — only present keys are forwarded.
27818
+ */
27819
+ mapS3ConfigToUpdate(config) {
27820
+ const result = {};
27821
+ const bucketArn = config["BucketArn"] ?? config["BucketARN"];
27822
+ if (bucketArn !== void 0) result.BucketARN = bucketArn;
27823
+ const roleArn = config["RoleArn"] ?? config["RoleARN"];
27824
+ if (roleArn !== void 0) result.RoleARN = roleArn;
27825
+ if (config["Prefix"] !== void 0) result.Prefix = config["Prefix"];
27826
+ if (config["ErrorOutputPrefix"] !== void 0) result.ErrorOutputPrefix = config["ErrorOutputPrefix"];
27827
+ if (config["CompressionFormat"] !== void 0) result.CompressionFormat = config["CompressionFormat"];
27828
+ if (config["BufferingHints"] !== void 0) {
27829
+ const hints = config["BufferingHints"];
27830
+ result.BufferingHints = {
27831
+ ...hints["SizeInMBs"] !== void 0 && { SizeInMBs: hints["SizeInMBs"] },
27832
+ ...hints["IntervalInSeconds"] !== void 0 && { IntervalInSeconds: hints["IntervalInSeconds"] }
27833
+ };
27834
+ }
27835
+ if (config["EncryptionConfiguration"] !== void 0) result.EncryptionConfiguration = config["EncryptionConfiguration"];
27836
+ if (config["CloudWatchLoggingOptions"] !== void 0) result.CloudWatchLoggingOptions = config["CloudWatchLoggingOptions"];
27837
+ return result;
27838
+ }
27839
+ /**
27665
27840
  * Adopt an existing Kinesis Firehose delivery stream into cdkd state.
27666
27841
  *
27667
27842
  * Lookup order:
@@ -54959,7 +55134,7 @@ function reorderArgs(argv) {
54959
55134
  */
54960
55135
  async function main() {
54961
55136
  const program = new Command();
54962
- program.name("cdkd").description("CDK Direct - Deploy AWS CDK apps directly via SDK/Cloud Control API").version("0.139.0");
55137
+ program.name("cdkd").description("CDK Direct - Deploy AWS CDK apps directly via SDK/Cloud Control API").version("0.140.0");
54963
55138
  program.addCommand(createBootstrapCommand());
54964
55139
  program.addCommand(createSynthCommand());
54965
55140
  program.addCommand(createListCommand());