@go-to-k/cdkd 0.281.1 → 0.281.3

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,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
- import { $ as requireConfigArray, $t as expectedOwnerParam, A as green, An as withErrorHandling, At as getDockerCmd, B as slowCcOperationTimeoutMs, Bt as resolveAutoAssetStorage, C as MULTI_REGION_RECREATE_BLOCKED_TYPES, Cn as StackHasActiveImportsError, Ct as ensureAssetStorage, D as bold, Dt as validateContainerRepoName, E as formatResourceLine, Et as validateAssetBucketName, F as clearOnUpdateRemoval, Ft as Synthesizer, G as refStateLookupFromResource, Gt as resolveUseCdkBootstrapAssets, H as isTerminationProtectionPropagationError, Ht as resolveSkipPrefix, I as ProviderRegistry, It as synthesisStatusMessage, J as resolveExplicitPhysicalId, Jt as CFN_TEMPLATE_BODY_LIMIT, K as WAFv2WebACLProvider, Kt as stateBucketExistenceConfirmed, L as findActionableSilentDrops, Lt as getDefaultStateBucketName, M as yellow, Mt as runDockerStreaming, N as IAMRoleProvider, Nt as AssetManifestLoader, O as cyan, Ot as buildDockerImage, P as collectInlinePolicyNamesManagedBySiblings, Pt as getDockerImageBySourceHash, Q as replayWarn, Qt as uploadCfnTemplate, R as findSilentDropProperties, Rt as getLegacyStateBucketName, S as extractDeploymentEventError, Sn as ResourceUpdateNotSupportedError, St as BOOTSTRAP_MARKER_PREFIX, T as renderStatefulReason, Tt as parseBootstrapMarker, U as IntrinsicFunctionResolver, Ut as resolveStateBucketWithDefault, V as disableInstanceApiTermination, Vt as resolveCaptureObservedState, W as cfnRefValueFromPhysicalId, Wt as resolveStateBucketWithDefaultAndSource, X as configStringRefusal, Xt as MIGRATE_TMP_PREFIX, Y as assertRegionMatch, Yt as CFN_TEMPLATE_URL_LIMIT, Z as readConfigString, Zt as findLargeInlineResources, _ as createPreDeleteFinalSnapshot, _n as MissingCdkCliError, _t as buildAssetRedirectMap, a as DeploymentEventsStore, an as getAwsClients, at as withRetry, b as unsupportedFinalSnapshotError, bn as ProvisioningError, bt as rewriteTemplateAssetReferences, c as replayFailedOperations, ct as DagBuilder, d as IMPLICIT_DELETE_DEPENDENCIES, dt as S3StateBackend, en as AssemblyReader, et as requireConfigObject, f as computeImplicitDeleteEdges, fn as DeployCancelledError, ft as rebuildClientForBucketRegion, g as ccRoutedFinalSnapshotError, gt as WorkGraph, h as buildFinalSnapshotIdentifier, hn as LocalStartServiceError, ht as stringifyValue, i as DeploymentEventsReader, in as AwsClients, it as describeTypeWithThrottleRetry, j as red, jt as runDockerForeground, k as gray, kn as normalizeAwsError, kt as formatDockerLoginError, l as replayRollback, ln as CdkdError, lt as TemplateParser, m as PRE_DELETE_SNAPSHOT_TYPES, mn as LocalMigrateError, mt as AssetPublisher, n as DEFAULT_RESOURCE_WARN_AFTER_MS, nt as applyRoleArnIfSet, o as planFailedOps, on as resetAwsClients, ot as isRetryableTransientError, p as ATOMIC_FINAL_SNAPSHOT_TYPES, pn as LocalInvokeBuildError$1, pt as shouldRetainResource, q as normalizeAwsTagsToCfn, qt as warnDeprecatedNoPrefixCliFlag, r as DeployEngine, rn as resolveBucketRegion, rt as DiffCalculator, s as planRollback, sn as setAwsClients, st as isThrottlingError, t as DEFAULT_RESOURCE_TIMEOUT_MS, tn as processStackMessages, tt as requireConfigString, u as withResourceDeadline, ut as LockManager, v as isFinalSnapshotError, vn as NestedStackChildDirectDestroyError, vt as createAssetRedirectResolver, w as isStatefulRecreateTargetSync, wn as StackTerminationProtectionError, wt as getBootstrapMarkerKey, x as makeCanonicalizePropertiesFn, xn as ResourceTimeoutError, xt as AssetModeResolver, y as refusesFinalSnapshot, yn as PartialFailureError, yt as loadPublishableAssetManifest, z as CloudControlProvider, zt as resolveApp } from "./deploy-engine-CGL3Vw1P.js";
2
+ import { $ as requireConfigArray, $t as expectedOwnerParam, A as green, An as withErrorHandling, At as getDockerCmd, B as slowCcOperationTimeoutMs, Bt as resolveAutoAssetStorage, C as MULTI_REGION_RECREATE_BLOCKED_TYPES, Cn as StackHasActiveImportsError, Ct as ensureAssetStorage, D as bold, Dt as validateContainerRepoName, E as formatResourceLine, Et as validateAssetBucketName, F as clearOnUpdateRemoval, Ft as Synthesizer, G as refStateLookupFromResource, Gt as resolveUseCdkBootstrapAssets, H as isTerminationProtectionPropagationError, Ht as resolveSkipPrefix, I as ProviderRegistry, It as synthesisStatusMessage, J as resolveExplicitPhysicalId, Jt as CFN_TEMPLATE_BODY_LIMIT, K as WAFv2WebACLProvider, Kt as stateBucketExistenceConfirmed, L as findActionableSilentDrops, Lt as getDefaultStateBucketName, M as yellow, Mt as runDockerStreaming, N as IAMRoleProvider, Nt as AssetManifestLoader, O as cyan, Ot as buildDockerImage, P as collectInlinePolicyNamesManagedBySiblings, Pt as getDockerImageBySourceHash, Q as replayWarn, Qt as uploadCfnTemplate, R as findSilentDropProperties, Rt as getLegacyStateBucketName, S as extractDeploymentEventError, Sn as ResourceUpdateNotSupportedError, St as BOOTSTRAP_MARKER_PREFIX, T as renderStatefulReason, Tt as parseBootstrapMarker, U as IntrinsicFunctionResolver, Ut as resolveStateBucketWithDefault, V as disableInstanceApiTermination, Vt as resolveCaptureObservedState, W as cfnRefValueFromPhysicalId, Wt as resolveStateBucketWithDefaultAndSource, X as configStringRefusal, Xt as MIGRATE_TMP_PREFIX, Y as assertRegionMatch, Yt as CFN_TEMPLATE_URL_LIMIT, Z as readConfigString, Zt as findLargeInlineResources, _ as createPreDeleteFinalSnapshot, _n as MissingCdkCliError, _t as buildAssetRedirectMap, a as DeploymentEventsStore, an as getAwsClients, at as withRetry, b as unsupportedFinalSnapshotError, bn as ProvisioningError, bt as rewriteTemplateAssetReferences, c as replayFailedOperations, ct as DagBuilder, d as IMPLICIT_DELETE_DEPENDENCIES, dt as S3StateBackend, en as AssemblyReader, et as requireConfigObject, f as computeImplicitDeleteEdges, fn as DeployCancelledError, ft as rebuildClientForBucketRegion, g as ccRoutedFinalSnapshotError, gt as WorkGraph, h as buildFinalSnapshotIdentifier, hn as LocalStartServiceError, ht as stringifyValue, i as DeploymentEventsReader, in as AwsClients, it as describeTypeWithThrottleRetry, j as red, jt as runDockerForeground, k as gray, kn as normalizeAwsError, kt as formatDockerLoginError, l as replayRollback, ln as CdkdError, lt as TemplateParser, m as PRE_DELETE_SNAPSHOT_TYPES, mn as LocalMigrateError, mt as AssetPublisher, n as DEFAULT_RESOURCE_WARN_AFTER_MS, nt as applyRoleArnIfSet, o as planFailedOps, on as resetAwsClients, ot as isRetryableTransientError, p as ATOMIC_FINAL_SNAPSHOT_TYPES, pn as LocalInvokeBuildError$1, pt as shouldRetainResource, q as normalizeAwsTagsToCfn, qt as warnDeprecatedNoPrefixCliFlag, r as DeployEngine, rn as resolveBucketRegion, rt as DiffCalculator, s as planRollback, sn as setAwsClients, st as isThrottlingError, t as DEFAULT_RESOURCE_TIMEOUT_MS, tn as processStackMessages, tt as requireConfigString, u as withResourceDeadline, ut as LockManager, v as isFinalSnapshotError, vn as NestedStackChildDirectDestroyError, vt as createAssetRedirectResolver, w as isStatefulRecreateTargetSync, wn as StackTerminationProtectionError, wt as getBootstrapMarkerKey, x as makeCanonicalizePropertiesFn, xn as ResourceTimeoutError, xt as AssetModeResolver, y as refusesFinalSnapshot, yn as PartialFailureError, yt as loadPublishableAssetManifest, z as CloudControlProvider, zt as resolveApp } from "./deploy-engine-DFZo1Twc.js";
3
3
  import { a as getLiveRenderer, c as PATTERN_B_RESOURCE_TYPES, d as generateResourceNameWithFallback, h as withStackName, i as runStackBuffered, m as withSkipPrefix, n as getLogger, o as PATTERN_B_NAME_OPTIONS, s as PATTERN_B_NAME_PROPERTIES, u as generateResourceName } from "./logger-zRrlbaQt.js";
4
- import { t as ASGProvider } from "./asg-provider-DYdmsCfd.js";
4
+ import { t as ASGProvider } from "./asg-provider-CBIIk31p.js";
5
5
  import { AsyncLocalStorage } from "node:async_hooks";
6
6
  import { createHash, randomBytes, randomUUID } from "node:crypto";
7
7
  import { CopyObjectCommand, CreateBucketCommand, DeleteBucketAnalyticsConfigurationCommand, DeleteBucketCommand, DeleteBucketCorsCommand, DeleteBucketEncryptionCommand, DeleteBucketIntelligentTieringConfigurationCommand, DeleteBucketInventoryConfigurationCommand, DeleteBucketLifecycleCommand, DeleteBucketMetricsConfigurationCommand, DeleteBucketOwnershipControlsCommand, DeleteBucketPolicyCommand, DeleteBucketReplicationCommand, DeleteBucketTaggingCommand, DeleteBucketWebsiteCommand, DeleteObjectsCommand, GetBucketAccelerateConfigurationCommand, GetBucketCorsCommand, GetBucketEncryptionCommand, GetBucketLifecycleConfigurationCommand, GetBucketLocationCommand, GetBucketLoggingCommand, GetBucketNotificationConfigurationCommand, GetBucketOwnershipControlsCommand, GetBucketPolicyCommand, GetBucketReplicationCommand, GetBucketTaggingCommand, GetBucketVersioningCommand, GetBucketWebsiteCommand, GetObjectCommand, GetObjectLockConfigurationCommand, GetPublicAccessBlockCommand, HeadBucketCommand, ListBucketAnalyticsConfigurationsCommand, ListBucketIntelligentTieringConfigurationsCommand, ListBucketInventoryConfigurationsCommand, ListBucketMetricsConfigurationsCommand, 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";
@@ -54,7 +54,7 @@ import { AppSyncClient, CreateApiKeyCommand, CreateDataSourceCommand, CreateGrap
54
54
  import { parse, print } from "graphql";
55
55
  import { ConcurrentModificationException, CrawlerRunningException, 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, GetJobCommand, GetSecurityConfigurationCommand, GetTableCommand, GetTagsCommand, GetTriggerCommand, GetWorkflowCommand, GlueClient, StartCrawlerScheduleCommand, StartTriggerCommand, StopCrawlerCommand, StopCrawlerScheduleCommand, StopTriggerCommand, UpdateConnectionCommand, UpdateCrawlerCommand, UpdateDatabaseCommand, UpdateJobCommand, UpdateTableCommand as UpdateTableCommand$1, UpdateTriggerCommand, UpdateWorkflowCommand } from "@aws-sdk/client-glue";
56
56
  import { BudgetsClient, CreateBudgetCommand, CreateNotificationCommand, CreateSubscriberCommand, DeleteBudgetCommand, DeleteNotificationCommand, DeleteSubscriberCommand, DescribeBudgetCommand, DuplicateRecordException, NotFoundException as NotFoundException$5, TagResourceCommand as TagResourceCommand$17, UntagResourceCommand as UntagResourceCommand$17, UpdateBudgetCommand } from "@aws-sdk/client-budgets";
57
- import { AddTagsToStreamCommand, CreateStreamCommand, DecreaseStreamRetentionPeriodCommand, DeleteStreamCommand, DeregisterStreamConsumerCommand, DescribeStreamCommand, DescribeStreamConsumerCommand, DescribeStreamSummaryCommand, IncreaseStreamRetentionPeriodCommand, KinesisClient, ListTagsForResourceCommand as ListTagsForResourceCommand$15, ListTagsForStreamCommand, RegisterStreamConsumerCommand, RemoveTagsFromStreamCommand, ResourceNotFoundException as ResourceNotFoundException$10, StartStreamEncryptionCommand, StopStreamEncryptionCommand, TagResourceCommand as TagResourceCommand$18, UntagResourceCommand as UntagResourceCommand$18, UpdateShardCountCommand, UpdateStreamModeCommand } from "@aws-sdk/client-kinesis";
57
+ import { AddTagsToStreamCommand, CreateStreamCommand, DecreaseStreamRetentionPeriodCommand, DeleteStreamCommand, DeregisterStreamConsumerCommand, DescribeStreamCommand, DescribeStreamConsumerCommand, DescribeStreamSummaryCommand, DisableEnhancedMonitoringCommand, EnableEnhancedMonitoringCommand, IncreaseStreamRetentionPeriodCommand, KinesisClient, ListTagsForResourceCommand as ListTagsForResourceCommand$15, ListTagsForStreamCommand, RegisterStreamConsumerCommand, RemoveTagsFromStreamCommand, ResourceNotFoundException as ResourceNotFoundException$10, StartStreamEncryptionCommand, StopStreamEncryptionCommand, TagResourceCommand as TagResourceCommand$18, UntagResourceCommand as UntagResourceCommand$18, UpdateMaxRecordSizeCommand, UpdateShardCountCommand, UpdateStreamModeCommand } from "@aws-sdk/client-kinesis";
58
58
  import { CreateScheduleCommand, DeleteScheduleCommand, GetScheduleCommand, ResourceNotFoundException as ResourceNotFoundException$11, SchedulerClient, UpdateScheduleCommand } from "@aws-sdk/client-scheduler";
59
59
  import { AccessPointNotFound, CreateAccessPointCommand, CreateFileSystemCommand, CreateMountTargetCommand, DeleteAccessPointCommand, DeleteFileSystemCommand, DeleteMountTargetCommand, DescribeAccessPointsCommand, DescribeBackupPolicyCommand, DescribeFileSystemPolicyCommand, DescribeFileSystemsCommand, DescribeLifecycleConfigurationCommand, DescribeMountTargetSecurityGroupsCommand, DescribeMountTargetsCommand, EFSClient, FileSystemNotFound, ModifyMountTargetSecurityGroupsCommand, MountTargetNotFound, PutBackupPolicyCommand, PutFileSystemPolicyCommand, PutLifecycleConfigurationCommand, UpdateFileSystemCommand, UpdateFileSystemProtectionCommand } from "@aws-sdk/client-efs";
60
60
  import { CreateFileSystemCommand as CreateFileSystemCommand$1, CreateFileSystemFromBackupCommand, DeleteFileSystemCommand as DeleteFileSystemCommand$1, DescribeFileSystemsCommand as DescribeFileSystemsCommand$1, FSxClient, FileSystemNotFound as FileSystemNotFound$1, TagResourceCommand as TagResourceCommand$19, UntagResourceCommand as UntagResourceCommand$19, UpdateFileSystemCommand as UpdateFileSystemCommand$1 } from "@aws-sdk/client-fsx";
@@ -33306,6 +33306,47 @@ function normalizeRecordName(name) {
33306
33306
  return lowered.endsWith(".") ? lowered : `${lowered}.`;
33307
33307
  }
33308
33308
  /**
33309
+ * Is this value ONLY an unresolved intrinsic — `{Ref: …}` / `{Fn::If: […]}` —
33310
+ * rather than a real object with members?
33311
+ *
33312
+ * `import.ts` substitutes only single-key `{Ref}` before calling a provider,
33313
+ * so an element behind a condition reaches `import()` in this shape.
33314
+ */
33315
+ function isIntrinsicOnly(value) {
33316
+ if (typeof value !== "object" || value === null || Array.isArray(value)) return false;
33317
+ const keys = Object.keys(value);
33318
+ return keys.length === 1 && (keys[0] === "Ref" || (keys[0] ?? "").startsWith("Fn::"));
33319
+ }
33320
+ /**
33321
+ * Read a hosted zone's PUBLIC-vs-PRIVATE visibility off its own template
33322
+ * properties (issue #1702), for the `import()` name lookup's zone filter.
33323
+ *
33324
+ * CloudFormation has no `PrivateZone` property — visibility is implied by
33325
+ * `VPCs`: a zone associated with at least one VPC is private, one with none is
33326
+ * public. So:
33327
+ *
33328
+ * - `VPCs` ABSENT -> `false` (public). This is the CDK `PublicHostedZone`
33329
+ * shape and by far the common one.
33330
+ * - an array carrying at least one element that is NOT purely an unresolved
33331
+ * intrinsic -> `true` (private). Such an element proves the template
33332
+ * attaches a VPC unconditionally, even when the `VPCId` inside it is itself
33333
+ * a `Ref` this provider cannot resolve.
33334
+ * - anything else -> `undefined` (do not narrow), and the caller's ambiguity
33335
+ * guard then refuses rather than adopting the wrong zone. Three shapes land
33336
+ * here and each would otherwise be a GUESS: a non-array (an unresolved
33337
+ * intrinsic is a truthy OBJECT); an EMPTY array (more likely a
33338
+ * condition-collapsed value than a deliberate "public"); and — the one that
33339
+ * is easy to miss — an array whose every element is intrinsic-only
33340
+ * (`[{Ref: 'AWS::NoValue'}]`, the CFn spelling of a conditionally-absent
33341
+ * element), which is non-empty yet may resolve to a PUBLIC zone.
33342
+ */
33343
+ function templateZoneVisibility(properties) {
33344
+ const vpcs = properties["VPCs"];
33345
+ if (vpcs == null) return false;
33346
+ if (!Array.isArray(vpcs)) return void 0;
33347
+ return vpcs.some((v) => typeof v === "object" && v !== null && !Array.isArray(v) && !isIntrinsicOnly(v)) ? true : void 0;
33348
+ }
33349
+ /**
33309
33350
  * Canonicalize a name for the QUERY side of a Route 53 list call.
33310
33351
  *
33311
33352
  * `normalizeRecordName` above is the COMPARE-side canonicalizer, and the two
@@ -34025,12 +34066,33 @@ var Route53Provider = class {
34025
34066
  * Resolve HostedZoneId from properties.
34026
34067
  * If HostedZoneId is provided, use it directly.
34027
34068
  * If HostedZoneName is provided, resolve it to a HostedZoneId via ListHostedZonesByName.
34069
+ *
34070
+ * `options.requirePrivateZone` narrows the name match to PRIVATE (`true`) or
34071
+ * PUBLIC (`false`) zones before the ambiguity decision below; leave it
34072
+ * undefined to match either. Split-horizon DNS is exactly a public and a
34073
+ * private zone sharing one name, so a caller that already knows which side
34074
+ * it wants resolves cleanly where the ambiguity guard would otherwise
34075
+ * refuse. `importHostedZone` is the one caller today, deriving the answer
34076
+ * from the template's own `VPCs` (declared = private, absent = public);
34077
+ * every RecordSet caller leaves it undefined, since a record set's template
34078
+ * says nothing about the zone's visibility.
34079
+ *
34080
+ * `options.subject` names what is being resolved FOR in the errors this
34081
+ * raises, and what remedy to point at. It exists because the messages are
34082
+ * user-facing and this helper is no longer RecordSet-only: telling someone
34083
+ * adopting a hosted zone to "pass the '<zoneId>|<name>|<type>' composite"
34084
+ * names a physicalId shape their resource does not have.
34028
34085
  */
34029
34086
  async resolveHostedZoneId(properties, logicalId, resourceType, physicalId, options) {
34087
+ const subject = options?.subject ?? {
34088
+ noun: "record set",
34089
+ remedy: "set HostedZoneId explicitly, or pass the '<zoneId>|<name>|<type>' composite via --resource"
34090
+ };
34030
34091
  const hostedZoneId = properties["HostedZoneId"];
34031
34092
  if (typeof hostedZoneId === "string" && hostedZoneId) return hostedZoneId;
34032
34093
  let lookupErrorMessage;
34033
34094
  let lookupErrorCause;
34095
+ const narrowing = options?.requirePrivateZone !== void 0;
34034
34096
  const hostedZoneName = properties["HostedZoneName"];
34035
34097
  if (typeof hostedZoneName === "string" && hostedZoneName) {
34036
34098
  let matched = [];
@@ -34043,18 +34105,26 @@ var Route53Provider = class {
34043
34105
  const zones = response.HostedZones ?? [];
34044
34106
  const normalizedName = normalizeRecordName(hostedZoneName);
34045
34107
  matched = zones.filter((z) => normalizeRecordName(z.Name ?? "") === normalizedName);
34046
- absenceIsSound = !hostedZoneName.includes("\\") && (zones.length > 0 || response.IsTruncated !== true);
34108
+ if (narrowing) matched = matched.filter((z) => (z.Config?.PrivateZone ?? false) === options?.requirePrivateZone);
34109
+ const sawLaterName = zones.some((z) => normalizeRecordName(z.Name ?? "") !== normalizedName);
34110
+ absenceIsSound = !hostedZoneName.includes("\\") && (narrowing ? sawLaterName || response.IsTruncated !== true : zones.length > 0 || response.IsTruncated !== true);
34047
34111
  } catch (error) {
34048
34112
  lookupErrorMessage = error instanceof Error ? error.message : String(error);
34049
34113
  lookupErrorCause = error instanceof Error ? error : void 0;
34050
34114
  this.logger.warn(`Failed to resolve HostedZoneName "${hostedZoneName}" for ${logicalId}: ${lookupErrorMessage}`);
34051
34115
  }
34052
- if (matched.length > 1 && options?.requireUnambiguousZoneName) throw new ProvisioningError(`HostedZoneName "${hostedZoneName}" matches ${matched.length} hosted zones for ${logicalId} (split-horizon public/private DNS). Refusing to guess which one this record belongs to — set HostedZoneId explicitly, or pass the '<zoneId>|<name>|<type>' composite via --resource.`, resourceType, logicalId, physicalId);
34116
+ if (matched.length > 1 && options?.requireUnambiguousZoneName) {
34117
+ const cause = narrowing ? "" : " (split-horizon public/private DNS)";
34118
+ throw new ProvisioningError(`HostedZoneName "${hostedZoneName}" matches ${matched.length} hosted zones for ${logicalId}${cause}. Refusing to guess which one is meant — ${subject.remedy}.`, resourceType, logicalId, physicalId);
34119
+ }
34053
34120
  const matchedZone = matched[0];
34054
34121
  if (matchedZone?.Id) return matchedZone.Id.replace("/hostedzone/", "");
34055
- if (absenceIsSound) throw new HostedZoneNameNotFoundError(`HostedZoneName "${hostedZoneName}" matches no hosted zone in this account/region for ${logicalId}`, resourceType, logicalId, physicalId);
34122
+ if (absenceIsSound) {
34123
+ const visibility = options?.requirePrivateZone === void 0 ? "" : options.requirePrivateZone ? "private " : "public ";
34124
+ throw new HostedZoneNameNotFoundError(`HostedZoneName "${hostedZoneName}" matches no ${visibility}hosted zone in this account/region for ${logicalId}`, resourceType, logicalId, physicalId);
34125
+ }
34056
34126
  }
34057
- throw new ProvisioningError(lookupErrorMessage ? `Could not resolve HostedZoneName "${String(hostedZoneName)}" for record set ${logicalId}: ${lookupErrorMessage}` : `Either HostedZoneId or HostedZoneName is required for record set ${logicalId}`, resourceType, logicalId, physicalId, lookupErrorCause);
34127
+ throw new ProvisioningError(lookupErrorMessage ? `Could not resolve HostedZoneName "${String(hostedZoneName)}" for ${subject.noun} ${logicalId}: ${lookupErrorMessage}` : typeof hostedZoneName === "string" && hostedZoneName ? `Could not determine whether HostedZoneName "${hostedZoneName}" exists for ${subject.noun} ${logicalId} — the hosted-zone listing ended before the name could be resolved either way, so cdkd will not assume it is absent. ${subject.remedy}.` : `Either HostedZoneId or HostedZoneName is required for ${subject.noun} ${logicalId}`, resourceType, logicalId, physicalId, lookupErrorCause);
34058
34128
  }
34059
34129
  /**
34060
34130
  * Recover `(hostedZoneId, name, type)` for a record set from EITHER shape of
@@ -34232,8 +34302,10 @@ var Route53Provider = class {
34232
34302
  /**
34233
34303
  * Adopt an existing Route 53 resource into cdkd state.
34234
34304
  *
34235
- * Supported types: `AWS::Route53::HostedZone` (override-only);
34236
- * `AWS::Route53::RecordSet` (override-only too the supplied id is
34305
+ * Supported types: `AWS::Route53::HostedZone` (AUTO-RESOLVED from the
34306
+ * template's `Name` since issue #1702, with an explicit `--resource`
34307
+ * override still taking precedence);
34308
+ * `AWS::Route53::RecordSet` (override-only — the supplied id is
34237
34309
  * CANONICALIZED rather than trusted, using the template's
34238
34310
  * `HostedZoneId` / `HostedZoneName` + `Name` + `Type` and verified
34239
34311
  * against AWS, but an import with no override still declines because
@@ -34315,6 +34387,29 @@ var Route53Provider = class {
34315
34387
  attributes: {}
34316
34388
  };
34317
34389
  }
34390
+ /**
34391
+ * Adopt an existing hosted zone (issue #1702).
34392
+ *
34393
+ * An explicit `--resource` id is ground truth and is only VERIFIED. With no
34394
+ * override, the zone is resolved from the template's `Name` via
34395
+ * `ListHostedZonesByName` — the physical-name route docs/import.md's
34396
+ * Auto-resolved section documents, which this method declined to take until
34397
+ * now, so a type the table listed as auto-resolved silently reported
34398
+ * `skipped-not-found` and (under `--migrate-from-cloudformation`) was left
34399
+ * out of state after the CloudFormation stack had already been retired.
34400
+ *
34401
+ * Three properties of the lookup matter and none of them is incidental:
34402
+ * the query name is canonicalized to AWS's ordering key
34403
+ * (`canonicalizeQueryName`) so a bounded page cannot skip past the zone; a
34404
+ * name matching MORE than one zone is REFUSED rather than guessed at
34405
+ * (split-horizon DNS), except that the template's own `VPCs` first narrows
34406
+ * the match to the public or private side (`templateZoneVisibility`), which
34407
+ * is what makes the ordinary split-horizon pair resolve cleanly; and the
34408
+ * two ways of failing are kept DISTINCT — a proven absence returns `null`
34409
+ * (`skipped-not-found`, the next deploy creates the zone) while an
34410
+ * ambiguous name or a failed lookup throws, which `importOne` records as
34411
+ * `failed` for this row alone.
34412
+ */
34318
34413
  async importHostedZone(input) {
34319
34414
  if (input.knownPhysicalId) try {
34320
34415
  await this.getClient().send(new GetHostedZoneCommand({ Id: input.knownPhysicalId }));
@@ -34326,7 +34421,24 @@ var Route53Provider = class {
34326
34421
  if (err instanceof Error && err.name === "NoSuchHostedZone") return null;
34327
34422
  throw err;
34328
34423
  }
34329
- return null;
34424
+ const zoneName = input.properties["Name"];
34425
+ if (typeof zoneName !== "string" || !zoneName) return null;
34426
+ try {
34427
+ return {
34428
+ physicalId: await this.resolveHostedZoneId({ HostedZoneName: zoneName }, input.logicalId, input.resourceType, void 0, {
34429
+ requireUnambiguousZoneName: true,
34430
+ requirePrivateZone: templateZoneVisibility(input.properties),
34431
+ subject: {
34432
+ noun: "hosted zone",
34433
+ remedy: `pass --resource ${input.logicalId}=<hostedZoneId> to adopt it explicitly`
34434
+ }
34435
+ }),
34436
+ attributes: {}
34437
+ };
34438
+ } catch (error) {
34439
+ if (error instanceof HostedZoneNameNotFoundError) return null;
34440
+ throw error;
34441
+ }
34330
34442
  }
34331
34443
  };
34332
34444
 
@@ -41101,6 +41213,134 @@ function isKmsEncryption(value) {
41101
41213
  return value["EncryptionType"] === "KMS";
41102
41214
  }
41103
41215
  /**
41216
+ * The seven shard-level metrics `ALL` expands to.
41217
+ *
41218
+ * MEASURED, not copied from the docs (us-east-1, 2026-08-12): an
41219
+ * `EnableEnhancedMonitoring(ShardLevelMetrics: ['ALL'])` responds with exactly
41220
+ * these seven in `DesiredShardLevelMetrics`, and once the stream settles back
41221
+ * to ACTIVE `DescribeStream` reports the same seven — never the literal `ALL`.
41222
+ * The readback order is AWS-chosen and matched neither the input order nor
41223
+ * alphabetical, which is why the type also declares the path unordered (see
41224
+ * {@link KinesisStreamProvider.getDriftUnorderedPaths}).
41225
+ */
41226
+ const ALL_SHARD_LEVEL_METRICS = [
41227
+ "IncomingBytes",
41228
+ "IncomingRecords",
41229
+ "OutgoingBytes",
41230
+ "OutgoingRecords",
41231
+ "WriteProvisionedThroughputExceeded",
41232
+ "ReadProvisionedThroughputExceeded",
41233
+ "IteratorAgeMilliseconds"
41234
+ ];
41235
+ /**
41236
+ * Whether a value is a usable shard-level-metrics list: an array whose every
41237
+ * element is a string.
41238
+ *
41239
+ * A MIXED array (`['IncomingBytes', {Ref: 'X'}]`) is deliberately UNUSABLE
41240
+ * rather than partially usable. Filtering the unresolved element away would put
41241
+ * a list on the wire that the template never declared, while state recorded the
41242
+ * declared one — the permanent phantom drift `effectiveProperties` exists to
41243
+ * prevent, arrived at through the back door.
41244
+ */
41245
+ function isUsableMetricsList(value) {
41246
+ return Array.isArray(value) && value.every((entry) => typeof entry === "string");
41247
+ }
41248
+ /**
41249
+ * Expand the `ALL` shard-level-metrics shorthand into the seven metric names
41250
+ * AWS actually stores.
41251
+ *
41252
+ * This is the ONE definition of the rule, shared by the provisioning path (what
41253
+ * goes on the wire, and therefore what `effectiveProperties` records) and by
41254
+ * {@link KinesisStreamProvider.canonicalizeDesiredProperties} (what the diff
41255
+ * compares). Deriving it twice is how state and template end up narrowed
41256
+ * differently — see the `effectiveProperties` contract in
41257
+ * `.claude/rules/providers.md`.
41258
+ *
41259
+ * Idempotent: an already-expanded list is returned with its own values (deduped
41260
+ * and otherwise untouched), so a state-borne bag that has been through this
41261
+ * before is unchanged. An UNUSABLE value is returned as-is — the callers that
41262
+ * put bytes on the wire refuse it via {@link readShardLevelMetrics} rather than
41263
+ * sending a partial list, and `canonicalizeDesiredProperties` must stay a total
41264
+ * function because the diff runs on bags no provider validated.
41265
+ */
41266
+ function expandShardLevelMetrics(value) {
41267
+ if (!isUsableMetricsList(value)) return value;
41268
+ const names = value;
41269
+ const expanded = names.includes("ALL") ? [...names.filter((n) => n !== "ALL"), ...ALL_SHARD_LEVEL_METRICS] : names;
41270
+ const seen = /* @__PURE__ */ new Set();
41271
+ const deduped = [];
41272
+ for (const name of expanded) {
41273
+ if (seen.has(name)) continue;
41274
+ seen.add(name);
41275
+ deduped.push(name);
41276
+ }
41277
+ if (deduped.length === names.length && deduped.every((n, i) => n === names[i])) return value;
41278
+ return deduped;
41279
+ }
41280
+ /**
41281
+ * Classify a declared `DesiredShardLevelMetrics` value, expanding `ALL` when it
41282
+ * is usable.
41283
+ *
41284
+ * Callers own the ACTION per the update-path rules in
41285
+ * `.claude/rules/providers.md`: a create refuses an unusable value (it is
41286
+ * template-borne), an update WARNS and skips (it may be replaying a state
41287
+ * record, where refusing would leave the resource un-rollbackable). The
41288
+ * previous side is never routed through the refusal at all — see
41289
+ * {@link previousMetricNames}.
41290
+ */
41291
+ function readShardLevelMetrics(value) {
41292
+ if (value == null) return { kind: "absent" };
41293
+ if (!isUsableMetricsList(value)) return {
41294
+ kind: "unusable",
41295
+ reason: `AWS::Kinesis::Stream DesiredShardLevelMetrics must be an array of metric-name strings, got ${JSON.stringify(value)}`
41296
+ };
41297
+ const expanded = expandShardLevelMetrics(value);
41298
+ return {
41299
+ kind: "usable",
41300
+ metrics: expanded,
41301
+ expanded
41302
+ };
41303
+ }
41304
+ /**
41305
+ * Read the PREVIOUS side leniently: it comes from cdkd state, not the user's
41306
+ * template, so an unreadable value recorded by an older binary must never
41307
+ * refuse the update (the #1471 desired-side-only rule). An unusable previous
41308
+ * side simply contributes no metrics to disable.
41309
+ */
41310
+ function previousMetricNames(value) {
41311
+ const expanded = expandShardLevelMetrics(value);
41312
+ return isUsableMetricsList(expanded) ? expanded : [];
41313
+ }
41314
+ function readMaxRecordSize(value) {
41315
+ if (value == null) return { kind: "absent" };
41316
+ if (typeof value === "number" && Number.isFinite(value)) return {
41317
+ kind: "usable",
41318
+ size: value
41319
+ };
41320
+ if (typeof value === "string" && value.trim() !== "") {
41321
+ const n = Number(value);
41322
+ if (Number.isFinite(n)) return {
41323
+ kind: "usable",
41324
+ size: n
41325
+ };
41326
+ }
41327
+ return {
41328
+ kind: "unusable",
41329
+ reason: `AWS::Kinesis::Stream MaxRecordSizeInKiB must be a number, got ${JSON.stringify(value)}`
41330
+ };
41331
+ }
41332
+ /**
41333
+ * The comparison-side read: the UPDATE path needs both sides reduced to the
41334
+ * same shape so a state record holding the number and a template holding the
41335
+ * numeric string do not read as a change and re-issue the call every deploy.
41336
+ * Unusable / absent both yield `undefined`, which the caller treats as "no
41337
+ * declared size" rather than refusing — the previous side is state-borne.
41338
+ */
41339
+ function comparableRecordSize(value) {
41340
+ const read = readMaxRecordSize(value);
41341
+ return read.kind === "usable" ? read.size : void 0;
41342
+ }
41343
+ /**
41104
41344
  * AWS Kinesis Stream Provider
41105
41345
  *
41106
41346
  * Implements resource provisioning for AWS::Kinesis::Stream using the Kinesis SDK.
@@ -41118,7 +41358,9 @@ var KinesisStreamProvider = class {
41118
41358
  "ShardCount",
41119
41359
  "Tags",
41120
41360
  "RetentionPeriodHours",
41121
- "StreamEncryption"
41361
+ "StreamEncryption",
41362
+ "DesiredShardLevelMetrics",
41363
+ "MaxRecordSizeInKiB"
41122
41364
  ])]]);
41123
41365
  getClient() {
41124
41366
  if (!this.client) this.client = new KinesisClient(this.providerRegion ? { region: this.providerRegion } : {});
@@ -41127,17 +41369,25 @@ var KinesisStreamProvider = class {
41127
41369
  /**
41128
41370
  * Create a Kinesis stream
41129
41371
  */
41130
- async create(logicalId, resourceType, properties) {
41372
+ async create(logicalId, resourceType, properties, context) {
41131
41373
  this.logger.debug(`Creating Kinesis stream ${logicalId}`);
41132
41374
  const streamName = properties["Name"] || generateResourceName(logicalId, { maxLength: 128 });
41375
+ const desiredRead = readShardLevelMetrics(properties["DesiredShardLevelMetrics"]);
41376
+ if (desiredRead.kind === "unusable") if (context?.replayingState === true) this.logger.warn(`${desiredRead.reason}. Replaying a state record, so the shard-level metrics are left unset on ${streamName} rather than refusing the restore`);
41377
+ else throw new ProvisioningError(desiredRead.reason, resourceType, logicalId, streamName);
41378
+ const maxRecordRead = readMaxRecordSize(properties["MaxRecordSizeInKiB"]);
41379
+ if (maxRecordRead.kind === "unusable") if (context?.replayingState === true) this.logger.warn(`${maxRecordRead.reason}. Replaying a state record, so ${streamName} is created with AWS's default maximum record size rather than refusing the restore`);
41380
+ else throw new ProvisioningError(maxRecordRead.reason, resourceType, logicalId, streamName);
41133
41381
  try {
41134
41382
  const streamModeDetails = properties["StreamModeDetails"];
41135
41383
  const streamMode = readConfigString(streamModeDetails, "StreamMode", "PROVISIONED", "AWS::Kinesis::Stream StreamModeDetails");
41136
41384
  const shardCount = streamMode === "PROVISIONED" ? Number(properties["ShardCount"] ?? 1) : void 0;
41385
+ const maxRecordSizeInKiB = maxRecordRead.kind === "usable" ? maxRecordRead.size : void 0;
41137
41386
  await this.getClient().send(new CreateStreamCommand({
41138
41387
  StreamName: streamName,
41139
41388
  ...shardCount !== void 0 && { ShardCount: shardCount },
41140
- StreamModeDetails: { StreamMode: streamMode }
41389
+ StreamModeDetails: { StreamMode: streamMode },
41390
+ ...maxRecordSizeInKiB !== void 0 && { MaxRecordSizeInKiB: maxRecordSizeInKiB }
41141
41391
  }));
41142
41392
  this.logger.debug(`CreateStream initiated for ${streamName}, waiting for ACTIVE status`);
41143
41393
  const streamInfo = await this.waitForStreamActive(streamName);
@@ -41174,10 +41424,21 @@ var KinesisStreamProvider = class {
41174
41424
  }));
41175
41425
  await this.waitForStreamActive(streamName);
41176
41426
  }
41427
+ const desiredMetrics = desiredRead.kind === "usable" ? desiredRead.expanded : void 0;
41428
+ const metricsToEnable = desiredRead.kind === "usable" ? desiredRead.metrics : [];
41429
+ if (metricsToEnable.length > 0) {
41430
+ this.logger.debug(`Enabling ${metricsToEnable.length} shard-level metric(s) on ${streamName}`);
41431
+ await this.getClient().send(new EnableEnhancedMonitoringCommand({
41432
+ StreamName: streamName,
41433
+ ShardLevelMetrics: metricsToEnable
41434
+ }));
41435
+ await this.waitForStreamActive(streamName);
41436
+ }
41177
41437
  this.logger.debug(`Successfully created Kinesis stream ${logicalId}: ${streamName}`);
41178
41438
  return {
41179
41439
  physicalId: streamName,
41180
- attributes: { Arn: streamInfo.streamArn }
41440
+ attributes: { Arn: streamInfo.streamArn },
41441
+ ...this.effectiveMetricsProperties(properties, desiredMetrics)
41181
41442
  };
41182
41443
  } catch (error) {
41183
41444
  if (error instanceof ProvisioningError) throw error;
@@ -41263,10 +41524,49 @@ var KinesisStreamProvider = class {
41263
41524
  await this.waitForStreamActive(physicalId);
41264
41525
  }
41265
41526
  }
41527
+ const desiredSizeRead = readMaxRecordSize(properties["MaxRecordSizeInKiB"]);
41528
+ if (desiredSizeRead.kind === "unusable") this.logger.warn(`${desiredSizeRead.reason}. Leaving the maximum record size on ${physicalId} unchanged; the same value is REFUSED on a template-path create`);
41529
+ const newMaxRecordSize = comparableRecordSize(properties["MaxRecordSizeInKiB"]);
41530
+ const oldMaxRecordSize = comparableRecordSize(previousProperties["MaxRecordSizeInKiB"]);
41531
+ if (newMaxRecordSize !== void 0 && newMaxRecordSize !== oldMaxRecordSize) {
41532
+ this.logger.debug(`Updating max record size for ${physicalId}: ${oldMaxRecordSize} -> ${newMaxRecordSize}`);
41533
+ await this.getClient().send(new UpdateMaxRecordSizeCommand({
41534
+ StreamARN: await this.resolveStreamArn(physicalId),
41535
+ MaxRecordSizeInKiB: newMaxRecordSize
41536
+ }));
41537
+ await this.waitForStreamActive(physicalId);
41538
+ }
41539
+ const desiredRead = readShardLevelMetrics(properties["DesiredShardLevelMetrics"]);
41540
+ let desiredMetrics;
41541
+ if (desiredRead.kind === "unusable") this.logger.warn(`${desiredRead.reason}. Leaving the shard-level metrics on ${physicalId} unchanged rather than disabling the live ones; the same value is REFUSED on a template-path create`);
41542
+ else {
41543
+ desiredMetrics = desiredRead.kind === "usable" ? desiredRead.expanded : void 0;
41544
+ const desiredSet = desiredRead.kind === "usable" ? desiredRead.metrics : [];
41545
+ const previousSet = previousMetricNames(previousProperties["DesiredShardLevelMetrics"]);
41546
+ const toDisable = previousSet.filter((m) => !desiredSet.includes(m));
41547
+ const toEnable = desiredSet.filter((m) => !previousSet.includes(m));
41548
+ if (toDisable.length > 0) {
41549
+ this.logger.debug(`Disabling ${toDisable.length} shard-level metric(s) on ${physicalId}`);
41550
+ await this.getClient().send(new DisableEnhancedMonitoringCommand({
41551
+ StreamName: physicalId,
41552
+ ShardLevelMetrics: toDisable
41553
+ }));
41554
+ await this.waitForStreamActive(physicalId);
41555
+ }
41556
+ if (toEnable.length > 0) {
41557
+ this.logger.debug(`Enabling ${toEnable.length} shard-level metric(s) on ${physicalId}`);
41558
+ await this.getClient().send(new EnableEnhancedMonitoringCommand({
41559
+ StreamName: physicalId,
41560
+ ShardLevelMetrics: toEnable
41561
+ }));
41562
+ await this.waitForStreamActive(physicalId);
41563
+ }
41564
+ }
41266
41565
  return {
41267
41566
  physicalId,
41268
41567
  wasReplaced: false,
41269
- attributes: { Arn: (await this.getClient().send(new DescribeStreamCommand({ StreamName: physicalId }))).StreamDescription?.StreamARN }
41568
+ attributes: { Arn: (await this.getClient().send(new DescribeStreamCommand({ StreamName: physicalId }))).StreamDescription?.StreamARN },
41569
+ ...this.effectiveMetricsProperties(properties, desiredMetrics)
41270
41570
  };
41271
41571
  } catch (error) {
41272
41572
  const cause = error instanceof Error ? error : void 0;
@@ -41295,6 +41595,52 @@ var KinesisStreamProvider = class {
41295
41595
  }
41296
41596
  }
41297
41597
  /**
41598
+ * The `effectiveProperties` half of the `ALL` expansion (issue #609).
41599
+ *
41600
+ * Returns a spreadable `{ effectiveProperties }` ONLY when the expansion
41601
+ * actually rewrote the declared value; otherwise `{}`, so the engine records
41602
+ * the desired bag verbatim (the `??` gate on the engine side treats an absent
41603
+ * field as "record the desired properties"). The returned bag is a COMPLETE
41604
+ * replacement, not a patch, per the `EffectivePropertiesResult` contract.
41605
+ */
41606
+ effectiveMetricsProperties(properties, expanded) {
41607
+ if (expanded === void 0) return {};
41608
+ if (expanded === properties["DesiredShardLevelMetrics"]) return {};
41609
+ return { effectiveProperties: {
41610
+ ...properties,
41611
+ DesiredShardLevelMetrics: expanded
41612
+ } };
41613
+ }
41614
+ /**
41615
+ * Narrow the desired bag the same way the provisioning path does, so the
41616
+ * diff compares the EXPANDED metric list on both sides.
41617
+ *
41618
+ * Required paired half of the `effectiveProperties` above: without it, state
41619
+ * holds the seven expanded names while the template still says `ALL`, and
41620
+ * every later `cdkd deploy` / `cdkd diff` reads that as a user-made change.
41621
+ * Shares {@link expandShardLevelMetrics} rather than re-deriving the rule.
41622
+ */
41623
+ canonicalizeDesiredProperties(resourceType, properties) {
41624
+ if (resourceType !== "AWS::Kinesis::Stream") return properties;
41625
+ if (!("DesiredShardLevelMetrics" in properties)) return properties;
41626
+ const expanded = expandShardLevelMetrics(properties["DesiredShardLevelMetrics"]);
41627
+ if (expanded === properties["DesiredShardLevelMetrics"]) return properties;
41628
+ return {
41629
+ ...properties,
41630
+ DesiredShardLevelMetrics: expanded
41631
+ };
41632
+ }
41633
+ /**
41634
+ * `DesiredShardLevelMetrics` is a SET: AWS returns it in an order that
41635
+ * matched neither the request order nor alphabetical when measured
41636
+ * (us-east-1, 2026-08-12), so comparing positionally would report drift on a
41637
+ * stream nobody touched.
41638
+ */
41639
+ getDriftUnorderedPaths(resourceType) {
41640
+ if (resourceType !== "AWS::Kinesis::Stream") return [];
41641
+ return ["DesiredShardLevelMetrics"];
41642
+ }
41643
+ /**
41298
41644
  * Apply a diff between old and new CFn-shape Tags arrays via Kinesis's
41299
41645
  * `AddTagsToStream` (map shape) / `RemoveTagsFromStream` (TagKeys list)
41300
41646
  * APIs.
@@ -41338,8 +41684,10 @@ var KinesisStreamProvider = class {
41338
41684
  *
41339
41685
  * Issues `DescribeStream` and surfaces the keys cdkd's `create()`
41340
41686
  * accepts: `Name`, `StreamModeDetails`, `ShardCount`, `RetentionPeriodHours`,
41341
- * and `StreamEncryption`. Tags are surfaced via a follow-up
41342
- * `ListTagsForStream` with `aws:*` filtered out.
41687
+ * `StreamEncryption`, and `DesiredShardLevelMetrics`. Tags are surfaced via a
41688
+ * follow-up `ListTagsForStream` with `aws:*` filtered out, and
41689
+ * `MaxRecordSizeInKiB` via a follow-up `DescribeStreamSummary` (the field is
41690
+ * absent from `DescribeStream`'s `StreamDescription` shape).
41343
41691
  *
41344
41692
  * `ShardCount` is reported as the count of `Shards[]` in the stream
41345
41693
  * description (only present for PROVISIONED-mode streams; ON_DEMAND
@@ -41375,6 +41723,14 @@ var KinesisStreamProvider = class {
41375
41723
  if (stream.KeyId !== void 0) encryption["KeyId"] = stream.KeyId;
41376
41724
  result["StreamEncryption"] = encryption;
41377
41725
  }
41726
+ result["DesiredShardLevelMetrics"] = (stream.EnhancedMonitoring ?? []).flatMap((entry) => entry.ShardLevelMetrics ?? []);
41727
+ try {
41728
+ const maxRecordSize = (await this.getClient().send(new DescribeStreamSummaryCommand({ StreamName: physicalId }))).StreamDescriptionSummary?.MaxRecordSizeInKiB;
41729
+ if (maxRecordSize !== void 0) result["MaxRecordSizeInKiB"] = maxRecordSize;
41730
+ } catch (err) {
41731
+ if (err instanceof ResourceNotFoundException$10) return void 0;
41732
+ throw err;
41733
+ }
41378
41734
  try {
41379
41735
  result["Tags"] = normalizeAwsTagsToCfn((await this.getClient().send(new ListTagsForStreamCommand({ StreamName: physicalId }))).Tags);
41380
41736
  } catch (err) {
@@ -72376,7 +72732,7 @@ function createMigrateCommand() {
72376
72732
  */
72377
72733
  function buildProgram() {
72378
72734
  const program = new Command();
72379
- program.name("cdkd").description("CDK Direct - Deploy AWS CDK apps directly via SDK/Cloud Control API").version("0.281.1");
72735
+ program.name("cdkd").description("CDK Direct - Deploy AWS CDK apps directly via SDK/Cloud Control API").version("0.281.3");
72380
72736
  program.hook("preAction", (_thisCommand, actionCommand) => {
72381
72737
  const { profile } = actionCommand.optsWithGlobals();
72382
72738
  if (profile !== void 0) process.env["AWS_PROFILE"] = profile;