@go-to-k/cdkd 0.313.0 → 0.315.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (35) hide show
  1. package/dist/{asg-provider-CqPtIngx.js → asg-provider-DpNkEibf.js} +43 -7
  2. package/dist/asg-provider-DpNkEibf.js.map +1 -0
  3. package/dist/{aws-failure-text-NSBdKPYK.js → aws-failure-text-agWtoyga.js} +5 -2
  4. package/dist/{aws-failure-text-NSBdKPYK.js.map → aws-failure-text-agWtoyga.js.map} +1 -1
  5. package/dist/cli.js +2 -2
  6. package/dist/{created-resource-sink-BT2Dfnpt.js → created-resource-sink-QECX8C-Z.js} +3 -3
  7. package/dist/{created-resource-sink-BT2Dfnpt.js.map → created-resource-sink-QECX8C-Z.js.map} +1 -1
  8. package/dist/db-instance-modify-retry-B1NRKBSQ.js +44 -0
  9. package/dist/db-instance-modify-retry-B1NRKBSQ.js.map +1 -0
  10. package/dist/{deploy-engine-CwpnkMCZ.js → deploy-engine--bCIMkkk.js} +407 -104
  11. package/dist/deploy-engine--bCIMkkk.js.map +1 -0
  12. package/dist/{iam-role-provider-ARR3C50J.js → iam-role-provider-s5--ZmBZ.js} +4 -4
  13. package/dist/{iam-role-provider-ARR3C50J.js.map → iam-role-provider-s5--ZmBZ.js.map} +1 -1
  14. package/dist/index.d.ts +2 -1
  15. package/dist/index.d.ts.map +1 -1
  16. package/dist/index.js +4 -4
  17. package/dist/{neptune-provider-DfPOAG0q.js → neptune-provider-BNxotnbp.js} +375 -20
  18. package/dist/neptune-provider-BNxotnbp.js.map +1 -0
  19. package/dist/{program-CMP_YVVn.js → program-CMtAmRyw.js} +38 -15
  20. package/dist/program-CMtAmRyw.js.map +1 -0
  21. package/dist/{provider-classes-DefoNqY7.js → provider-classes-B8kkAZqJ.js} +911 -238
  22. package/dist/provider-classes-B8kkAZqJ.js.map +1 -0
  23. package/dist/{rds-provider-Dn-7U1CR.js → rds-provider-Cm3dsmFW.js} +47 -7
  24. package/dist/rds-provider-Cm3dsmFW.js.map +1 -0
  25. package/dist/{version-CsWxTnUg.js → version-Caty7J3x.js} +2 -2
  26. package/dist/{version-CsWxTnUg.js.map → version-Caty7J3x.js.map} +1 -1
  27. package/package.json +1 -1
  28. package/dist/asg-provider-CqPtIngx.js.map +0 -1
  29. package/dist/db-instance-modify-retry-D7wXWxVo.js +0 -38
  30. package/dist/db-instance-modify-retry-D7wXWxVo.js.map +0 -1
  31. package/dist/deploy-engine-CwpnkMCZ.js.map +0 -1
  32. package/dist/neptune-provider-DfPOAG0q.js.map +0 -1
  33. package/dist/program-CMP_YVVn.js.map +0 -1
  34. package/dist/provider-classes-DefoNqY7.js.map +0 -1
  35. package/dist/rds-provider-Dn-7U1CR.js.map +0 -1
@@ -1,16 +1,16 @@
1
1
  import { r as getAwsClients, s as withApiGatewayPacing } from "./aws-clients-Bu9EMILF.js";
2
- import { B as SECRET_REF_MAX_CODE_POINTS, C as generateResourceName, D as getCurrentStackInstanceId, J as displayStackName, K as displayIdent, M as recordedGeneratedNameKept, Q as safeMsg, T as generatedNameFor, Y as isPasteableIdent, Z as plainIdentOr, a as safeStringify, i as isAwsAuthoredFailure, k as isBeforeStateRead, n as describeAwsFailure, q as displaySafe, r as describeAwsStatusReason, s as getLogger, t as VERBOSE_POINTER, w as generateResourceNameWithFallback } from "./aws-failure-text-NSBdKPYK.js";
3
- import { $ as logGroupProtectionSite, $n as plainOrDescribed, A as withoutServerErrorRetries, Ar as markNonRetryable, At as createMaskedLogSinks, B as quotedRemedyLogicalId, C as RecentIdSet, Ct as compositeIdSeparatorRefusal, D as replayFollowedAmbiguousAttempt, Dr as THROTTLING_ERROR_NAMES, E as isInsideWindow, Et as packCompositeId, F as VALUE_NOT_SHOWN, Ft as withDerivedNameMasks, G as ProtectionFlipRegistry, Gt as markCreatedBeforeFailure, H as remedyLogicalId, Ht as isAuxiliaryFailure, I as isPlainImportJson, J as deleteWithProtectionCompensation, Jn as commandHole, Kt as markSupersedesEarlierCreate, L as isPlainImportValue, Mn as ProvisioningError, Mr as wrapMaskedAwsError, Mt as isSecretDerivedValue, N as markNotGone, Nt as maskDeep, O as replayedSendWindow, Or as isMarkedNonRetryable, Ot as segmentAfterAnchor, P as assertRegionMatch, Pn as ResourceUpdateNotSupportedError, Pt as maskerOrIdentity, Q as isTerminalDeleteFailure, R as isQuotableImportValue, Rt as clearCreatedBeforeFailure, S as AmbiguousCreateLatch, Sr as isExplicitDenyError, St as compositeIdFormatMessage, T as createAttemptKey, Tr as isTransientServerError, Tt as logicalIdShown, U as resolveExplicitPhysicalId, V as refusalTypeShown, Wt as markAuxiliaryFailure, Xn as isInertUnquoted, Yn as hasClauseBreak, Z as isTerminalDbWaitStatus, Zn as pasteableCommand, _n as CdkdError, a as retractCreatedResource, an as injectiveKey, at as userPoolProtectionSite, bt as startInterruptWatch, c as SECRET_DERIVED_READ_LIVE, ct as WITHHELD_AWS_COMMAND, d as readPrincipalLists, dn as ambientClientDefaults, dt as protectedReplacementAdvice, et as observeThenDisableProtection, fn as ambientCredentialConfig, fr as markNameCollision, ft as renderDisableCommand, h as clearOnUpdateRemoval, hn as AccountIdUnavailableError, i as reportCreatedResource, j as RESOURCE_NOT_FOUND, jr as markRedactedCause, jt as createMaskedRetryLogger, k as setBounded, kr as isThrottlingError, kt as stateOrphanRecordRemedy, l as holdsSecretDerivedEntry, lt as isAwsCliLiteral, mn as credentialFingerprint, mr as relayedNameCollision, mt as ElapsedBudgetRegistry, nr as shellQuote, nt as rdsFamilyProtectionSite, on as injectiveKeyPrefix, p as recordedPrincipalsRepair, pn as clientDefaultsFor, pr as markReplayMayCollide, pt as ElapsedBudget, q as deleteAfterProtectionFlipWithFinalSnapshot, rr as withheldTargetClause, st as UNNAMEABLE_ID_CLAUSE, tt as protectionFlipKey, u as onlySecretDerived, un as withPasteableAwsProfile, ut as pasteableAwsCommand, v as removedTemplateKeys, vr as explicitDenyPolicyKind, w as ambiguousAttemptLead, wr as isRetryableTransientError, wt as compositeIdSkipResult, x as AMBIGUOUS_LATCH_TTL_MS, xr as isAmbiguousOutcomeError, xt as canonicalizeRoute53QueryName, y as withRemovalDefaults, yt as isInterruptedWaitError, z as normalizeAwsTagsToCfn } from "./created-resource-sink-BT2Dfnpt.js";
2
+ import { $ as safeMsg, A as isBeforeStateRead, E as generatedNameFor, J as displaySafe, N as recordedGeneratedNameKept, O as getCurrentStackInstanceId, Q as plainIdentOr, T as generateResourceNameWithFallback, V as SECRET_REF_MAX_CODE_POINTS, X as isPasteableIdent, Y as displayStackName, a as safeStringify, i as isAwsAuthoredFailure, n as describeAwsFailure, q as displayIdent, r as describeAwsStatusReason, s as getLogger, t as VERBOSE_POINTER, w as generateResourceName } from "./aws-failure-text-agWtoyga.js";
3
+ import { $ as logGroupProtectionSite, $n as plainOrDescribed, A as withoutServerErrorRetries, Ar as markNonRetryable, At as createMaskedLogSinks, B as quotedRemedyLogicalId, C as RecentIdSet, Ct as compositeIdSeparatorRefusal, D as replayFollowedAmbiguousAttempt, Dr as THROTTLING_ERROR_NAMES, E as isInsideWindow, Et as packCompositeId, F as VALUE_NOT_SHOWN, Ft as withDerivedNameMasks, G as ProtectionFlipRegistry, Gt as markCreatedBeforeFailure, H as remedyLogicalId, Ht as isAuxiliaryFailure, I as isPlainImportJson, J as deleteWithProtectionCompensation, Jn as commandHole, Kt as markSupersedesEarlierCreate, L as isPlainImportValue, Mn as ProvisioningError, Mr as wrapMaskedAwsError, Mt as isSecretDerivedValue, N as markNotGone, Nt as maskDeep, O as replayedSendWindow, Or as isMarkedNonRetryable, Ot as segmentAfterAnchor, P as assertRegionMatch, Pn as ResourceUpdateNotSupportedError, Pt as maskerOrIdentity, Q as isTerminalDeleteFailure, R as isQuotableImportValue, Rt as clearCreatedBeforeFailure, S as AmbiguousCreateLatch, Sr as isExplicitDenyError, St as compositeIdFormatMessage, T as createAttemptKey, Tr as isTransientServerError, Tt as logicalIdShown, U as resolveExplicitPhysicalId, V as refusalTypeShown, Wt as markAuxiliaryFailure, X as isProceedDbStatus, Xn as isInertUnquoted, Yn as hasClauseBreak, Z as isTerminalDbWaitStatus, Zn as pasteableCommand, _n as CdkdError, a as retractCreatedResource, an as injectiveKey, at as userPoolProtectionSite, bt as startInterruptWatch, c as SECRET_DERIVED_READ_LIVE, ct as WITHHELD_AWS_COMMAND, d as readPrincipalLists, dn as ambientClientDefaults, dt as protectedReplacementAdvice, et as observeThenDisableProtection, fn as ambientCredentialConfig, fr as markNameCollision, ft as renderDisableCommand, h as clearOnUpdateRemoval, hn as AccountIdUnavailableError, i as reportCreatedResource, j as RESOURCE_NOT_FOUND, jr as markRedactedCause, jt as createMaskedRetryLogger, k as setBounded, kr as isThrottlingError, kt as stateOrphanRecordRemedy, l as holdsSecretDerivedEntry, lt as isAwsCliLiteral, mn as credentialFingerprint, mr as relayedNameCollision, mt as ElapsedBudgetRegistry, nr as shellQuote, nt as rdsFamilyProtectionSite, on as injectiveKeyPrefix, p as recordedPrincipalsRepair, pn as clientDefaultsFor, pr as markReplayMayCollide, pt as ElapsedBudget, q as deleteAfterProtectionFlipWithFinalSnapshot, rr as withheldTargetClause, st as UNNAMEABLE_ID_CLAUSE, tt as protectionFlipKey, u as onlySecretDerived, un as withPasteableAwsProfile, ut as pasteableAwsCommand, v as removedTemplateKeys, vr as explicitDenyPolicyKind, w as ambiguousAttemptLead, wr as isRetryableTransientError, wt as compositeIdSkipResult, x as AMBIGUOUS_LATCH_TTL_MS, xr as isAmbiguousOutcomeError, xt as canonicalizeRoute53QueryName, y as withRemovalDefaults, yt as isInterruptedWaitError, z as normalizeAwsTagsToCfn } from "./created-resource-sink-QECX8C-Z.js";
4
4
  import { c as ambientRegion } from "./aws-client-defaults-BX9Y_fKp.js";
5
- import { $ as getPriorAttempts, $s as isWarmThroughputDecrease, A as DYNAMODB_DELETE_MIN_RESOURCE_TIMEOUT_MS, Ad as renderAssemblyPathEscape, Ai as acquireIdempotencyToken, Ao as accountArgs, B as deleteTableWithIndexBusyRetry, Bc as markSameGenerationBag, Bi as refuseMalformedDesiredTags, Bn as isRedactedRecordedValue, Bs as findSilentDropProperties, C as planContributorInsightsOp, Co as passedParameterClassesOf, D as reverseMapTableContributorInsights, E as reverseMapIndexContributorInsights, Ei as earliestDefined, F as resolveDynamoDbDeleteBudgetClock, Fa as s3BucketDomainName, Fi as markDeleteStarted, Fr as getStackRecords, G as isTtlRateLimited, H as relayedIndexBusyDelete, Hc as recordReferenceProvenanceEntry, Hi as tagPlanWarning, Hn as redactedDeleteAddressSkip, Hs as withoutSilentDropProperties, I as resolveDynamoDbDeleteBudgetMs, Ia as s3BucketDualStackDomainName, Ii as DBPROXY_TAGS_WHAT, It as getNestedRevertRun, J as sendTtlWaitingOutRateLimit, K as planTimeToLive, Kc as hasMaskableValues, L as DELETE_INDEX_WAIT_PROCEED_NOTE, La as s3BucketRegionalDomainName, Li as DBPROXY_TAG_OPTIONS, Ln as getCurrentProducerRegions, Lr as replacedDeleteFailureVerdict, Ls as withheldAccountClause, M as beginDeleteWait, N as compensateRemovedDeletionProtection, Na as isSettledInstanceState, Nr as awaitInFlightSibling, O as stripIndexContributorInsights, Od as describeFileReadFailure, Oi as reserveStackCreateToken, P as deleteBudgetKey, Pa as s3BucketArn, Pc as passedNoEchoParametersOf, Pi as isRefusedByName, Q as isTruthyCfnBoolean, Qs as coerceWarmThroughput$1, R as INDEX_SETTLE_POLL_INTERVAL_MS, Ra as s3BucketWebsiteUrl, Ri as planTagDiff, S as indexDeclaresContributorInsights, Sa as reEnableInstanceApiTermination, Sc as sameLambdaFunctionAddress, T as readContributorInsightsSpec, Ta as isUsableAttemptedName, Ts as refuseMalformedResourcesForDestroy, U as waitForIndexesSettled, Ua as outputReferenceProvenanceOf, Uc as snapshotPassProvenance, Ui as definedAttributes, Ut as getCurrentNestedStackContext, V as maskedLogger, Vc as redactForState, Vi as tagMapAsList, Vn as redactedDeleteAddressFields, W as isTtlAlreadyDisabled, Wi as stringifyIfAssigned, Wt as withNestedStackContext, X as S3_AUTO_DELETE_OBJECTS_TAG, Xi as waitForLambdaFunctionActive, Y as ECR_AUTO_DELETE_IMAGES_TAG, Z as hasCdkAutoDeleteTag, Zs as WARM_THROUGHPUT_MEMBERS, _ as streamMemberRefusals, _l as recordAttributeIdCopy, ac as configIntegerRefusal, as as refuseMalformedNestedChildOutputs, b as CONTRIBUTOR_INSIGHTS_KEY, ba as observeThenDisableInstanceApiTermination, bc as canonicalLambdaFunctionName, bl as carriesSecretMask, bo as parseWebACLArn, c as DynamoDBGlobalTableProvider, ca as unchangedBehindSecretReference, cc as replayWarn, cl as dynamicReferenceTokens, d as declaredStreamPolicyMember, dc as requireConfigString, dd as decodeListingKey, dt as listNestedTemplateRows, ea as getCurrentResourceSecrets, ec as toCfnInteger, en as chunks, et as markRefusedBeforeApplying, f as declaredStreamTagsMember, ft as renderNestedTemplateTreeDefect, fu as rewriteTemplateAssetReferences, g as streamDeclaresTags, ga as markWaitAbandoned, gc as blockDeviceMappingsDifferOnlyInDeleteOnTermination, gl as physicalNameCopiesOf, h as streamDeclaresPolicy, ha as isWaitAbandonedError, hc as withRetry, hd as derivePartitionAndUrlSuffix, hl as recoverMaskedOutput, ic as configBooleanRefusal, iu as timePhase, j as DYNAMODB_DELETE_POLL_COST_MS, jd as resolveAssemblyPath, k as DYNAMODB_DELETE_DEADLINE_MARGIN_MS, kd as displayAssemblyPath, l as STREAM_POLICY_KEY, lc as requireConfigArray, lo as getAccountInfo, lt as findNestedTemplateTreeDefect, m as reverseMapStreamPolicy, ma as withIndeterminateGuard, md as canonicalizeRegion, nc as coerceCfnBoolean, nn as lookupEachName, oa as slowCcOperationTimeoutMs, oc as configStringRefusal, ol as withoutPhysicalNameCopies, p as planStreamMemberOps, pa as deleteSkipReason, pi as secretNamedAttributeNamesOf, q as readTtlSpec, rc as coerceCfnInteger, rn as withApiLimit, sa as onlySecretReferencesDiffer, sc as readConfigString, su as stringifyValue, t as DeployEngine, tc as toFiniteNumber, tn as isAccessDeniedError, u as STREAM_TAGS_KEY, uc as requireConfigObject, ut as isAbsoluteAssetPath, v as streamPolicyMatchesDeclared, va as ec2InstanceProtectionSite, vc as ecsServiceLaunchTypeSetOrChanged, vt as enclosingDeadlineExpired, w as planIndexContributorInsightsOps, x as contributorInsightsRefusals, xa as reDisableInstanceApiTermination, xc as lambdaFunctionNameForMask, y as streamTagsMatchDeclared, ya as isTerminationProtectionPropagationError, yc as emrClusterInstancesReplaced, yt as enclosingDeadlineRemainingMs, z as TABLE_INDEX_NOUN, zi as readTagList, zn as REDACTED_DELETE_ADDRESS_SKIP_REASON, zt as revertNestedChildFromJournal } from "./deploy-engine-CwpnkMCZ.js";
6
- import { n as collectInlinePolicyNamesManagedBySiblings, r as IamCreateClientCache, t as IAMRoleProvider } from "./iam-role-provider-ARR3C50J.js";
7
- import { a as resolveSecretDerivedPrincipals, i as isResolvableSecretPrincipalList, n as runDestroyForStack, o as canonicalizeIpProtocolValue, r as holdsUnprovenSecretPrincipalToken, s as resolvedResourceTimeoutMs, t as canonicalizeIpv4Cidr } from "./program-CMP_YVVn.js";
8
- import { t as modifyDbInstanceWhenAvailable } from "./db-instance-modify-retry-D7wXWxVo.js";
9
- import { RDSProvider } from "./rds-provider-Dn-7U1CR.js";
10
- import { NeptuneProvider } from "./neptune-provider-DfPOAG0q.js";
11
- import { ASGProvider } from "./asg-provider-CqPtIngx.js";
5
+ import { $ as sendTtlWaitingOutRateLimit, A as DYNAMODB_DELETE_MIN_RESOURCE_TIMEOUT_MS, Aa as isUsableAttemptedName, As as refuseMalformedResourcesForDestroy, B as deleteTableWithIndexBusyRetry, Ba as s3BucketDomainName, Bi as markDeleteStarted, Br as getStackRecords, C as planContributorInsightsOp, Ca as ec2InstanceProtectionSite, Cc as ecsServiceLaunchTypeSetOrChanged, Ct as enclosingDeadlineExpired, D as reverseMapTableContributorInsights, Da as reEnableInstanceApiTermination, Dc as sameLambdaFunctionAddress, E as reverseMapIndexContributorInsights, Ea as reDisableInstanceApiTermination, Ec as lambdaFunctionNameForMask, F as resolveDynamoDbDeleteBudgetClock, Fd as renderAssemblyPathEscape, Fi as acquireIdempotencyToken, Fo as accountArgs, G as readbackVectorIndexes, Gc as markSameGenerationBag, Gi as refuseMalformedDesiredTags, Gn as isRedactedRecordedValue, Gs as findSilentDropProperties, H as relayedIndexBusyDelete, Ha as s3BucketRegionalDomainName, Hi as DBPROXY_TAG_OPTIONS, Hn as getCurrentProducerRegions, Hr as replacedDeleteFailureVerdict, Hs as withheldAccountClause, I as resolveDynamoDbDeleteBudgetMs, Id as resolveAssemblyPath, J as vectorIndexesShapeDetail, Ja as outputReferenceProvenanceOf, Jc as snapshotPassProvenance, Ji as definedAttributes, Jt as getCurrentNestedStackContext, K as vectorIndexesForCreate, Kc as redactForState, Ki as tagMapAsList, Kn as redactedDeleteAddressFields, L as DELETE_INDEX_WAIT_PROCEED_NOTE, M as beginDeleteWait, N as compensateRemovedDeletionProtection, Nd as describeFileReadFailure, Ni as reserveStackCreateToken, O as stripIndexContributorInsights, Oo as passedParameterClassesOf, P as deleteBudgetKey, Pd as displayAssemblyPath, Q as readTtlSpec, R as INDEX_SETTLE_POLL_INTERVAL_MS, Ra as isSettledInstanceState, Rr as awaitInFlightSibling, S as indexDeclaresContributorInsights, Sl as recordAttributeIdCopy, T as readContributorInsightsSpec, Ta as observeThenDisableInstanceApiTermination, Tc as canonicalLambdaFunctionName, Tl as carriesSecretMask, To as parseWebACLArn, U as waitForIndexesSettled, Ua as s3BucketWebsiteUrl, Ui as planTagDiff, V as maskedLogger, Va as s3BucketDualStackDomainName, Vi as DBPROXY_TAGS_WHAT, Vt as getNestedRevertRun, W as planVectorIndexUpdates, Wi as readTagList, Wn as REDACTED_DELETE_ADDRESS_SKIP_REASON, Wt as revertNestedChildFromJournal, X as isTtlRateLimited, Y as isTtlAlreadyDisabled, Yi as stringifyIfAssigned, Yt as withNestedStackContext, Z as planTimeToLive, Zc as hasMaskableValues, _ as streamMemberRefusals, _t as renderNestedTemplateTreeDefect, _u as rewriteTemplateAssetReferences, aa as getCurrentResourceSecrets, ac as toCfnInteger, an as chunks, at as markRefusedBeforeApplying, b as CONTRIBUTOR_INSIGHTS_KEY, ba as isWaitAbandonedError, bc as withRetry, bd as derivePartitionAndUrlSuffix, bl as recoverMaskedOutput, c as DynamoDBGlobalTableProvider, cc as coerceCfnInteger, cn as withApiLimit, d as declaredStreamPolicyMember, da as slowCcOperationTimeoutMs, dc as configStringRefusal, dl as withoutPhysicalNameCopies, et as ECR_AUTO_DELETE_IMAGES_TAG, f as declaredStreamTagsMember, fa as onlySecretReferencesDiffer, fc as readConfigString, fu as stringifyValue, g as streamDeclaresTags, gc as requireConfigString, gd as decodeListingKey, gt as listNestedTemplateRows, h as streamDeclaresPolicy, hc as requireConfigObject, ht as isAbsoluteAssetPath, ic as isWarmThroughputDecrease, it as getPriorAttempts, j as DYNAMODB_DELETE_POLL_COST_MS, ji as earliestDefined, k as DYNAMODB_DELETE_DEADLINE_MARGIN_MS, l as STREAM_POLICY_KEY, lc as configBooleanRefusal, lu as timePhase, m as reverseMapStreamPolicy, mc as requireConfigArray, mo as getAccountInfo, mt as findNestedTemplateTreeDefect, nc as WARM_THROUGHPUT_MEMBERS, nt as hasCdkAutoDeleteTag, oc as toFiniteNumber, on as isAccessDeniedError, p as planStreamMemberOps, pa as unchangedBehindSecretReference, pc as replayWarn, pl as dynamicReferenceTokens, q as vectorIndexesSettled, qc as recordReferenceProvenanceEntry, qi as tagPlanWarning, qn as redactedDeleteAddressSkip, qs as withoutSilentDropProperties, rc as coerceWarmThroughput$1, rt as isTruthyCfnBoolean, sc as coerceCfnBoolean, sn as lookupEachName, t as DeployEngine, ta as waitForLambdaFunctionActive, tt as S3_AUTO_DELETE_OBJECTS_TAG, u as STREAM_TAGS_KEY, uc as configIntegerRefusal, us as refuseMalformedNestedChildOutputs, v as streamPolicyMatchesDeclared, va as deleteSkipReason, vi as secretNamedAttributeNamesOf, w as planIndexContributorInsightsOps, wa as isTerminationProtectionPropagationError, wc as emrClusterInstancesReplaced, wt as enclosingDeadlineRemainingMs, x as contributorInsightsRefusals, xa as markWaitAbandoned, xc as blockDeviceMappingsDifferOnlyInDeleteOnTermination, xl as physicalNameCopiesOf, y as streamTagsMatchDeclared, ya as withIndeterminateGuard, yd as canonicalizeRegion, z as TABLE_INDEX_NOUN, za as s3BucketArn, zc as passedNoEchoParametersOf, zi as isRefusedByName } from "./deploy-engine--bCIMkkk.js";
6
+ import { n as collectInlinePolicyNamesManagedBySiblings, r as IamCreateClientCache, t as IAMRoleProvider } from "./iam-role-provider-s5--ZmBZ.js";
7
+ import { a as resolveSecretDerivedPrincipals, i as isResolvableSecretPrincipalList, n as runDestroyForStack, o as canonicalizeIpProtocolValue, r as holdsUnprovenSecretPrincipalToken, s as resolvedResourceTimeoutMs, t as canonicalizeIpv4Cidr } from "./program-CMtAmRyw.js";
8
+ import { n as modifyDbInstanceWhenAvailable } from "./db-instance-modify-retry-B1NRKBSQ.js";
9
+ import { RDSProvider } from "./rds-provider-Cm3dsmFW.js";
10
+ import { NeptuneProvider } from "./neptune-provider-BNxotnbp.js";
11
+ import { ASGProvider } from "./asg-provider-DpNkEibf.js";
12
12
  import { createHash, randomUUID } from "node:crypto";
13
- import { 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, ListBucketsCommand, ListObjectVersionsCommand, ListObjectsV2Command, NoSuchBucket, PutBucketAccelerateConfigurationCommand, PutBucketAnalyticsConfigurationCommand, PutBucketCorsCommand, PutBucketEncryptionCommand, PutBucketIntelligentTieringConfigurationCommand, PutBucketInventoryConfigurationCommand, PutBucketLifecycleConfigurationCommand, PutBucketLoggingCommand, PutBucketMetricsConfigurationCommand, PutBucketNotificationConfigurationCommand, PutBucketOwnershipControlsCommand, PutBucketPolicyCommand, PutBucketReplicationCommand, PutBucketTaggingCommand, PutBucketVersioningCommand, PutBucketWebsiteCommand, PutObjectLockConfigurationCommand, PutPublicAccessBlockCommand, S3Client } from "@aws-sdk/client-s3";
13
+ import { CreateBucketCommand, CreateBucketMetadataConfigurationCommand, DeleteBucketAnalyticsConfigurationCommand, DeleteBucketCommand, DeleteBucketCorsCommand, DeleteBucketEncryptionCommand, DeleteBucketIntelligentTieringConfigurationCommand, DeleteBucketInventoryConfigurationCommand, DeleteBucketLifecycleCommand, DeleteBucketMetadataConfigurationCommand, DeleteBucketMetricsConfigurationCommand, DeleteBucketOwnershipControlsCommand, DeleteBucketPolicyCommand, DeleteBucketReplicationCommand, DeleteBucketTaggingCommand, DeleteBucketWebsiteCommand, DeleteObjectsCommand, GetBucketAbacCommand, GetBucketAccelerateConfigurationCommand, GetBucketCorsCommand, GetBucketEncryptionCommand, GetBucketLifecycleConfigurationCommand, GetBucketLocationCommand, GetBucketLoggingCommand, GetBucketMetadataConfigurationCommand, GetBucketNotificationConfigurationCommand, GetBucketOwnershipControlsCommand, GetBucketPolicyCommand, GetBucketReplicationCommand, GetBucketTaggingCommand, GetBucketVersioningCommand, GetBucketWebsiteCommand, GetObjectCommand, GetObjectLockConfigurationCommand, GetPublicAccessBlockCommand, HeadBucketCommand, ListBucketAnalyticsConfigurationsCommand, ListBucketIntelligentTieringConfigurationsCommand, ListBucketInventoryConfigurationsCommand, ListBucketMetricsConfigurationsCommand, ListBucketsCommand, ListObjectVersionsCommand, ListObjectsV2Command, NoSuchBucket, PutBucketAbacCommand, PutBucketAccelerateConfigurationCommand, PutBucketAnalyticsConfigurationCommand, PutBucketCorsCommand, PutBucketEncryptionCommand, PutBucketIntelligentTieringConfigurationCommand, PutBucketInventoryConfigurationCommand, PutBucketLifecycleConfigurationCommand, PutBucketLoggingCommand, PutBucketMetricsConfigurationCommand, PutBucketNotificationConfigurationCommand, PutBucketOwnershipControlsCommand, PutBucketPolicyCommand, PutBucketReplicationCommand, PutBucketTaggingCommand, PutBucketVersioningCommand, PutBucketWebsiteCommand, PutObjectLockConfigurationCommand, PutPublicAccessBlockCommand, S3Client, UpdateBucketMetadataAnnotationTableConfigurationCommand, UpdateBucketMetadataInventoryTableConfigurationCommand, UpdateBucketMetadataJournalTableConfigurationCommand } from "@aws-sdk/client-s3";
14
14
  import { AddRoleToInstanceProfileCommand, AddUserToGroupCommand, AttachGroupPolicyCommand, AttachRolePolicyCommand, AttachUserPolicyCommand, CreateAccessKeyCommand, CreateGroupCommand, CreateInstanceProfileCommand, CreateLoginProfileCommand, CreatePolicyCommand, CreatePolicyVersionCommand, CreateUserCommand, DeleteAccessKeyCommand, DeleteGroupCommand, DeleteGroupPolicyCommand, DeleteInstanceProfileCommand, DeleteLoginProfileCommand, DeletePolicyCommand, DeletePolicyVersionCommand, DeleteRolePolicyCommand, DeleteUserCommand, DeleteUserPermissionsBoundaryCommand, DeleteUserPolicyCommand, DetachGroupPolicyCommand, DetachRolePolicyCommand, DetachUserPolicyCommand, GetAccessKeyLastUsedCommand, GetGroupCommand, GetGroupPolicyCommand, GetInstanceProfileCommand, GetPolicyCommand, GetPolicyVersionCommand, GetRolePolicyCommand, GetUserCommand, GetUserPolicyCommand, IAMClient, ListAccessKeysCommand, ListAttachedGroupPoliciesCommand, ListAttachedUserPoliciesCommand, ListEntitiesForPolicyCommand, ListGroupPoliciesCommand, ListGroupsForUserCommand, ListPoliciesCommand, ListPolicyTagsCommand, ListPolicyVersionsCommand, ListUserPoliciesCommand, NoSuchEntityException, PutGroupPolicyCommand, PutRolePolicyCommand, PutUserPermissionsBoundaryCommand, PutUserPolicyCommand, RemoveRoleFromInstanceProfileCommand, RemoveUserFromGroupCommand, TagPolicyCommand, TagUserCommand, UntagPolicyCommand, UntagUserCommand, UpdateAccessKeyCommand, UpdateGroupCommand, UpdateLoginProfileCommand, UpdateUserCommand } from "@aws-sdk/client-iam";
15
15
  import { CreateQueueCommand, DeleteQueueCommand, GetQueueAttributesCommand, GetQueueUrlCommand, ListQueueTagsCommand, QueueDoesNotExist, SQSClient, SetQueueAttributesCommand, TagQueueCommand, UntagQueueCommand } from "@aws-sdk/client-sqs";
16
16
  import { CreateTopicCommand, DeleteTopicCommand, GetSubscriptionAttributesCommand, GetTopicAttributesCommand, InvalidParameterException, ListSubscriptionsByTopicCommand, ListTagsForResourceCommand, ListTopicsCommand, NotFoundException, SNSClient, SetSubscriptionAttributesCommand, SetTopicAttributesCommand, SubscribeCommand, TagResourceCommand, UnsubscribeCommand, UntagResourceCommand } from "@aws-sdk/client-sns";
@@ -39,30 +39,30 @@ import { CreateAliasCommand, CreateKeyCommand, DeleteAliasCommand, DescribeKeyCo
39
39
  import { CreateRepositoryCommand, DeleteLifecyclePolicyCommand, DeleteRepositoryCommand, DeleteRepositoryPolicyCommand, DescribeRepositoriesCommand, ECRClient, GetLifecyclePolicyCommand, LifecyclePolicyNotFoundException, ListTagsForResourceCommand as ListTagsForResourceCommand$9, PutImageScanningConfigurationCommand, PutImageTagMutabilityCommand, PutLifecyclePolicyCommand, RepositoryNotEmptyException, RepositoryNotFoundException, SetRepositoryPolicyCommand, TagResourceCommand as TagResourceCommand$12, UntagResourceCommand as UntagResourceCommand$12 } from "@aws-sdk/client-ecr";
40
40
  import { isDeepStrictEqual } from "node:util";
41
41
  import { AddTagsToResourceCommand as AddTagsToResourceCommand$2, CreateDBProxyCommand, CreateDBProxyEndpointCommand, DBProxyEndpointNotFoundFault, DBProxyNotFoundFault, DBProxyTargetGroupNotFoundFault, DBProxyTargetNotFoundFault, DeleteDBProxyCommand, DeleteDBProxyEndpointCommand, DeregisterDBProxyTargetsCommand, DescribeDBProxiesCommand, DescribeDBProxyEndpointsCommand, DescribeDBProxyTargetGroupsCommand, DescribeDBProxyTargetsCommand, ListTagsForResourceCommand as ListTagsForResourceCommand$10, ModifyDBProxyCommand, ModifyDBProxyEndpointCommand, ModifyDBProxyTargetGroupCommand, RDSClient, RegisterDBProxyTargetsCommand, RemoveTagsFromResourceCommand as RemoveTagsFromResourceCommand$2 } from "@aws-sdk/client-rds";
42
+ import { ListTagsForResourceCommand as ListTagsForResourceCommand$11, S3ControlClient, TagResourceCommand as TagResourceCommand$13, UntagResourceCommand as UntagResourceCommand$13 } from "@aws-sdk/client-s3-control";
42
43
  import * as zlib from "node:zlib";
43
- import { ApiGatewayV2Client, CreateApiCommand, CreateAuthorizerCommand as CreateAuthorizerCommand$1, CreateIntegrationCommand, CreateRouteCommand as CreateRouteCommand$1, CreateStageCommand as CreateStageCommand$1, DeleteAccessLogSettingsCommand, DeleteApiCommand, DeleteAuthorizerCommand as DeleteAuthorizerCommand$1, DeleteCorsConfigurationCommand, DeleteIntegrationCommand as DeleteIntegrationCommand$1, DeleteRouteCommand as DeleteRouteCommand$1, DeleteRouteRequestParameterCommand, DeleteRouteSettingsCommand, DeleteStageCommand as DeleteStageCommand$1, GetApiCommand, GetApisCommand, GetAuthorizerCommand as GetAuthorizerCommand$1, GetAuthorizersCommand as GetAuthorizersCommand$1, GetIntegrationCommand, GetIntegrationsCommand, GetRouteCommand, GetStageCommand as GetStageCommand$1, NotFoundException as NotFoundException$3, TagResourceCommand as TagResourceCommand$13, UntagResourceCommand as UntagResourceCommand$13, UpdateApiCommand, UpdateAuthorizerCommand as UpdateAuthorizerCommand$1, UpdateIntegrationCommand, UpdateRouteCommand, UpdateStageCommand as UpdateStageCommand$1 } from "@aws-sdk/client-apigatewayv2";
44
- import { CreateStateMachineCommand, DeleteStateMachineCommand, DescribeStateMachineCommand, ListTagsForResourceCommand as ListTagsForResourceCommand$11, SFNClient, StateMachineDoesNotExist, TagResourceCommand as TagResourceCommand$14, UntagResourceCommand as UntagResourceCommand$14, UpdateStateMachineCommand } from "@aws-sdk/client-sfn";
45
- import { CreateClusterCommand, CreateServiceCommand, DeleteClusterCommand, DeleteServiceCommand, DeregisterTaskDefinitionCommand, DescribeClustersCommand, DescribeServicesCommand, DescribeTaskDefinitionCommand, ECSClient, ListTaskDefinitionsCommand, PutClusterCapacityProvidersCommand, RegisterTaskDefinitionCommand, TagResourceCommand as TagResourceCommand$15, UntagResourceCommand as UntagResourceCommand$15, UpdateClusterCommand, UpdateServiceCommand, waitUntilServicesStable } from "@aws-sdk/client-ecs";
46
- import { AddTagsToResourceCommand as AddTagsToResourceCommand$3, CreateDBClusterCommand as CreateDBClusterCommand$1, CreateDBInstanceCommand as CreateDBInstanceCommand$1, CreateDBSubnetGroupCommand as CreateDBSubnetGroupCommand$1, DeleteDBClusterCommand as DeleteDBClusterCommand$1, DeleteDBInstanceCommand as DeleteDBInstanceCommand$1, DeleteDBSubnetGroupCommand as DeleteDBSubnetGroupCommand$1, DescribeDBClustersCommand as DescribeDBClustersCommand$1, DescribeDBInstancesCommand as DescribeDBInstancesCommand$1, DescribeDBSubnetGroupsCommand as DescribeDBSubnetGroupsCommand$1, DocDBClient, ListTagsForResourceCommand as ListTagsForResourceCommand$12, ModifyDBClusterCommand as ModifyDBClusterCommand$1, ModifyDBInstanceCommand as ModifyDBInstanceCommand$1, ModifyDBSubnetGroupCommand as ModifyDBSubnetGroupCommand$1, RemoveTagsFromResourceCommand as RemoveTagsFromResourceCommand$3 } from "@aws-sdk/client-docdb";
47
- import { CreateWebACLCommand, DeleteWebACLCommand, GetWebACLCommand, ListTagsForResourceCommand as ListTagsForResourceCommand$13, TagResourceCommand as TagResourceCommand$16, UntagResourceCommand as UntagResourceCommand$16, UpdateWebACLCommand, WAFNonexistentItemException, WAFV2Client } from "@aws-sdk/client-wafv2";
48
- import { AddCustomAttributesCommand, CognitoIdentityProviderClient, CreateUserPoolCommand, DeleteUserPoolCommand, DescribeUserPoolCommand, GetUserPoolMfaConfigCommand, ListUserPoolsCommand, ResourceNotFoundException as ResourceNotFoundException$11, SetUserPoolMfaConfigCommand, UntagResourceCommand as UntagResourceCommand$17, UpdateUserPoolCommand } from "@aws-sdk/client-cognito-identity-provider";
49
- import { CreateHttpNamespaceCommand, CreatePrivateDnsNamespaceCommand, CreatePublicDnsNamespaceCommand, CreateServiceCommand as CreateServiceCommand$1, DeleteNamespaceCommand, DeleteServiceAttributesCommand, DeleteServiceCommand as DeleteServiceCommand$1, GetNamespaceCommand, GetOperationCommand, GetServiceAttributesCommand, GetServiceCommand, ListNamespacesCommand, ListTagsForResourceCommand as ListTagsForResourceCommand$14, NamespaceNotFound, ResourceInUse, ServiceDiscoveryClient, ServiceNotFound, TagResourceCommand as TagResourceCommand$17, UntagResourceCommand as UntagResourceCommand$18, UpdateHttpNamespaceCommand, UpdatePrivateDnsNamespaceCommand, UpdatePublicDnsNamespaceCommand, UpdateServiceAttributesCommand, UpdateServiceCommand as UpdateServiceCommand$1 } from "@aws-sdk/client-servicediscovery";
50
- import { AppSyncClient, CreateApiKeyCommand, CreateDataSourceCommand, CreateGraphqlApiCommand, CreateResolverCommand, DeleteApiKeyCommand, DeleteDataSourceCommand, DeleteGraphqlApiCommand, DeleteResolverCommand, GetDataSourceCommand, GetGraphqlApiCommand, GetGraphqlApiEnvironmentVariablesCommand, GetIntrospectionSchemaCommand, GetResolverCommand, ListApiKeysCommand, ListGraphqlApisCommand, NotFoundException as NotFoundException$4, PutGraphqlApiEnvironmentVariablesCommand, StartSchemaCreationCommand, TagResourceCommand as TagResourceCommand$18, UntagResourceCommand as UntagResourceCommand$19, UpdateApiKeyCommand, UpdateDataSourceCommand, UpdateGraphqlApiCommand, UpdateResolverCommand } from "@aws-sdk/client-appsync";
51
- 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, TagResourceCommand as TagResourceCommand$19, UntagResourceCommand as UntagResourceCommand$20, UpdateConnectionCommand, UpdateCrawlerCommand, UpdateDatabaseCommand, UpdateJobCommand, UpdateTableCommand as UpdateTableCommand$1, UpdateTriggerCommand, UpdateWorkflowCommand } from "@aws-sdk/client-glue";
52
- import { BudgetsClient, CreateBudgetCommand, CreateNotificationCommand, CreateSubscriberCommand, DeleteBudgetCommand, DeleteNotificationCommand, DeleteSubscriberCommand, DescribeBudgetCommand, DescribeNotificationsForBudgetCommand, DescribeSubscribersForNotificationCommand, DuplicateRecordException, ListTagsForResourceCommand as ListTagsForResourceCommand$15, NotFoundException as NotFoundException$5, TagResourceCommand as TagResourceCommand$20, UntagResourceCommand as UntagResourceCommand$21, UpdateBudgetCommand } from "@aws-sdk/client-budgets";
53
- import { AddTagsToStreamCommand, CreateStreamCommand, DecreaseStreamRetentionPeriodCommand, DeleteStreamCommand, DeregisterStreamConsumerCommand, DescribeStreamCommand, DescribeStreamConsumerCommand, DescribeStreamSummaryCommand, DisableEnhancedMonitoringCommand, EnableEnhancedMonitoringCommand, IncreaseStreamRetentionPeriodCommand, KinesisClient, ListTagsForResourceCommand as ListTagsForResourceCommand$16, ListTagsForStreamCommand, RegisterStreamConsumerCommand, RemoveTagsFromStreamCommand, ResourceNotFoundException as ResourceNotFoundException$12, StartStreamEncryptionCommand, StopStreamEncryptionCommand, TagResourceCommand as TagResourceCommand$21, UntagResourceCommand as UntagResourceCommand$22, UpdateMaxRecordSizeCommand, UpdateShardCountCommand, UpdateStreamModeCommand, UpdateStreamRecordDistributionStrategyCommand } from "@aws-sdk/client-kinesis";
44
+ import { ApiGatewayV2Client, CreateApiCommand, CreateAuthorizerCommand as CreateAuthorizerCommand$1, CreateIntegrationCommand, CreateRouteCommand as CreateRouteCommand$1, CreateStageCommand as CreateStageCommand$1, DeleteAccessLogSettingsCommand, DeleteApiCommand, DeleteAuthorizerCommand as DeleteAuthorizerCommand$1, DeleteCorsConfigurationCommand, DeleteIntegrationCommand as DeleteIntegrationCommand$1, DeleteRouteCommand as DeleteRouteCommand$1, DeleteRouteRequestParameterCommand, DeleteRouteSettingsCommand, DeleteStageCommand as DeleteStageCommand$1, GetApiCommand, GetApisCommand, GetAuthorizerCommand as GetAuthorizerCommand$1, GetAuthorizersCommand as GetAuthorizersCommand$1, GetIntegrationCommand, GetIntegrationsCommand, GetRouteCommand, GetStageCommand as GetStageCommand$1, NotFoundException as NotFoundException$3, TagResourceCommand as TagResourceCommand$14, UntagResourceCommand as UntagResourceCommand$14, UpdateApiCommand, UpdateAuthorizerCommand as UpdateAuthorizerCommand$1, UpdateIntegrationCommand, UpdateRouteCommand, UpdateStageCommand as UpdateStageCommand$1 } from "@aws-sdk/client-apigatewayv2";
45
+ import { CreateStateMachineCommand, DeleteStateMachineCommand, DescribeStateMachineCommand, ListTagsForResourceCommand as ListTagsForResourceCommand$12, SFNClient, StateMachineDoesNotExist, TagResourceCommand as TagResourceCommand$15, UntagResourceCommand as UntagResourceCommand$15, UpdateStateMachineCommand } from "@aws-sdk/client-sfn";
46
+ import { CreateClusterCommand, CreateServiceCommand, DeleteClusterCommand, DeleteServiceCommand, DeregisterTaskDefinitionCommand, DescribeClustersCommand, DescribeServicesCommand, DescribeTaskDefinitionCommand, ECSClient, ListTaskDefinitionsCommand, PutClusterCapacityProvidersCommand, RegisterTaskDefinitionCommand, TagResourceCommand as TagResourceCommand$16, UntagResourceCommand as UntagResourceCommand$16, UpdateClusterCommand, UpdateServiceCommand, waitUntilServicesStable } from "@aws-sdk/client-ecs";
47
+ import { AddTagsToResourceCommand as AddTagsToResourceCommand$3, CreateDBClusterCommand as CreateDBClusterCommand$1, CreateDBInstanceCommand as CreateDBInstanceCommand$1, CreateDBSubnetGroupCommand as CreateDBSubnetGroupCommand$1, DeleteDBClusterCommand as DeleteDBClusterCommand$1, DeleteDBInstanceCommand as DeleteDBInstanceCommand$1, DeleteDBSubnetGroupCommand as DeleteDBSubnetGroupCommand$1, DescribeDBClustersCommand as DescribeDBClustersCommand$1, DescribeDBInstancesCommand as DescribeDBInstancesCommand$1, DescribeDBSubnetGroupsCommand as DescribeDBSubnetGroupsCommand$1, DocDBClient, ListTagsForResourceCommand as ListTagsForResourceCommand$13, ModifyDBClusterCommand as ModifyDBClusterCommand$1, ModifyDBInstanceCommand as ModifyDBInstanceCommand$1, ModifyDBSubnetGroupCommand as ModifyDBSubnetGroupCommand$1, RemoveTagsFromResourceCommand as RemoveTagsFromResourceCommand$3 } from "@aws-sdk/client-docdb";
48
+ import { CreateWebACLCommand, DeleteWebACLCommand, GetWebACLCommand, ListTagsForResourceCommand as ListTagsForResourceCommand$14, TagResourceCommand as TagResourceCommand$17, UntagResourceCommand as UntagResourceCommand$17, UpdateWebACLCommand, WAFNonexistentItemException, WAFV2Client } from "@aws-sdk/client-wafv2";
49
+ import { AddCustomAttributesCommand, CognitoIdentityProviderClient, CreateUserPoolCommand, DeleteUserPoolCommand, DescribeUserPoolCommand, GetUserPoolMfaConfigCommand, ListUserPoolsCommand, ResourceNotFoundException as ResourceNotFoundException$11, SetUserPoolMfaConfigCommand, UntagResourceCommand as UntagResourceCommand$18, UpdateUserPoolCommand } from "@aws-sdk/client-cognito-identity-provider";
50
+ import { CreateHttpNamespaceCommand, CreatePrivateDnsNamespaceCommand, CreatePublicDnsNamespaceCommand, CreateServiceCommand as CreateServiceCommand$1, DeleteNamespaceCommand, DeleteServiceAttributesCommand, DeleteServiceCommand as DeleteServiceCommand$1, GetNamespaceCommand, GetOperationCommand, GetServiceAttributesCommand, GetServiceCommand, ListNamespacesCommand, ListTagsForResourceCommand as ListTagsForResourceCommand$15, NamespaceNotFound, ResourceInUse, ServiceDiscoveryClient, ServiceNotFound, TagResourceCommand as TagResourceCommand$18, UntagResourceCommand as UntagResourceCommand$19, UpdateHttpNamespaceCommand, UpdatePrivateDnsNamespaceCommand, UpdatePublicDnsNamespaceCommand, UpdateServiceAttributesCommand, UpdateServiceCommand as UpdateServiceCommand$1 } from "@aws-sdk/client-servicediscovery";
51
+ import { AppSyncClient, CreateApiKeyCommand, CreateDataSourceCommand, CreateGraphqlApiCommand, CreateResolverCommand, DeleteApiKeyCommand, DeleteDataSourceCommand, DeleteGraphqlApiCommand, DeleteResolverCommand, GetDataSourceCommand, GetGraphqlApiCommand, GetGraphqlApiEnvironmentVariablesCommand, GetIntrospectionSchemaCommand, GetResolverCommand, ListApiKeysCommand, ListGraphqlApisCommand, NotFoundException as NotFoundException$4, PutGraphqlApiEnvironmentVariablesCommand, StartSchemaCreationCommand, TagResourceCommand as TagResourceCommand$19, UntagResourceCommand as UntagResourceCommand$20, UpdateApiKeyCommand, UpdateDataSourceCommand, UpdateGraphqlApiCommand, UpdateResolverCommand } from "@aws-sdk/client-appsync";
52
+ 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, TagResourceCommand as TagResourceCommand$20, UntagResourceCommand as UntagResourceCommand$21, UpdateConnectionCommand, UpdateCrawlerCommand, UpdateDatabaseCommand, UpdateJobCommand, UpdateTableCommand as UpdateTableCommand$1, UpdateTriggerCommand, UpdateWorkflowCommand } from "@aws-sdk/client-glue";
53
+ import { BudgetsClient, CreateBudgetCommand, CreateNotificationCommand, CreateSubscriberCommand, DeleteBudgetCommand, DeleteNotificationCommand, DeleteSubscriberCommand, DescribeBudgetCommand, DescribeNotificationsForBudgetCommand, DescribeSubscribersForNotificationCommand, DuplicateRecordException, ListTagsForResourceCommand as ListTagsForResourceCommand$16, NotFoundException as NotFoundException$5, TagResourceCommand as TagResourceCommand$21, UntagResourceCommand as UntagResourceCommand$22, UpdateBudgetCommand } from "@aws-sdk/client-budgets";
54
+ import { AddTagsToStreamCommand, CreateStreamCommand, DecreaseStreamRetentionPeriodCommand, DeleteStreamCommand, DeregisterStreamConsumerCommand, DescribeStreamCommand, DescribeStreamConsumerCommand, DescribeStreamSummaryCommand, DisableEnhancedMonitoringCommand, EnableEnhancedMonitoringCommand, IncreaseStreamRetentionPeriodCommand, KinesisClient, ListTagsForResourceCommand as ListTagsForResourceCommand$17, ListTagsForStreamCommand, RegisterStreamConsumerCommand, RemoveTagsFromStreamCommand, ResourceNotFoundException as ResourceNotFoundException$12, StartStreamEncryptionCommand, StopStreamEncryptionCommand, TagResourceCommand as TagResourceCommand$22, UntagResourceCommand as UntagResourceCommand$23, UpdateMaxRecordSizeCommand, UpdateShardCountCommand, UpdateStreamModeCommand, UpdateStreamRecordDistributionStrategyCommand } from "@aws-sdk/client-kinesis";
54
55
  import { CreateScheduleCommand, DeleteScheduleCommand, GetScheduleCommand, ListSchedulesCommand, ResourceNotFoundException as ResourceNotFoundException$13, SchedulerClient, UpdateScheduleCommand } from "@aws-sdk/client-scheduler";
55
- import { CreatePipeCommand, DeletePipeCommand, DescribePipeCommand, NotFoundException as NotFoundException$6, PipesClient, TagResourceCommand as TagResourceCommand$22, UntagResourceCommand as UntagResourceCommand$23, UpdatePipeCommand } from "@aws-sdk/client-pipes";
56
- import { AccessPointAlreadyExists, AccessPointNotFound, CreateAccessPointCommand, CreateFileSystemCommand, CreateMountTargetCommand, DeleteAccessPointCommand, DeleteFileSystemCommand, DeleteFileSystemPolicyCommand, DeleteMountTargetCommand, DescribeAccessPointsCommand, DescribeBackupPolicyCommand, DescribeFileSystemPolicyCommand, DescribeFileSystemsCommand, DescribeLifecycleConfigurationCommand, DescribeMountTargetSecurityGroupsCommand, DescribeMountTargetsCommand, EFSClient, FileSystemAlreadyExists, FileSystemNotFound, ModifyMountTargetSecurityGroupsCommand, MountTargetNotFound, PutBackupPolicyCommand, PutFileSystemPolicyCommand, PutLifecycleConfigurationCommand, TagResourceCommand as TagResourceCommand$23, UntagResourceCommand as UntagResourceCommand$24, UpdateFileSystemCommand, UpdateFileSystemProtectionCommand } from "@aws-sdk/client-efs";
57
- import { AssociateFileSystemAliasesCommand, CreateFileSystemCommand as CreateFileSystemCommand$1, CreateFileSystemFromBackupCommand, DeleteFileSystemCommand as DeleteFileSystemCommand$1, DescribeFileSystemAliasesCommand, DescribeFileSystemsCommand as DescribeFileSystemsCommand$1, DisassociateFileSystemAliasesCommand, FSxClient, FileSystemNotFound as FileSystemNotFound$1, TagResourceCommand as TagResourceCommand$24, UntagResourceCommand as UntagResourceCommand$25, UpdateFileSystemCommand as UpdateFileSystemCommand$1 } from "@aws-sdk/client-fsx";
56
+ import { CreatePipeCommand, DeletePipeCommand, DescribePipeCommand, NotFoundException as NotFoundException$6, PipesClient, TagResourceCommand as TagResourceCommand$23, UntagResourceCommand as UntagResourceCommand$24, UpdatePipeCommand } from "@aws-sdk/client-pipes";
57
+ import { AccessPointAlreadyExists, AccessPointNotFound, CreateAccessPointCommand, CreateFileSystemCommand, CreateMountTargetCommand, DeleteAccessPointCommand, DeleteFileSystemCommand, DeleteFileSystemPolicyCommand, DeleteMountTargetCommand, DescribeAccessPointsCommand, DescribeBackupPolicyCommand, DescribeFileSystemPolicyCommand, DescribeFileSystemsCommand, DescribeLifecycleConfigurationCommand, DescribeMountTargetSecurityGroupsCommand, DescribeMountTargetsCommand, EFSClient, FileSystemAlreadyExists, FileSystemNotFound, ModifyMountTargetSecurityGroupsCommand, MountTargetNotFound, PutBackupPolicyCommand, PutFileSystemPolicyCommand, PutLifecycleConfigurationCommand, TagResourceCommand as TagResourceCommand$24, UntagResourceCommand as UntagResourceCommand$25, UpdateFileSystemCommand, UpdateFileSystemProtectionCommand } from "@aws-sdk/client-efs";
58
+ import { AssociateFileSystemAliasesCommand, CreateFileSystemCommand as CreateFileSystemCommand$1, CreateFileSystemFromBackupCommand, DeleteFileSystemCommand as DeleteFileSystemCommand$1, DescribeFileSystemAliasesCommand, DescribeFileSystemsCommand as DescribeFileSystemsCommand$1, DisassociateFileSystemAliasesCommand, FSxClient, FileSystemNotFound as FileSystemNotFound$1, TagResourceCommand as TagResourceCommand$25, UntagResourceCommand as UntagResourceCommand$26, UpdateFileSystemCommand as UpdateFileSystemCommand$1 } from "@aws-sdk/client-fsx";
58
59
  import { AddInstanceFleetCommand, AddInstanceGroupsCommand, AddTagsCommand as AddTagsCommand$1, DescribeClusterCommand, EMRClient, InvalidRequestException, ListClustersCommand, ListInstanceFleetsCommand, ListInstanceGroupsCommand, ModifyClusterCommand, ModifyInstanceFleetCommand, ModifyInstanceGroupsCommand, PutAutoScalingPolicyCommand, PutAutoTerminationPolicyCommand, PutManagedScalingPolicyCommand, RemoveAutoScalingPolicyCommand, RemoveAutoTerminationPolicyCommand, RemoveManagedScalingPolicyCommand, RemoveTagsCommand as RemoveTagsCommand$1, RunJobFlowCommand, SetTerminationProtectionCommand, SetUnhealthyNodeReplacementCommand, SetVisibleToAllUsersCommand, TerminateJobFlowsCommand } from "@aws-sdk/client-emr";
59
60
  import { CreateDeliveryStreamCommand, DeleteDeliveryStreamCommand, DescribeDeliveryStreamCommand, FirehoseClient, ListTagsForDeliveryStreamCommand, ResourceNotFoundException as ResourceNotFoundException$14, StartDeliveryStreamEncryptionCommand, StopDeliveryStreamEncryptionCommand, TagDeliveryStreamCommand, UntagDeliveryStreamCommand, UpdateDestinationCommand } from "@aws-sdk/client-firehose";
60
61
  import { AddTagsCommand as AddTagsCommand$2, CloudTrailClient, CreateTrailCommand, DeleteTrailCommand, GetEventConfigurationCommand, GetEventSelectorsCommand, GetInsightSelectorsCommand, GetTrailCommand, GetTrailStatusCommand, ListTagsCommand as ListTagsCommand$2, PutEventConfigurationCommand, PutEventSelectorsCommand, PutInsightSelectorsCommand, RemoveTagsCommand as RemoveTagsCommand$2, StartLoggingCommand, StopLoggingCommand, TrailNotFoundException, UpdateTrailCommand } from "@aws-sdk/client-cloudtrail";
61
62
  import { BatchGetProjectsCommand, CodeBuildClient, CreateProjectCommand, DeleteProjectCommand, ResourceNotFoundException as ResourceNotFoundException$15, UpdateProjectCommand, UpdateProjectVisibilityCommand } from "@aws-sdk/client-codebuild";
62
- import { CodeCommitClient, CreateCommitCommand, CreateRepositoryCommand as CreateRepositoryCommand$1, DeleteRepositoryCommand as DeleteRepositoryCommand$1, GetRepositoryCommand, GetRepositoryTriggersCommand, ListTagsForResourceCommand as ListTagsForResourceCommand$17, PutRepositoryTriggersCommand, RepositoryDoesNotExistException, TagResourceCommand as TagResourceCommand$25, UntagResourceCommand as UntagResourceCommand$26, UpdateRepositoryDescriptionCommand, UpdateRepositoryEncryptionKeyCommand, UpdateRepositoryNameCommand } from "@aws-sdk/client-codecommit";
63
- import { CreateLifecyclePolicyCommand, DLMClient, DeleteLifecyclePolicyCommand as DeleteLifecyclePolicyCommand$1, GetLifecyclePoliciesCommand, GetLifecyclePolicyCommand as GetLifecyclePolicyCommand$1, ResourceNotFoundException as ResourceNotFoundException$16, TagResourceCommand as TagResourceCommand$26, UntagResourceCommand as UntagResourceCommand$27, UpdateLifecyclePolicyCommand } from "@aws-sdk/client-dlm";
64
- import { CreateVectorBucketCommand, DeleteIndexCommand, DeleteVectorBucketCommand, GetVectorBucketCommand, ListIndexesCommand, ListTagsForResourceCommand as ListTagsForResourceCommand$18, S3VectorsClient, TagResourceCommand as TagResourceCommand$27, UntagResourceCommand as UntagResourceCommand$28 } from "@aws-sdk/client-s3vectors";
65
- import { ListTagsForResourceCommand as ListTagsForResourceCommand$19, S3ControlClient, TagResourceCommand as TagResourceCommand$28, UntagResourceCommand as UntagResourceCommand$29 } from "@aws-sdk/client-s3-control";
63
+ import { CodeCommitClient, CreateCommitCommand, CreateRepositoryCommand as CreateRepositoryCommand$1, DeleteRepositoryCommand as DeleteRepositoryCommand$1, GetRepositoryCommand, GetRepositoryTriggersCommand, ListTagsForResourceCommand as ListTagsForResourceCommand$18, PutRepositoryTriggersCommand, RepositoryDoesNotExistException, TagResourceCommand as TagResourceCommand$26, UntagResourceCommand as UntagResourceCommand$27, UpdateRepositoryDescriptionCommand, UpdateRepositoryEncryptionKeyCommand, UpdateRepositoryNameCommand } from "@aws-sdk/client-codecommit";
64
+ import { CreateLifecyclePolicyCommand, DLMClient, DeleteLifecyclePolicyCommand as DeleteLifecyclePolicyCommand$1, GetLifecyclePoliciesCommand, GetLifecyclePolicyCommand as GetLifecyclePolicyCommand$1, ResourceNotFoundException as ResourceNotFoundException$16, TagResourceCommand as TagResourceCommand$27, UntagResourceCommand as UntagResourceCommand$28, UpdateLifecyclePolicyCommand } from "@aws-sdk/client-dlm";
65
+ import { CreateVectorBucketCommand, DeleteIndexCommand, DeleteVectorBucketCommand, GetVectorBucketCommand, ListIndexesCommand, ListTagsForResourceCommand as ListTagsForResourceCommand$19, S3VectorsClient, TagResourceCommand as TagResourceCommand$28, UntagResourceCommand as UntagResourceCommand$29 } from "@aws-sdk/client-s3vectors";
66
66
  import { CreateNamespaceCommand, CreateTableBucketCommand, CreateTableCommand as CreateTableCommand$2, DeleteNamespaceCommand as DeleteNamespaceCommand$1, DeleteTableBucketCommand, DeleteTableBucketMetricsConfigurationCommand, DeleteTableBucketReplicationCommand, DeleteTableCommand as DeleteTableCommand$2, GetNamespaceCommand as GetNamespaceCommand$1, GetTableBucketCommand, GetTableBucketEncryptionCommand, GetTableBucketMaintenanceConfigurationCommand, GetTableBucketMetricsConfigurationCommand, GetTableBucketReplicationCommand, GetTableBucketStorageClassCommand, GetTableCommand as GetTableCommand$1, GetTableMaintenanceConfigurationCommand, ListNamespacesCommand as ListNamespacesCommand$1, ListTableBucketsCommand, ListTablesCommand, ListTagsForResourceCommand as ListTagsForResourceCommand$20, NotFoundException as NotFoundException$7, PutTableBucketEncryptionCommand, PutTableBucketMaintenanceConfigurationCommand, PutTableBucketMetricsConfigurationCommand, PutTableBucketReplicationCommand, PutTableBucketStorageClassCommand, PutTableMaintenanceConfigurationCommand, RenameTableCommand, S3TablesClient, TagResourceCommand as TagResourceCommand$29, UntagResourceCommand as UntagResourceCommand$30 } from "@aws-sdk/client-s3tables";
67
67
 
68
68
  //#region src/provisioning/providers/iam-policy-provider.ts
@@ -3121,6 +3121,126 @@ function foldEventBridgeConfiguration(config) {
3121
3121
  [EVENTBRIDGE_CONFIG_KEY]: { EventBridgeEnabled: enabled }
3122
3122
  };
3123
3123
  }
3124
+ const ABAC_DISABLED = "Disabled";
3125
+ const ABAC_ENABLED = "Enabled";
3126
+ const METADATA_TABLE_DISABLED = "DISABLED";
3127
+ const METADATA_TABLE_ENABLED = "ENABLED";
3128
+ const METADATA_TABLE_POLL_MS = 2e3;
3129
+ const METADATA_TABLE_BUDGET_MS = 3e5;
3130
+ function abacStatusOf(properties) {
3131
+ return properties["AbacStatus"] ?? ABAC_DISABLED;
3132
+ }
3133
+ function metadataBag(value) {
3134
+ return isPlainObject$3(value) ? value : void 0;
3135
+ }
3136
+ function metadataConfigurationRefusal(value) {
3137
+ if (value === void 0) return void 0;
3138
+ const root = "MetadataConfiguration";
3139
+ if (!isPlainObject$3(value)) return `${root} must be an object`;
3140
+ const journal = value["JournalTableConfiguration"];
3141
+ if (!isPlainObject$3(journal)) return `${root}.JournalTableConfiguration must be an object`;
3142
+ const expiration = journal["RecordExpiration"];
3143
+ if (!isPlainObject$3(expiration)) return `${root}.JournalTableConfiguration.RecordExpiration must be an object`;
3144
+ if (typeof expiration["Expiration"] !== "string") return `${root}.JournalTableConfiguration.RecordExpiration.Expiration must be a string`;
3145
+ const days = expiration["Days"];
3146
+ if (days !== void 0 && (days === "" || days === null || !Number.isInteger(Number(days)))) return `${root}.JournalTableConfiguration.RecordExpiration.Days must be an integer`;
3147
+ const tables = [
3148
+ ["JournalTableConfiguration", journal],
3149
+ ["InventoryTableConfiguration", value["InventoryTableConfiguration"]],
3150
+ ["AnnotationTableConfiguration", value["AnnotationTableConfiguration"]]
3151
+ ];
3152
+ for (const [member, table] of tables) {
3153
+ if (table === void 0) continue;
3154
+ if (!isPlainObject$3(table)) return `${root}.${member} must be an object`;
3155
+ if (member !== "JournalTableConfiguration" && typeof table["ConfigurationState"] !== "string") return `${root}.${member}.ConfigurationState must be a string`;
3156
+ const encryption = table["EncryptionConfiguration"];
3157
+ if (encryption === void 0) continue;
3158
+ if (!isPlainObject$3(encryption) || typeof encryption["SseAlgorithm"] !== "string") return `${root}.${member}.EncryptionConfiguration must be an object with an SseAlgorithm`;
3159
+ }
3160
+ }
3161
+ function metadataEncryptionToSdk(table) {
3162
+ const encryption = metadataBag(table["EncryptionConfiguration"]);
3163
+ if (encryption === void 0) return void 0;
3164
+ return {
3165
+ SseAlgorithm: encryption["SseAlgorithm"],
3166
+ ...encryption["KmsKeyArn"] !== void 0 ? { KmsKeyArn: encryption["KmsKeyArn"] } : {}
3167
+ };
3168
+ }
3169
+ function metadataConfigurationToSdk(config) {
3170
+ const journal = metadataBag(config["JournalTableConfiguration"]) ?? {};
3171
+ const expiration = metadataBag(journal["RecordExpiration"]) ?? {};
3172
+ const days = expiration["Days"];
3173
+ const journalEncryption = metadataEncryptionToSdk(journal);
3174
+ const inventory = metadataBag(config["InventoryTableConfiguration"]);
3175
+ const inventoryEncryption = inventory && metadataEncryptionToSdk(inventory);
3176
+ const annotation = metadataBag(config["AnnotationTableConfiguration"]);
3177
+ const annotationEncryption = annotation && metadataEncryptionToSdk(annotation);
3178
+ return {
3179
+ JournalTableConfiguration: {
3180
+ RecordExpiration: {
3181
+ Expiration: expiration["Expiration"],
3182
+ ...days !== void 0 ? { Days: typeof days === "string" ? Number(days) : days } : {}
3183
+ },
3184
+ ...journalEncryption ? { EncryptionConfiguration: journalEncryption } : {}
3185
+ },
3186
+ ...inventory ? { InventoryTableConfiguration: {
3187
+ ConfigurationState: inventory["ConfigurationState"],
3188
+ ...inventoryEncryption ? { EncryptionConfiguration: inventoryEncryption } : {}
3189
+ } } : {},
3190
+ ...annotation ? { AnnotationTableConfiguration: {
3191
+ ConfigurationState: annotation["ConfigurationState"],
3192
+ ...annotationEncryption ? { EncryptionConfiguration: annotationEncryption } : {},
3193
+ ...annotation["Role"] !== void 0 ? { Role: annotation["Role"] } : {}
3194
+ } } : {}
3195
+ };
3196
+ }
3197
+ function metadataConfigurationFromSdk(result) {
3198
+ const journal = result.JournalTableConfigurationResult;
3199
+ const inventory = result.InventoryTableConfigurationResult;
3200
+ const annotation = result.AnnotationTableConfigurationResult;
3201
+ return {
3202
+ ...journal ? { JournalTableConfiguration: { RecordExpiration: {
3203
+ Expiration: journal.RecordExpiration?.Expiration,
3204
+ ...journal.RecordExpiration?.Days !== void 0 ? { Days: journal.RecordExpiration.Days } : {}
3205
+ } } } : {},
3206
+ ...inventory ? { InventoryTableConfiguration: { ConfigurationState: inventory.ConfigurationState } } : {},
3207
+ ...annotation ? { AnnotationTableConfiguration: {
3208
+ ConfigurationState: annotation.ConfigurationState,
3209
+ ...annotation.Role !== void 0 ? { Role: annotation.Role } : {}
3210
+ } } : {}
3211
+ };
3212
+ }
3213
+ function metadataAttributesFromSdk(result) {
3214
+ const attributes = {};
3215
+ const destination = result.DestinationResult;
3216
+ if (destination) {
3217
+ const path = "MetadataConfiguration.Destination";
3218
+ attributes[path] = {
3219
+ TableBucketArn: destination.TableBucketArn,
3220
+ TableBucketType: destination.TableBucketType,
3221
+ TableNamespace: destination.TableNamespace
3222
+ };
3223
+ attributes[`${path}.TableBucketArn`] = destination.TableBucketArn;
3224
+ attributes[`${path}.TableBucketType`] = destination.TableBucketType;
3225
+ attributes[`${path}.TableNamespace`] = destination.TableNamespace;
3226
+ }
3227
+ for (const [member, table] of [
3228
+ ["JournalTableConfiguration", result.JournalTableConfigurationResult],
3229
+ ["InventoryTableConfiguration", result.InventoryTableConfigurationResult],
3230
+ ["AnnotationTableConfiguration", result.AnnotationTableConfigurationResult]
3231
+ ]) {
3232
+ if (table?.TableName !== void 0) attributes[`MetadataConfiguration.${member}.TableName`] = table.TableName;
3233
+ if (table?.TableArn !== void 0) attributes[`MetadataConfiguration.${member}.TableArn`] = table.TableArn;
3234
+ }
3235
+ return attributes;
3236
+ }
3237
+ function bucketNameRefusal(properties) {
3238
+ const prefix = properties["BucketNamePrefix"];
3239
+ if (prefix === void 0) return void 0;
3240
+ if (typeof prefix !== "string" || prefix === "") return "sets a BucketNamePrefix that is not a non-empty string";
3241
+ if (properties["BucketName"] !== void 0) return "specifies both BucketName and BucketNamePrefix; only one of them is accepted";
3242
+ if (properties["BucketNamespace"] !== "account-regional") return "sets BucketNamePrefix, which is only supported with BucketNamespace: account-regional";
3243
+ }
3124
3244
  const LIFECYCLE_RULE_PATH = "AWS::S3::Bucket LifecycleConfiguration.Rules[]";
3125
3245
  const LIFECYCLE_FILTER_PATH = `${LIFECYCLE_RULE_PATH}.Filter`;
3126
3246
  const LIFECYCLE_TAG_FILTERS_PATH = `${LIFECYCLE_RULE_PATH}.TagFilters`;
@@ -3490,9 +3610,13 @@ var S3BucketProvider = class S3BucketProvider {
3490
3610
  "InventoryConfigurations",
3491
3611
  "ReplicationConfiguration",
3492
3612
  "ObjectLockConfiguration",
3493
- "ObjectLockEnabled"
3613
+ "ObjectLockEnabled",
3614
+ "AbacStatus",
3615
+ "BucketNamePrefix",
3616
+ "BucketNamespace",
3617
+ "MetadataConfiguration"
3494
3618
  ])]]);
3495
- unhandledByDesign = /* @__PURE__ */ new Map([["AWS::S3::Bucket", /* @__PURE__ */ new Map([["AccessControl", "Legacy canned ACL; AWS disables ACLs by default since 2023-04 — use BucketOwnershipControls + BucketPolicy / PublicAccessBlockConfiguration instead"]])]]);
3619
+ unhandledByDesign = /* @__PURE__ */ new Map([["AWS::S3::Bucket", /* @__PURE__ */ new Map([["AccessControl", "Legacy canned ACL; AWS disables ACLs by default since 2023-04 — use BucketOwnershipControls + BucketPolicy / PublicAccessBlockConfiguration instead"], ["MetadataTableConfiguration", "V1 S3 Metadata, which the schema says to replace with MetadataConfiguration; S3 answered V1APIsNotAllowed where it was probed, so an SDK path could not be verified. Stays on Cloud Control"]])]]);
3496
3620
  constructor() {
3497
3621
  const awsClients = getAwsClients();
3498
3622
  this.s3Client = awsClients.s3;
@@ -3594,6 +3718,7 @@ var S3BucketProvider = class S3BucketProvider {
3594
3718
  };
3595
3719
  }
3596
3720
  async getAttribute(physicalId, _resourceType, attributeName) {
3721
+ if (attributeName.startsWith("MetadataConfiguration.")) return (await this.readMetadataAttributes(physicalId))[attributeName];
3597
3722
  return (await this.buildAttributes(physicalId))[attributeName];
3598
3723
  }
3599
3724
  async applyVersioning(bucketName, versioningConfig, onUnusable) {
@@ -3619,7 +3744,7 @@ var S3BucketProvider = class S3BucketProvider {
3619
3744
  }));
3620
3745
  this.logger.debug(`Applied ${tags.length} tags to bucket ${this.shown(bucketName)}`);
3621
3746
  }
3622
- async applyTagDiff(bucketName, resourceType, logicalId, oldTagsRaw, newTagsRaw) {
3747
+ async applyTagDiff(bucketName, resourceType, logicalId, oldTagsRaw, newTagsRaw, abacEnabled = false) {
3623
3748
  const plan = planTagDiff(oldTagsRaw, newTagsRaw);
3624
3749
  const desiredRead = readTagList(newTagsRaw, "desired");
3625
3750
  const desired = desiredRead.kind === "tags" ? desiredRead.tags : [];
@@ -3640,6 +3765,10 @@ var S3BucketProvider = class S3BucketProvider {
3640
3765
  if (plan.set.size === 0 && plan.remove.length === 0) return;
3641
3766
  tagSet = desired;
3642
3767
  }
3768
+ if (abacEnabled) {
3769
+ await this.replaceAbacBucketTags(bucketName, tagSet);
3770
+ return;
3771
+ }
3643
3772
  if (tagSet.length === 0) {
3644
3773
  try {
3645
3774
  await this.s3Client.send(new DeleteBucketTaggingCommand({ Bucket: bucketName }));
@@ -3656,6 +3785,219 @@ var S3BucketProvider = class S3BucketProvider {
3656
3785
  }));
3657
3786
  this.logger.debug(`Replaced tag set on bucket ${this.shown(bucketName)} (${tagSet.length} tags)`);
3658
3787
  }
3788
+ async replaceAbacBucketTags(bucketName, tagSet) {
3789
+ const keep = new Set(tagSet.map((t) => t.Key));
3790
+ const stale = (await this.readTags(bucketName)).map((t) => t.Key).filter((key) => !keep.has(key));
3791
+ const client = new S3ControlClient({
3792
+ ...clientDefaultsFor(this.credentialConfig),
3793
+ region: await this.getRegion()
3794
+ });
3795
+ try {
3796
+ const AccountId = (await getAccountInfo()).accountId;
3797
+ const ResourceArn = s3BucketArn(bucketName, await this.getRegion());
3798
+ if (stale.length > 0) await client.send(new UntagResourceCommand$13({
3799
+ AccountId,
3800
+ ResourceArn,
3801
+ TagKeys: stale
3802
+ }));
3803
+ if (tagSet.length > 0) await client.send(new TagResourceCommand$13({
3804
+ AccountId,
3805
+ ResourceArn,
3806
+ Tags: tagSet
3807
+ }));
3808
+ } finally {
3809
+ client.destroy();
3810
+ }
3811
+ this.logger.debug(safeMsg`Replaced tag set on ABAC bucket ${this.shown(bucketName)}`);
3812
+ }
3813
+ async applyAbacStatus(bucketName, status) {
3814
+ await this.s3Client.send(new PutBucketAbacCommand({
3815
+ Bucket: bucketName,
3816
+ AbacStatus: { Status: status }
3817
+ }));
3818
+ this.logger.debug(safeMsg`Applied AbacStatus to bucket ${this.shown(bucketName)}`);
3819
+ }
3820
+ async accountRegionalBucketName(prefix) {
3821
+ return `${prefix}-${(await getAccountInfo()).accountId}-${canonicalizeRegion(await this.getRegion())}-an`;
3822
+ }
3823
+ async createMetadataConfiguration(bucketName, desired, stateBorne) {
3824
+ const MetadataConfiguration = metadataConfigurationToSdk(desired);
3825
+ try {
3826
+ await this.s3Client.send(new CreateBucketMetadataConfigurationCommand({
3827
+ Bucket: bucketName,
3828
+ MetadataConfiguration
3829
+ }));
3830
+ } catch (err) {
3831
+ if (err.name !== "MetadataConfigurationAlreadyExists") throw err;
3832
+ const live = await this.readMetadataConfigurationResult(bucketName).catch(() => void 0);
3833
+ if (live === void 0) throw err;
3834
+ return this.convergeMetadataConfiguration(bucketName, desired, live, stateBorne);
3835
+ }
3836
+ await this.waitForMetadataTables(bucketName, MetadataConfiguration, stateBorne);
3837
+ return true;
3838
+ }
3839
+ async convergeMetadataConfiguration(bucketName, desired, live, stateBorne) {
3840
+ const sent = metadataConfigurationToSdk(desired);
3841
+ if (sent.JournalTableConfiguration?.EncryptionConfiguration || sent.InventoryTableConfiguration?.EncryptionConfiguration || sent.AnnotationTableConfiguration?.EncryptionConfiguration) this.logger.warn(safeMsg`Bucket ${this.shown(bucketName)} already holds an S3 Metadata configuration, and S3 never returns a table's encryption, so the declared EncryptionConfiguration is unverified and may not be the one in effect`);
3842
+ const enabledATable = await this.applyMetadataConfigurationDiff(bucketName, desired, metadataConfigurationFromSdk(live), true, true);
3843
+ await this.waitForMetadataTables(bucketName, sent, stateBorne);
3844
+ return enabledATable;
3845
+ }
3846
+ async applyMetadataConfigurationDiff(bucketName, desiredRaw, previousRaw, stateBorne, refuseOnly) {
3847
+ const desired = metadataBag(desiredRaw);
3848
+ const previous = metadataBag(previousRaw);
3849
+ if (desired === void 0) {
3850
+ if (previous === void 0) return false;
3851
+ try {
3852
+ await this.s3Client.send(new DeleteBucketMetadataConfigurationCommand({ Bucket: bucketName }));
3853
+ } catch (err) {
3854
+ if (err.name !== "MetadataConfigurationNotFound") throw err;
3855
+ }
3856
+ return false;
3857
+ }
3858
+ if (previous === void 0) {
3859
+ if (refuseOnly) return false;
3860
+ return this.createMetadataConfiguration(bucketName, desired, stateBorne);
3861
+ }
3862
+ const next = metadataConfigurationToSdk(desired);
3863
+ const prev = metadataConfigurationToSdk(previous);
3864
+ const differs = (a, b) => JSON.stringify(a) !== JSON.stringify(b);
3865
+ const refuseEncryptionChange = (member, a, b) => {
3866
+ if (!stateBorne && differs(a, b)) throw new Error(`Bucket ${this.shown(bucketName)}: changing MetadataConfiguration.${member}.EncryptionConfiguration is not supported once the table exists. Revert it, or re-create the table: remove MetadataConfiguration, deploy, delete the table with aws s3tables delete-table, then add it back with the new encryption`);
3867
+ };
3868
+ const nextJournal = next.JournalTableConfiguration;
3869
+ const prevJournal = prev.JournalTableConfiguration;
3870
+ refuseEncryptionChange("JournalTableConfiguration", prevJournal?.EncryptionConfiguration, nextJournal?.EncryptionConfiguration);
3871
+ const nextInventory = next.InventoryTableConfiguration;
3872
+ const prevInventory = prev.InventoryTableConfiguration;
3873
+ const nextInventoryState = nextInventory?.ConfigurationState ?? METADATA_TABLE_DISABLED;
3874
+ const prevInventoryState = prevInventory?.ConfigurationState ?? METADATA_TABLE_DISABLED;
3875
+ if (nextInventoryState === METADATA_TABLE_ENABLED && prevInventoryState === METADATA_TABLE_ENABLED) refuseEncryptionChange("InventoryTableConfiguration", prevInventory?.EncryptionConfiguration, nextInventory?.EncryptionConfiguration);
3876
+ const nextAnnotation = next.AnnotationTableConfiguration;
3877
+ const prevAnnotation = prev.AnnotationTableConfiguration;
3878
+ const nextAnnotationState = nextAnnotation?.ConfigurationState ?? METADATA_TABLE_DISABLED;
3879
+ const prevAnnotationState = prevAnnotation?.ConfigurationState ?? METADATA_TABLE_DISABLED;
3880
+ const annotationStaysOn = nextAnnotationState === METADATA_TABLE_ENABLED && prevAnnotationState === METADATA_TABLE_ENABLED;
3881
+ if (annotationStaysOn) refuseEncryptionChange("AnnotationTableConfiguration", prevAnnotation?.EncryptionConfiguration, nextAnnotation?.EncryptionConfiguration);
3882
+ let enabledATable = false;
3883
+ if (differs(prevJournal?.RecordExpiration, nextJournal?.RecordExpiration)) await this.s3Client.send(new UpdateBucketMetadataJournalTableConfigurationCommand({
3884
+ Bucket: bucketName,
3885
+ JournalTableConfiguration: { RecordExpiration: nextJournal?.RecordExpiration }
3886
+ }));
3887
+ if (nextInventoryState !== prevInventoryState) {
3888
+ const on = nextInventoryState === METADATA_TABLE_ENABLED;
3889
+ await this.s3Client.send(new UpdateBucketMetadataInventoryTableConfigurationCommand({
3890
+ Bucket: bucketName,
3891
+ InventoryTableConfiguration: {
3892
+ ConfigurationState: nextInventoryState,
3893
+ ...on && nextInventory?.EncryptionConfiguration ? { EncryptionConfiguration: nextInventory.EncryptionConfiguration } : {}
3894
+ }
3895
+ }));
3896
+ enabledATable ||= on;
3897
+ }
3898
+ if (nextAnnotationState !== prevAnnotationState || annotationStaysOn && nextAnnotation?.Role !== prevAnnotation?.Role) {
3899
+ const on = nextAnnotationState === METADATA_TABLE_ENABLED;
3900
+ await this.s3Client.send(new UpdateBucketMetadataAnnotationTableConfigurationCommand({
3901
+ Bucket: bucketName,
3902
+ AnnotationTableConfiguration: {
3903
+ ConfigurationState: nextAnnotationState,
3904
+ ...on && nextAnnotation?.EncryptionConfiguration ? { EncryptionConfiguration: nextAnnotation.EncryptionConfiguration } : {},
3905
+ ...on && nextAnnotation?.Role !== void 0 ? { Role: nextAnnotation.Role } : {}
3906
+ }
3907
+ }));
3908
+ enabledATable ||= on;
3909
+ }
3910
+ if (enabledATable && !refuseOnly) await this.waitForMetadataTables(bucketName, next, stateBorne);
3911
+ return enabledATable;
3912
+ }
3913
+ async waitForMetadataTables(bucketName, sent, stateBorne) {
3914
+ const deadline = Date.now() + METADATA_TABLE_BUDGET_MS;
3915
+ const warned = /* @__PURE__ */ new Set();
3916
+ for (;;) {
3917
+ let result;
3918
+ try {
3919
+ result = await this.readMetadataConfigurationResult(bucketName);
3920
+ } catch (err) {
3921
+ if (!stateBorne) throw err;
3922
+ this.logger.warn(safeMsg`Could not read the S3 Metadata tables of ${this.shown(bucketName)} (${caughtErrorName(err)}); not waiting for them`);
3923
+ return;
3924
+ }
3925
+ const tables = [
3926
+ [
3927
+ "journal",
3928
+ true,
3929
+ result?.JournalTableConfigurationResult
3930
+ ],
3931
+ [
3932
+ "inventory",
3933
+ sent.InventoryTableConfiguration?.ConfigurationState === METADATA_TABLE_ENABLED,
3934
+ result?.InventoryTableConfigurationResult
3935
+ ],
3936
+ [
3937
+ "annotation",
3938
+ sent.AnnotationTableConfiguration?.ConfigurationState === METADATA_TABLE_ENABLED,
3939
+ result?.AnnotationTableConfigurationResult
3940
+ ]
3941
+ ];
3942
+ let pending;
3943
+ for (const [name, wanted, table] of tables) {
3944
+ if (!wanted) continue;
3945
+ if (table?.TableStatus === "FAILED") {
3946
+ if (!warned.has(name)) {
3947
+ warned.add(name);
3948
+ this.warnMetadataTableFailed(bucketName, name, table);
3949
+ }
3950
+ continue;
3951
+ }
3952
+ if (table?.TableArn === void 0) pending = `the ${name} table`;
3953
+ }
3954
+ if (pending === void 0) return;
3955
+ if (Date.now() >= deadline) {
3956
+ this.logger.warn(safeMsg`Gave up waiting for ${pending} of bucket ${this.shown(bucketName)}'s S3 Metadata configuration; it may still finish, and an Fn::GetAtt on its ARN fails until then. Read it with aws s3api get-bucket-metadata-configuration`);
3957
+ return;
3958
+ }
3959
+ await new Promise((r) => setTimeout(r, METADATA_TABLE_POLL_MS));
3960
+ }
3961
+ }
3962
+ warnMetadataTableFailed(bucketName, name, table) {
3963
+ const reason = describeAwsStatusReason({
3964
+ code: table.Error?.ErrorCode,
3965
+ message: table.Error?.ErrorMessage
3966
+ }, "S3 gave no reason.");
3967
+ const noArn = table.TableArn === void 0 ? " It has no ARN, so an Fn::GetAtt on its TableArn fails." : "";
3968
+ this.logger.debug(safeMsg`S3 Metadata ${name} table: ${this.maskRaw(reason.detail)}`);
3969
+ this.logger.warn(safeMsg`The S3 Metadata ${name} table of bucket ${this.shown(bucketName)} FAILED: ${reason.summary} The deploy continues, but this table records nothing.${noArn} When a table left by an earlier bucket of this name is the cause, delete it with aws s3tables delete-table --table-bucket-arn <the account's aws-s3 table bucket> --namespace b_${this.shown(bucketName)} --name ${name}, then deploy without MetadataConfiguration and add it back`);
3970
+ }
3971
+ async readMetadataConfigurationResult(bucket) {
3972
+ try {
3973
+ return (await this.s3Client.send(new GetBucketMetadataConfigurationCommand({ Bucket: bucket }))).GetBucketMetadataConfigurationResult?.MetadataConfigurationResult;
3974
+ } catch (err) {
3975
+ if (err.name === "MetadataConfigurationNotFound") return void 0;
3976
+ throw err;
3977
+ }
3978
+ }
3979
+ async readMetadataForDrift(bucket) {
3980
+ try {
3981
+ return await this.readMetadataConfigurationResult(bucket);
3982
+ } catch (err) {
3983
+ this.logger.debug(safeMsg`Could not read S3 Metadata of ${this.shown(bucket)} (${caughtErrorName(err)})`);
3984
+ return "unread";
3985
+ }
3986
+ }
3987
+ async readMetadataAttributesAfterWrites(bucket, context) {
3988
+ try {
3989
+ return await this.readMetadataAttributes(bucket);
3990
+ } catch (err) {
3991
+ const readback = context !== void 0 && "desiredFromAwsReadback" in context ? context.desiredFromAwsReadback : void 0;
3992
+ if (context?.replayingState !== true && readback !== true) throw err;
3993
+ this.logger.warn(safeMsg`Could not read the S3 Metadata attributes of ${this.shown(bucket)} (${caughtErrorName(err)}); an Fn::GetAtt on them fails until the next deploy records them`);
3994
+ return {};
3995
+ }
3996
+ }
3997
+ async readMetadataAttributes(bucket) {
3998
+ const result = await this.readMetadataConfigurationResult(bucket);
3999
+ return result ? metadataAttributesFromSdk(result) : {};
4000
+ }
3659
4001
  async applyCorsConfiguration(bucketName, corsConfig) {
3660
4002
  const corsRules = corsConfig.CorsRules.map((rule) => ({
3661
4003
  ID: rule["Id"],
@@ -4620,6 +4962,17 @@ var S3BucketProvider = class S3BucketProvider {
4620
4962
  retainPrevious("VersioningConfiguration");
4621
4963
  } else await this.applyVersioning(bucketName, { Status: "Suspended" });
4622
4964
  }
4965
+ const desiredMetadata = properties["MetadataConfiguration"];
4966
+ const previousMetadata = previousProperties["MetadataConfiguration"];
4967
+ const metadataStateBorne = context?.replayingState === true || context?.desiredFromAwsReadback === true;
4968
+ const metadataRefusal = metadataConfigurationRefusal(desiredMetadata);
4969
+ if (metadataRefusal !== void 0 && JSON.stringify(desiredMetadata) !== JSON.stringify(previousMetadata)) {
4970
+ if (!metadataStateBorne) throw new Error(metadataRefusal);
4971
+ this.logger.warn(safeMsg`Bucket ${this.shown(bucketName)}: ${metadataRefusal}; its S3 Metadata configuration was left as it is`);
4972
+ retainPrevious("MetadataConfiguration");
4973
+ } else if (metadataRefusal === void 0) {
4974
+ if (await this.applyMetadataConfigurationDiff(bucketName, desiredMetadata, previousMetadata, metadataStateBorne, refuseUnusable) && context?.desiredFromAwsReadback === true) this.logger.warn(safeMsg`Bucket ${this.shown(bucketName)}: S3 never returns a table's EncryptionConfiguration, so a table this revert turned on took S3's default encryption, whatever the template declares`);
4975
+ }
4623
4976
  return overrides;
4624
4977
  }
4625
4978
  async applyAllSubConfigsForCreate(bucketName, properties, context) {
@@ -4736,16 +5089,34 @@ var S3BucketProvider = class S3BucketProvider {
4736
5089
  this.logger.debug(`${message} Proceeding.`);
4737
5090
  }
4738
5091
  async create(logicalId, resourceType, properties, context) {
4739
- if (this.opMask === void 0) return this.maskedView(createMaskedLogSinks(this.logger, context?.maskSecrets)).create(logicalId, resourceType, properties, context);
5092
+ if (this.opMask === void 0) {
5093
+ const sinks = createMaskedLogSinks(this.logger, context?.maskSecrets);
5094
+ const prefix = properties["BucketNamePrefix"];
5095
+ const derivedName = typeof prefix === "string" && prefix !== "" && bucketNameRefusal(properties) === void 0 ? await this.accountRegionalBucketName(prefix) : void 0;
5096
+ const view = withDerivedNameMasks(this.logger, sinks, [[prefix, derivedName]]);
5097
+ return this.maskedView(view).create(logicalId, resourceType, properties, context);
5098
+ }
4740
5099
  this.logger.debug(`Creating S3 bucket ${displaySafe(logicalId)}`);
4741
5100
  const desiredTags = refuseMalformedDesiredTags(properties["Tags"], resourceType, logicalId);
4742
- const explicitBucketName = Boolean(properties["BucketName"]);
4743
- const bucketName = properties["BucketName"] || this.generatedCreateName(resourceType, logicalId, properties);
5101
+ const nameRefusal = bucketNameRefusal(properties);
5102
+ if (nameRefusal !== void 0) {
5103
+ if (context?.replayingState !== true) throw markNonRetryable(new ProvisioningError(`S3 bucket ${displaySafe(logicalId)} ${nameRefusal}; fix the template`, resourceType, logicalId));
5104
+ this.logger.warn(safeMsg`S3 bucket ${displaySafe(logicalId)} ${nameRefusal}; restoring it anyway`);
5105
+ }
5106
+ const metadataRefusal = metadataConfigurationRefusal(properties["MetadataConfiguration"]);
5107
+ if (metadataRefusal !== void 0 && context?.replayingState !== true) throw markNonRetryable(new ProvisioningError(`S3 bucket ${displaySafe(logicalId)}: ${metadataRefusal}; fix the template`, resourceType, logicalId));
5108
+ const declaredPrefix = properties["BucketNamePrefix"];
5109
+ const namePrefix = typeof declaredPrefix === "string" ? declaredPrefix : void 0;
5110
+ const explicitBucketName = Boolean(properties["BucketName"] || namePrefix);
5111
+ const bucketName = (namePrefix ? await this.accountRegionalBucketName(namePrefix) : void 0) || properties["BucketName"] || this.generatedCreateName(resourceType, logicalId, properties);
4744
5112
  let bucketLeftBehind = false;
4745
5113
  let ambiguousWindow;
4746
5114
  let windowSpent = false;
4747
5115
  try {
4748
- const createParams = { Bucket: bucketName };
5116
+ const createParams = {
5117
+ Bucket: bucketName,
5118
+ ...properties["BucketNamespace"] !== void 0 ? { BucketNamespace: properties["BucketNamespace"] } : {}
5119
+ };
4749
5120
  const region = await this.getRegion();
4750
5121
  const canonicalRegion = canonicalizeRegion(region);
4751
5122
  if (canonicalRegion !== "us-east-1") createParams.CreateBucketConfiguration = { LocationConstraint: canonicalRegion };
@@ -4837,12 +5208,28 @@ var S3BucketProvider = class S3BucketProvider {
4837
5208
  } else throw createError;
4838
5209
  }
4839
5210
  let effectiveOverrides;
5211
+ const bucketPredates = !createdNewBucket || adoptedOwnLeftover;
5212
+ const desiredAbac = abacStatusOf(properties);
5213
+ const liveAbacOn = bucketPredates && await this.readAbacStatus(bucketName) === ABAC_ENABLED;
4840
5214
  try {
5215
+ const turnAbacOff = liveAbacOn && properties["AbacStatus"] === ABAC_DISABLED;
5216
+ if (turnAbacOff) await this.applyAbacStatus(bucketName, ABAC_DISABLED);
5217
+ else if (liveAbacOn && properties["AbacStatus"] === void 0) this.logger.warn(safeMsg`Bucket ${this.shown(bucketName)} already existed with ABAC on, which the template does not declare; it stays on, and a later Tags change fails with BadRequest until the template declares AbacStatus`);
5218
+ const tagsThroughControl = liveAbacOn && !turnAbacOff;
4841
5219
  effectiveOverrides = await this.applyConfiguration(bucketName, properties, {
4842
5220
  ...context ? { context } : {},
4843
- ...tagsAppliedOnCreate ? { skipTags: true } : { desiredTags }
5221
+ ...tagsAppliedOnCreate || tagsThroughControl ? { skipTags: true } : { desiredTags }
4844
5222
  });
4845
5223
  for (const [key, value] of await this.applyAllSubConfigsForCreate(bucketName, properties, context)) effectiveOverrides.set(key, value);
5224
+ if (tagsThroughControl && desiredTags.length > 0) await this.replaceAbacBucketTags(bucketName, desiredTags);
5225
+ if (desiredAbac !== ABAC_DISABLED) await this.applyAbacStatus(bucketName, desiredAbac);
5226
+ const metadata = metadataBag(properties["MetadataConfiguration"]);
5227
+ const replaying = context?.replayingState === true;
5228
+ if (metadataRefusal !== void 0) this.logger.warn(safeMsg`Bucket ${this.shown(bucketName)}: ${metadataRefusal}; no S3 Metadata configuration was restored`);
5229
+ else if (metadata !== void 0 && bucketPredates) {
5230
+ const live = await this.readMetadataForDrift(bucketName);
5231
+ await (live === "unread" || live === void 0 ? this.createMetadataConfiguration(bucketName, metadata, true) : this.convergeMetadataConfiguration(bucketName, metadata, live, replaying));
5232
+ } else if (metadata !== void 0) await this.createMetadataConfiguration(bucketName, metadata, replaying);
4846
5233
  } catch (innerError) {
4847
5234
  if (createdNewBucket) try {
4848
5235
  await this.s3Client.send(new DeleteBucketCommand({ Bucket: bucketName }));
@@ -4860,6 +5247,7 @@ var S3BucketProvider = class S3BucketProvider {
4860
5247
  throw markAuxiliaryFailure(innerError, logicalId);
4861
5248
  }
4862
5249
  const attributes = await this.buildAttributes(bucketName);
5250
+ if (metadataBag(properties["MetadataConfiguration"])) Object.assign(attributes, await this.readMetadataAttributesAfterWrites(bucketName, context));
4863
5251
  this.logger.debug(`Successfully created S3 bucket ${displaySafe(logicalId)}: ${this.shown(bucketName)}`);
4864
5252
  const effectiveProperties = S3BucketProvider.applyEffectiveOverrides(properties, effectiveOverrides);
4865
5253
  return {
@@ -4879,7 +5267,7 @@ var S3BucketProvider = class S3BucketProvider {
4879
5267
  }
4880
5268
  async update(logicalId, physicalId, resourceType, properties, previousProperties, context) {
4881
5269
  if (this.opMask === void 0) {
4882
- const sinks = withDerivedNameMasks(this.logger, createMaskedLogSinks(this.logger, context?.maskSecrets), [[previousProperties["BucketName"], physicalId]]);
5270
+ const sinks = withDerivedNameMasks(this.logger, createMaskedLogSinks(this.logger, context?.maskSecrets), [[previousProperties["BucketName"], physicalId], [previousProperties["BucketNamePrefix"], physicalId]]);
4883
5271
  return this.maskedView(sinks).update(logicalId, physicalId, resourceType, properties, previousProperties, context);
4884
5272
  }
4885
5273
  this.logger.debug(`Updating S3 bucket ${displaySafe(logicalId)}: ${this.shown(physicalId)}`);
@@ -4909,9 +5297,14 @@ var S3BucketProvider = class S3BucketProvider {
4909
5297
  skipDiffManaged: true
4910
5298
  });
4911
5299
  for (const [key, value] of await this.applySubConfigDiffs(physicalId, properties, previousProperties, context)) effectiveOverrides.set(key, value);
4912
- await this.applyTagDiff(physicalId, resourceType, logicalId, previousProperties["Tags"], properties["Tags"]);
5300
+ const previousAbac = abacStatusOf(previousProperties);
5301
+ const desiredAbac = abacStatusOf(properties);
5302
+ if (previousAbac !== desiredAbac && desiredAbac === ABAC_DISABLED) await this.applyAbacStatus(physicalId, desiredAbac);
5303
+ await this.applyTagDiff(physicalId, resourceType, logicalId, previousProperties["Tags"], properties["Tags"], previousAbac === ABAC_ENABLED && desiredAbac === ABAC_ENABLED);
5304
+ if (previousAbac !== desiredAbac && desiredAbac !== ABAC_DISABLED) await this.applyAbacStatus(physicalId, desiredAbac);
4913
5305
  await this.warnUnappliedBucketObjectLock(logicalId, physicalId, properties, previousProperties, context);
4914
5306
  const attributes = await this.buildAttributes(physicalId);
5307
+ if (metadataBag(properties["MetadataConfiguration"])) Object.assign(attributes, await this.readMetadataAttributesAfterWrites(physicalId, context));
4915
5308
  this.logger.debug(`Successfully updated S3 bucket ${displaySafe(logicalId)}`);
4916
5309
  const effectiveProperties = S3BucketProvider.applyEffectiveOverrides(properties, effectiveOverrides);
4917
5310
  return {
@@ -4996,7 +5389,7 @@ var S3BucketProvider = class S3BucketProvider {
4996
5389
  }
4997
5390
  throw err;
4998
5391
  }
4999
- const [versioning, encryption, ownership, pab, tags, lifecycle, cors, website, logging, notification, replication, objectLock, accelerate, metrics, analytics, intelligentTier, inventory] = await Promise.all([
5392
+ const [versioning, encryption, ownership, pab, tags, lifecycle, cors, website, logging, notification, replication, objectLock, accelerate, metrics, analytics, intelligentTier, inventory, abac, metadata] = await Promise.all([
5000
5393
  this.readVersioning(physicalId),
5001
5394
  this.readEncryption(physicalId),
5002
5395
  this.readOwnershipControls(physicalId),
@@ -5013,7 +5406,9 @@ var S3BucketProvider = class S3BucketProvider {
5013
5406
  this.readMetricsList(physicalId),
5014
5407
  this.readAnalyticsList(physicalId),
5015
5408
  this.readIntelligentTieringList(physicalId),
5016
- this.readInventoryList(physicalId)
5409
+ this.readInventoryList(physicalId),
5410
+ this.readAbacStatus(physicalId),
5411
+ this.readMetadataForDrift(physicalId)
5017
5412
  ]);
5018
5413
  return {
5019
5414
  BucketName: physicalId,
@@ -5033,9 +5428,23 @@ var S3BucketProvider = class S3BucketProvider {
5033
5428
  MetricsConfigurations: metrics,
5034
5429
  AnalyticsConfigurations: analytics,
5035
5430
  IntelligentTieringConfigurations: intelligentTier,
5036
- InventoryConfigurations: inventory
5431
+ InventoryConfigurations: inventory,
5432
+ ...abac === ABAC_ENABLED || _properties?.["AbacStatus"] !== void 0 ? { AbacStatus: abac ?? _properties?.["AbacStatus"] } : {},
5433
+ ...metadata === "unread" ? _properties?.["MetadataConfiguration"] !== void 0 ? { MetadataConfiguration: _properties["MetadataConfiguration"] } : {} : metadata ? { MetadataConfiguration: metadataConfigurationFromSdk(metadata) } : {}
5037
5434
  };
5038
5435
  }
5436
+ getDriftAbsentMeansDefaultKeys(_resourceType, properties) {
5437
+ return [...abacStatusOf(properties) === ABAC_DISABLED ? ["AbacStatus"] : [], ...properties["MetadataConfiguration"] === void 0 ? ["MetadataConfiguration"] : []];
5438
+ }
5439
+ getDriftUnknownPaths() {
5440
+ return [
5441
+ "BucketNamePrefix",
5442
+ "BucketNamespace",
5443
+ "MetadataConfiguration.JournalTableConfiguration.EncryptionConfiguration",
5444
+ "MetadataConfiguration.InventoryTableConfiguration.EncryptionConfiguration",
5445
+ "MetadataConfiguration.AnnotationTableConfiguration.EncryptionConfiguration"
5446
+ ];
5447
+ }
5039
5448
  async readVersioning(bucket) {
5040
5449
  return { Status: (await this.s3Client.send(new GetBucketVersioningCommand({ Bucket: bucket }))).Status ?? "Suspended" };
5041
5450
  }
@@ -5383,6 +5792,14 @@ var S3BucketProvider = class S3BucketProvider {
5383
5792
  throw err;
5384
5793
  }
5385
5794
  }
5795
+ async readAbacStatus(bucket) {
5796
+ try {
5797
+ return (await this.s3Client.send(new GetBucketAbacCommand({ Bucket: bucket }))).AbacStatus?.Status ?? ABAC_DISABLED;
5798
+ } catch (err) {
5799
+ this.logger.debug(safeMsg`Could not read AbacStatus of ${this.shown(bucket)} (${caughtErrorName(err)})`);
5800
+ return;
5801
+ }
5802
+ }
5386
5803
  async readAccelerate(bucket) {
5387
5804
  return { AccelerationStatus: (await this.s3Client.send(new GetBucketAccelerateConfigurationCommand({ Bucket: bucket }))).Status ?? "Suspended" };
5388
5805
  }
@@ -5562,7 +5979,7 @@ var S3BucketProvider = class S3BucketProvider {
5562
5979
  }
5563
5980
  }
5564
5981
  generatedCreateName(_resourceType, logicalId, properties) {
5565
- if (properties["BucketName"]) return void 0;
5982
+ if (properties["BucketNamePrefix"] || properties["BucketName"]) return void 0;
5566
5983
  return generatedNameFor("AWS::S3::Bucket", logicalId);
5567
5984
  }
5568
5985
  async import(input) {
@@ -11863,120 +12280,6 @@ async function waitForGoneAfterDelete(opts) {
11863
12280
  }
11864
12281
  }
11865
12282
 
11866
- //#endregion
11867
- //#region src/provisioning/dynamodb-vector-indexes.ts
11868
- function vectorIndexesByName(value) {
11869
- const out = /* @__PURE__ */ new Map();
11870
- if (!Array.isArray(value)) return out;
11871
- for (const entry of value) {
11872
- if (typeof entry !== "object" || entry === null || Array.isArray(entry)) continue;
11873
- const name = entry["IndexName"];
11874
- if (typeof name === "string") out.set(name, entry);
11875
- }
11876
- return out;
11877
- }
11878
- function vectorIndexForSend(entry) {
11879
- const out = {};
11880
- for (const key of [
11881
- "IndexName",
11882
- "VectorAttribute",
11883
- "Projection",
11884
- "DistanceFunction"
11885
- ]) if (entry[key] !== void 0) out[key] = entry[key];
11886
- if (entry["Dimensions"] !== void 0) out["Dimensions"] = coerceCfnInteger(entry["Dimensions"]) ?? entry["Dimensions"];
11887
- if (entry["SearchSchema"] !== void 0) out["SearchSchema"] = entry["SearchSchema"];
11888
- return out;
11889
- }
11890
- function vectorIndexesForCreate(value) {
11891
- if (value === void 0 || value === null) return void 0;
11892
- if (!Array.isArray(value)) return value;
11893
- return value.map((entry) => typeof entry === "object" && entry !== null && !Array.isArray(entry) ? vectorIndexForSend(entry) : entry);
11894
- }
11895
- function sortedByJson(list) {
11896
- if (!Array.isArray(list)) return list;
11897
- return [...list].sort((a, b) => {
11898
- const x = JSON.stringify(a) ?? "";
11899
- const y = JSON.stringify(b) ?? "";
11900
- return x < y ? -1 : x > y ? 1 : 0;
11901
- });
11902
- }
11903
- function vectorIndexKey(entry) {
11904
- const e = entry;
11905
- const projection = e["Projection"];
11906
- const normalizedProjection = typeof projection === "object" && projection !== null && !Array.isArray(projection) ? {
11907
- ProjectionType: projection["ProjectionType"],
11908
- NonKeyAttributes: sortedByJson(nonEmpty(projection["NonKeyAttributes"]))
11909
- } : projection;
11910
- const attribute = e["VectorAttribute"];
11911
- return JSON.stringify([
11912
- e["IndexName"],
11913
- typeof attribute === "object" && attribute !== null ? attribute["AttributeName"] : attribute,
11914
- coerceCfnInteger(e["Dimensions"]) ?? e["Dimensions"],
11915
- e["DistanceFunction"],
11916
- normalizedProjection,
11917
- sortedByJson(Array.isArray(e["SearchSchema"]) && e["SearchSchema"].length > 0 ? e["SearchSchema"].map((s) => typeof s === "object" && s !== null ? {
11918
- AttributeName: s["AttributeName"],
11919
- SearchSchemaElementType: s["SearchSchemaElementType"]
11920
- } : s) : nonEmpty(e["SearchSchema"]))
11921
- ]);
11922
- }
11923
- function nonEmpty(value) {
11924
- return Array.isArray(value) && value.length === 0 ? void 0 : value;
11925
- }
11926
- function planVectorIndexUpdates(previous, desired, live) {
11927
- const prevByName = vectorIndexesByName(previous);
11928
- const desiredByName = vectorIndexesByName(desired);
11929
- const liveByName = live === void 0 ? void 0 : new Map(live.filter((d) => typeof d.IndexName === "string").map((d) => [d.IndexName, d]));
11930
- const plan = {
11931
- ops: [],
11932
- changed: [],
11933
- adopted: [],
11934
- alreadyGone: []
11935
- };
11936
- const liveHolds = (name, entry) => {
11937
- const l = liveByName?.get(name);
11938
- return l !== void 0 && l.IndexStatus !== "DELETING" && vectorIndexKey(l) === vectorIndexKey(entry);
11939
- };
11940
- for (const name of prevByName.keys()) {
11941
- if (desiredByName.has(name)) continue;
11942
- const l = liveByName?.get(name);
11943
- if (liveByName !== void 0 && (l === void 0 || l.IndexStatus === "DELETING")) {
11944
- plan.alreadyGone.push(name);
11945
- continue;
11946
- }
11947
- plan.ops.push({ Delete: { IndexName: name } });
11948
- }
11949
- for (const [name, entry] of desiredByName) {
11950
- const before = prevByName.get(name);
11951
- if (before === void 0) {
11952
- const l = liveByName?.get(name);
11953
- if (l === void 0 || l.IndexStatus === "DELETING") plan.ops.push({ Create: vectorIndexForSend(entry) });
11954
- else if (liveHolds(name, entry)) plan.adopted.push(name);
11955
- else plan.changed.push(name);
11956
- continue;
11957
- }
11958
- if (vectorIndexKey(before) === vectorIndexKey(entry)) continue;
11959
- if (!liveHolds(name, entry)) plan.changed.push(name);
11960
- }
11961
- return plan;
11962
- }
11963
- function readbackVectorIndexes(live) {
11964
- if (live === void 0 || live.length === 0) return void 0;
11965
- return live.map((d) => {
11966
- const out = {};
11967
- if (d.IndexName !== void 0) out["IndexName"] = d.IndexName;
11968
- if (d.VectorAttribute !== void 0) out["VectorAttribute"] = d.VectorAttribute;
11969
- if (d.Dimensions !== void 0) out["Dimensions"] = d.Dimensions;
11970
- if (d.DistanceFunction !== void 0) out["DistanceFunction"] = d.DistanceFunction;
11971
- if (d.Projection !== void 0) out["Projection"] = d.Projection;
11972
- if (d.SearchSchema !== void 0 && d.SearchSchema.length > 0) out["SearchSchema"] = d.SearchSchema;
11973
- return out;
11974
- });
11975
- }
11976
- function vectorIndexesSettled(live) {
11977
- return (live ?? []).every((d) => d.IndexStatus === void 0 || d.IndexStatus === "ACTIVE");
11978
- }
11979
-
11980
12283
  //#endregion
11981
12284
  //#region src/provisioning/providers/dynamodb-table-provider.ts
11982
12285
  function isTableName(id) {
@@ -12225,12 +12528,15 @@ function sentWarmThroughputMembers(value) {
12225
12528
  function wasSentWarmThroughput(value) {
12226
12529
  return sentWarmThroughputMembers(value).size > 0;
12227
12530
  }
12228
- function readbackWarmThroughput(live, members) {
12531
+ function readbackWarmThroughput(live, members, declared) {
12532
+ const moving = live.Status === "UPDATING" ? coerceWarmThroughput(declared)?.spec : void 0;
12229
12533
  const out = {};
12230
12534
  for (const member of WARM_THROUGHPUT_MEMBERS) {
12231
- if (live[member] === void 0) continue;
12535
+ const value = live[member];
12536
+ if (value === void 0) continue;
12232
12537
  if (members !== void 0 && !members.has(member)) continue;
12233
- out[member] = live[member];
12538
+ const target = moving?.[member];
12539
+ out[member] = target === void 0 ? value : Math.max(value, target);
12234
12540
  }
12235
12541
  return Object.keys(out).length > 0 ? out : void 0;
12236
12542
  }
@@ -12292,7 +12598,7 @@ function reverseMapSecondaryIndex(live, desired, bagInformative) {
12292
12598
  if (Object.keys(odt).length > 0) out["OnDemandThroughput"] = odt;
12293
12599
  }
12294
12600
  if ("WarmThroughput" in live && indexDeclares(desired, "WarmThroughput", bagInformative) && live.WarmThroughput) {
12295
- const wt = readbackWarmThroughput(live.WarmThroughput, bagInformative ? sentWarmThroughputMembers(desired?.["WarmThroughput"]) : void 0);
12601
+ const wt = readbackWarmThroughput(live.WarmThroughput, bagInformative ? sentWarmThroughputMembers(desired?.["WarmThroughput"]) : void 0, bagInformative ? desired?.["WarmThroughput"] : void 0);
12296
12602
  if (wt !== void 0) out["WarmThroughput"] = wt;
12297
12603
  }
12298
12604
  return out;
@@ -12650,7 +12956,14 @@ var DynamoDBTableProvider = class {
12650
12956
  if (context?.replayingState !== true && context?.desiredFromAwsReadback !== true) throw new ProvisioningError(`${lsiMessage}. Nothing was applied to the table; revert the LocalSecondaryIndexes change, or create a new table under a new logical ID (a new table starts empty)`, resourceType, logicalId, physicalId);
12651
12957
  warn(`${lsiMessage}; the LocalSecondaryIndexes change was not applied`);
12652
12958
  }
12653
- const vectorIndexPlan = JSON.stringify(properties["VectorIndexes"]) !== JSON.stringify(previousProperties["VectorIndexes"]) ? planVectorIndexUpdates(previousProperties["VectorIndexes"], properties["VectorIndexes"], table?.VectorIndexes ?? (table === void 0 ? void 0 : [])) : void 0;
12959
+ const vectorIndexesChanged = JSON.stringify(properties["VectorIndexes"]) !== JSON.stringify(previousProperties["VectorIndexes"]);
12960
+ const vectorIndexShape = vectorIndexesChanged ? vectorIndexesShapeDetail(properties["VectorIndexes"]) : void 0;
12961
+ if (vectorIndexShape !== void 0) {
12962
+ const shapeMessage = `AWS::DynamoDB::Table ${logicalId}: ${vectorIndexShape}`;
12963
+ if (context?.replayingState !== true && context?.desiredFromAwsReadback !== true) throw new ProvisioningError(`${maskSecrets(shapeMessage)}. Nothing was applied to the table; fix the template value`, resourceType, logicalId, physicalId);
12964
+ warn(`${shapeMessage}; the VectorIndexes change was not applied`);
12965
+ }
12966
+ const vectorIndexPlan = vectorIndexesChanged && vectorIndexShape === void 0 ? planVectorIndexUpdates(previousProperties["VectorIndexes"], properties["VectorIndexes"], table?.VectorIndexes ?? (table === void 0 ? void 0 : [])) : void 0;
12654
12967
  if (vectorIndexPlan !== void 0 && vectorIndexPlan.changed.length > 0) {
12655
12968
  const vectorMessage = `AWS::DynamoDB::Table ${logicalId}: VectorIndexes ${vectorIndexPlan.changed.map((n) => maskSecrets(n)).join(", ")} changed definition, which DynamoDB cannot modify in place`;
12656
12969
  if (context?.replayingState !== true && context?.desiredFromAwsReadback !== true) throw new ProvisioningError(`${maskSecrets(vectorMessage)}. Nothing was applied to the table; rename the index (so it is dropped and re-created) or revert the change`, resourceType, logicalId, physicalId);
@@ -13971,7 +14284,8 @@ var DynamoDBTableProvider = class {
13971
14284
  if (Object.keys(odt).length > 0) result["OnDemandThroughput"] = odt;
13972
14285
  }
13973
14286
  if (table.WarmThroughput && declaresWarmThroughput(properties)) {
13974
- const wt = readbackWarmThroughput(table.WarmThroughput, properties !== void 0 && desiredBagIsInformative(properties) ? sentWarmThroughputMembers(properties["WarmThroughput"]) : void 0);
14287
+ const informative = properties !== void 0 && desiredBagIsInformative(properties);
14288
+ const wt = readbackWarmThroughput(table.WarmThroughput, informative ? sentWarmThroughputMembers(properties["WarmThroughput"]) : void 0, informative ? properties["WarmThroughput"] : void 0);
13975
14289
  if (wt !== void 0) result["WarmThroughput"] = wt;
13976
14290
  }
13977
14291
  let streamMembersRead = Promise.resolve();
@@ -24502,11 +24816,11 @@ var ApiGatewayV2Provider = class ApiGatewayV2Provider {
24502
24816
  const region = await this.getClient().config.region();
24503
24817
  const { partition } = derivePartitionAndUrlSuffix(region);
24504
24818
  const resourceArn = `arn:${partition}:apigateway:${canonicalizeRegion(region)}::${path}`;
24505
- if (change.remove.length > 0) await this.getClient().send(new UntagResourceCommand$13({
24819
+ if (change.remove.length > 0) await this.getClient().send(new UntagResourceCommand$14({
24506
24820
  ResourceArn: resourceArn,
24507
24821
  TagKeys: change.remove
24508
24822
  }));
24509
- if (Object.keys(change.set).length > 0) await this.getClient().send(new TagResourceCommand$13({
24823
+ if (Object.keys(change.set).length > 0) await this.getClient().send(new TagResourceCommand$14({
24510
24824
  ResourceArn: resourceArn,
24511
24825
  Tags: change.set
24512
24826
  }));
@@ -26426,7 +26740,7 @@ var StepFunctionsProvider = class {
26426
26740
  result["EncryptionConfiguration"] = ec;
26427
26741
  }
26428
26742
  try {
26429
- const tagsResp = await this.getClient().send(new ListTagsForResourceCommand$11({ resourceArn: physicalId }));
26743
+ const tagsResp = await this.getClient().send(new ListTagsForResourceCommand$12({ resourceArn: physicalId }));
26430
26744
  result["Tags"] = normalizeAwsTagsToCfn(tagsResp.tags);
26431
26745
  } catch (err) {
26432
26746
  if (!(err instanceof StateMachineDoesNotExist)) throw err;
@@ -26469,14 +26783,14 @@ var StepFunctionsProvider = class {
26469
26783
  }));
26470
26784
  const tagsToRemove = plan.remove;
26471
26785
  if (tagsToRemove.length > 0) {
26472
- await this.getClient().send(new UntagResourceCommand$14({
26786
+ await this.getClient().send(new UntagResourceCommand$15({
26473
26787
  resourceArn: stateMachineArn,
26474
26788
  tagKeys: tagsToRemove
26475
26789
  }));
26476
26790
  this.logger.debug(`Removed ${tagsToRemove.length} tag(s) from SFN state machine ${stateMachineArn}`);
26477
26791
  }
26478
26792
  if (tagsToAdd.length > 0) {
26479
- await this.getClient().send(new TagResourceCommand$14({
26793
+ await this.getClient().send(new TagResourceCommand$15({
26480
26794
  resourceArn: stateMachineArn,
26481
26795
  tags: tagsToAdd
26482
26796
  }));
@@ -27468,14 +27782,14 @@ var ECSProvider = class {
27468
27782
  }));
27469
27783
  const tagsToRemove = plan.remove;
27470
27784
  if (tagsToRemove.length > 0) {
27471
- await this.getClient().send(new UntagResourceCommand$15({
27785
+ await this.getClient().send(new UntagResourceCommand$16({
27472
27786
  resourceArn,
27473
27787
  tagKeys: tagsToRemove
27474
27788
  }));
27475
27789
  log.debug(`Removed ${tagsToRemove.length} tag(s) from ECS resource ${resourceArn}`);
27476
27790
  }
27477
27791
  if (tagsToAdd.length > 0) {
27478
- await this.getClient().send(new TagResourceCommand$15({
27792
+ await this.getClient().send(new TagResourceCommand$16({
27479
27793
  resourceArn,
27480
27794
  tags: tagsToAdd
27481
27795
  }));
@@ -30927,6 +31241,41 @@ function wrapDocDBFailure(logger, mask, error, build) {
30927
31241
  const wrapped = build(`${m(failure.summary)}${relayedNameCollision(failure.detail)}`);
30928
31242
  return error instanceof Error ? markRedactedCause(wrapped) : wrapped;
30929
31243
  }
31244
+ function docdbStringList(value) {
31245
+ if (value == null) return [];
31246
+ if (!Array.isArray(value)) return void 0;
31247
+ return value.every((item) => typeof item === "string") ? value : void 0;
31248
+ }
31249
+ function docdbLogExportChange(desired, previous) {
31250
+ const enable = [...new Set(desired)].filter((type) => !previous.includes(type));
31251
+ const disable = [...new Set(previous)].filter((type) => !desired.includes(type));
31252
+ if (enable.length === 0 && disable.length === 0) return void 0;
31253
+ return {
31254
+ ...enable.length > 0 && { EnableLogTypes: enable },
31255
+ ...disable.length > 0 && { DisableLogTypes: disable }
31256
+ };
31257
+ }
31258
+ function cfnCapacity(value) {
31259
+ const capacity = typeof value === "number" || typeof value === "string" && value.trim() !== "" ? Number(value) : NaN;
31260
+ return Number.isFinite(capacity) ? capacity : void 0;
31261
+ }
31262
+ function docdbServerlessScaling(value) {
31263
+ if (value == null) return void 0;
31264
+ if (typeof value !== "object" || Array.isArray(value)) return null;
31265
+ const { MinCapacity, MaxCapacity } = value;
31266
+ const min = cfnCapacity(MinCapacity);
31267
+ const max = cfnCapacity(MaxCapacity);
31268
+ if (min === void 0 || max === void 0) return null;
31269
+ return {
31270
+ MinCapacity: min,
31271
+ MaxCapacity: max
31272
+ };
31273
+ }
31274
+ function holdsDocDBPendingValue(value) {
31275
+ if (value === void 0 || value === null) return false;
31276
+ if (typeof value === "object") return Object.values(value).some(holdsDocDBPendingValue);
31277
+ return true;
31278
+ }
30930
31279
  function isDocDBNotFoundError(error, faultName) {
30931
31280
  if (!(error instanceof Error)) return false;
30932
31281
  const name = error.name ?? "";
@@ -30959,7 +31308,7 @@ async function applyDocDBTagDiff(client, logger, arn, resourceType, logicalId, o
30959
31308
  }
30960
31309
  async function attachDocDBTags(client, logger, result, arn) {
30961
31310
  try {
30962
- const tagsResp = await client.send(new ListTagsForResourceCommand$12({ ResourceName: arn }));
31311
+ const tagsResp = await client.send(new ListTagsForResourceCommand$13({ ResourceName: arn }));
30963
31312
  result["Tags"] = normalizeAwsTagsToCfn(tagsResp.TagList);
30964
31313
  } catch (err) {
30965
31314
  logger.debug(safeMsg`DocDB ListTagsForResource(${arn}) failed: ${describeAwsFailure(err).detail}`);
@@ -30977,6 +31326,20 @@ function masterUserPasswordToSend(properties, previousProperties, context) {
30977
31326
  return typeof desired === "string" && typeof recorded === "string" && recorded === desired && dynamicReferenceTokens(recorded).length === 0 && recorded !== "***" ? void 0 : desired;
30978
31327
  }
30979
31328
  const DOCDB_DEFAULT_PORT = 27017;
31329
+ const DOCDB_DEFAULT_STORAGE_TYPE = "standard";
31330
+ function rotateMasterUserPassword(properties, previousProperties, context) {
31331
+ if (context?.replayingState === true || context?.desiredFromAwsReadback === true) return false;
31332
+ return coerceCfnBoolean(properties["RotateMasterUserPassword"]) === true && coerceCfnBoolean(previousProperties["RotateMasterUserPassword"]) !== true;
31333
+ }
31334
+ function kmsKeyText(key) {
31335
+ return key.replace(/^arn:[^:]*:kms:[^:]*:[^:]*:/, "").replace(/^key\//, "");
31336
+ }
31337
+ function sameKmsKey(a, b) {
31338
+ return b !== void 0 && kmsKeyText(a) === kmsKeyText(b);
31339
+ }
31340
+ function declaredChange(desired, recorded, live) {
31341
+ return desired != null && String(desired) !== String(recorded ?? live);
31342
+ }
30980
31343
  const DOCDB_CLUSTER_KEPT_ON_REMOVAL = [
30981
31344
  "DeletionProtection",
30982
31345
  "BackupRetentionPeriod",
@@ -30984,17 +31347,38 @@ const DOCDB_CLUSTER_KEPT_ON_REMOVAL = [
30984
31347
  "EngineVersion",
30985
31348
  "PreferredBackupWindow",
30986
31349
  "PreferredMaintenanceWindow",
30987
- "DBClusterParameterGroupName"
31350
+ "DBClusterParameterGroupName",
31351
+ "CopyTagsToSnapshot",
31352
+ "EnableCloudwatchLogsExports",
31353
+ "StorageType",
31354
+ "ServerlessV2ScalingConfiguration",
31355
+ "MasterUserSecretKmsKeyId"
31356
+ ];
31357
+ const DOCDB_CLUSTER_UNMEASURED_ON_REMOVAL = ["NetworkType", "ManageMasterUserPassword"];
31358
+ const DOCDB_INSTANCE_KEPT_ON_REMOVAL = [
31359
+ "PreferredMaintenanceWindow",
31360
+ "CACertificateIdentifier",
31361
+ "EnablePerformanceInsights"
30988
31362
  ];
30989
- const DOCDB_INSTANCE_KEPT_ON_REMOVAL = ["PreferredMaintenanceWindow"];
30990
- function keptOnRemovalWarning$1(keys, properties, previousProperties, context, logicalId, resourceType) {
31363
+ const CLUSTER_MODIFY_UNSETTLED_KEYS = [
31364
+ "CopyTagsToSnapshot",
31365
+ "EnableCloudwatchLogsExports",
31366
+ "NetworkType",
31367
+ "ServerlessV2ScalingConfiguration",
31368
+ "StorageType"
31369
+ ];
31370
+ const INSTANCE_MODIFY_UNSETTLED_KEYS = ["CACertificateIdentifier", "EnablePerformanceInsights"];
31371
+ const SETTLE_MAX_WAIT_MS = 3e5;
31372
+ const STORAGE_SETTLE_MAX_WAIT_MS = 18e5;
31373
+ const DEADLINE_MARGIN_MS = 3e4;
31374
+ function keptOnRemovalWarning$1(keys, properties, previousProperties, context, logicalId, resourceType, measured = true) {
30991
31375
  const removedSet = context?.removedProperties ?? new Set(removedTemplateKeys(previousProperties, properties));
30992
31376
  const removed = keys.filter((key) => removedSet.has(key));
30993
31377
  if (removed.length === 0) return void 0;
30994
31378
  const one = removed.length === 1;
30995
31379
  const names = `${one ? "property" : "properties"} ${removed.join(", ")}`;
30996
31380
  const modify = resourceType === "AWS::DocDB::DBInstance" ? "ModifyDBInstance" : "ModifyDBCluster";
30997
- return context?.replayingState ? safeMsg`${logicalId} (${resourceType}): ${names} ${one ? "is" : "are"} absent from the state being restored; ${modify} keeps a setting it is not sent, so the rollback leaves any value the failed deploy applied in place.` : safeMsg`${logicalId} (${resourceType}): ${names} ${one ? "was" : "were"} removed from the template; cdkd leaves the current AWS ${one ? "value" : "values"} in place, as CloudFormation does. Declare ${one ? "it" : "them"} to change ${one ? "it" : "them"}.`;
31381
+ return context?.replayingState ? safeMsg`${logicalId} (${resourceType}): ${names} ${one ? "is" : "are"} absent from the state being restored; ${modify} keeps a setting it is not sent, so the rollback leaves any value the failed deploy applied in place.` : safeMsg`${logicalId} (${resourceType}): ${names} ${one ? "was" : "were"} removed from the template; cdkd leaves the current AWS ${one ? "value" : "values"} in place${measured ? ", as CloudFormation does" : ""}. Declare ${one ? "it" : "them"} to change ${one ? "it" : "them"}.`;
30998
31382
  }
30999
31383
  const SECURITY_GROUP_CHANGE_MEMBER_STATUSES = /* @__PURE__ */ new Set(["modifying"]);
31000
31384
  const PORT_CHANGE_MEMBER_STATUSES = /* @__PURE__ */ new Set(["modifying", "rebooting"]);
@@ -31038,6 +31422,7 @@ var DocDBProvider = class {
31038
31422
  protectionFlips = new ProtectionFlipRegistry();
31039
31423
  disableCcApiFallback = true;
31040
31424
  removalHandledInUpdate = /* @__PURE__ */ new Map([["AWS::DocDB::DBCluster", /* @__PURE__ */ new Set([
31425
+ "AvailabilityZones",
31041
31426
  "DBClusterIdentifier",
31042
31427
  "DBSubnetGroupName",
31043
31428
  "KmsKeyId",
@@ -31046,7 +31431,9 @@ var DocDBProvider = class {
31046
31431
  "Port",
31047
31432
  "Tags",
31048
31433
  "MasterUserPassword",
31049
- ...DOCDB_CLUSTER_KEPT_ON_REMOVAL
31434
+ "RotateMasterUserPassword",
31435
+ ...DOCDB_CLUSTER_KEPT_ON_REMOVAL,
31436
+ ...DOCDB_CLUSTER_UNMEASURED_ON_REMOVAL
31050
31437
  ])], ["AWS::DocDB::DBInstance", /* @__PURE__ */ new Set([
31051
31438
  "DBInstanceIdentifier",
31052
31439
  "DBClusterIdentifier",
@@ -31054,6 +31441,7 @@ var DocDBProvider = class {
31054
31441
  "DBInstanceClass",
31055
31442
  "Tags",
31056
31443
  "AutoMinorVersionUpgrade",
31444
+ "CertificateRotationRestart",
31057
31445
  ...DOCDB_INSTANCE_KEPT_ON_REMOVAL
31058
31446
  ])]]);
31059
31447
  handledProperties = /* @__PURE__ */ new Map([["AWS::DocDB::DBCluster", /* @__PURE__ */ new Set([
@@ -31071,7 +31459,16 @@ var DocDBProvider = class {
31071
31459
  "PreferredMaintenanceWindow",
31072
31460
  "DBClusterParameterGroupName",
31073
31461
  "DeletionProtection",
31074
- "Tags"
31462
+ "Tags",
31463
+ "AvailabilityZones",
31464
+ "CopyTagsToSnapshot",
31465
+ "EnableCloudwatchLogsExports",
31466
+ "ManageMasterUserPassword",
31467
+ "MasterUserSecretKmsKeyId",
31468
+ "NetworkType",
31469
+ "RotateMasterUserPassword",
31470
+ "ServerlessV2ScalingConfiguration",
31471
+ "StorageType"
31075
31472
  ])], ["AWS::DocDB::DBInstance", /* @__PURE__ */ new Set([
31076
31473
  "DBInstanceIdentifier",
31077
31474
  "DBInstanceClass",
@@ -31079,7 +31476,10 @@ var DocDBProvider = class {
31079
31476
  "AvailabilityZone",
31080
31477
  "PreferredMaintenanceWindow",
31081
31478
  "AutoMinorVersionUpgrade",
31082
- "Tags"
31479
+ "Tags",
31480
+ "CACertificateIdentifier",
31481
+ "CertificateRotationRestart",
31482
+ "EnablePerformanceInsights"
31083
31483
  ])]]);
31084
31484
  getClient() {
31085
31485
  if (!this.docdbClient) {
@@ -31101,8 +31501,8 @@ var DocDBProvider = class {
31101
31501
  async create(logicalId, resourceType, properties, context) {
31102
31502
  const mask = context?.maskSecrets;
31103
31503
  switch (resourceType) {
31104
- case "AWS::DocDB::DBCluster": return this.createDBCluster(logicalId, resourceType, properties, mask);
31105
- case "AWS::DocDB::DBInstance": return this.createDBInstance(logicalId, resourceType, properties, mask);
31504
+ case "AWS::DocDB::DBCluster": return this.createDBCluster(logicalId, resourceType, properties, mask, context?.replayingState === true);
31505
+ case "AWS::DocDB::DBInstance": return this.createDBInstance(logicalId, resourceType, properties, mask, context?.replayingState === true);
31106
31506
  default: throw new ProvisioningError(`Unsupported resource type: ${resourceType}`, resourceType, logicalId);
31107
31507
  }
31108
31508
  }
@@ -31127,9 +31527,13 @@ var DocDBProvider = class {
31127
31527
  const thrown = this.wrapCaughtError(mask, error, build);
31128
31528
  return error instanceof Error && error.name.includes("NotFound") ? markNotGone(thrown) : thrown;
31129
31529
  }
31130
- async createDBCluster(logicalId, resourceType, properties, mask) {
31530
+ async createDBCluster(logicalId, resourceType, properties, mask, replayingState) {
31131
31531
  this.logger.debug(`Creating DocDB DBCluster ${logicalId}`);
31132
31532
  const tags = refuseMalformedDesiredTags(properties["Tags"], resourceType, logicalId);
31533
+ const origin = { stateBorne: replayingState };
31534
+ const { logTypes, scaling } = this.readClusterBlocks(properties, resourceType, logicalId, origin, true);
31535
+ const managedPassword = this.readBooleanProperty("ManageMasterUserPassword", properties, resourceType, logicalId, origin);
31536
+ const password = this.passwordBesideManaged(managedPassword, false, properties["MasterUserPassword"], resourceType, logicalId, origin);
31133
31537
  const dbClusterIdentifier = properties["DBClusterIdentifier"] || generatedNameFor("AWS::DocDB::DBCluster", logicalId);
31134
31538
  let clusterCreated = false;
31135
31539
  let createdResourceId;
@@ -31139,7 +31543,7 @@ var DocDBProvider = class {
31139
31543
  Engine: "docdb",
31140
31544
  EngineVersion: properties["EngineVersion"],
31141
31545
  MasterUsername: properties["MasterUsername"],
31142
- MasterUserPassword: properties["MasterUserPassword"],
31546
+ MasterUserPassword: password,
31143
31547
  Port: properties["Port"] != null ? Number(properties["Port"]) : void 0,
31144
31548
  VpcSecurityGroupIds: properties["VpcSecurityGroupIds"],
31145
31549
  DBSubnetGroupName: properties["DBSubnetGroupName"],
@@ -31150,6 +31554,14 @@ var DocDBProvider = class {
31150
31554
  PreferredMaintenanceWindow: properties["PreferredMaintenanceWindow"],
31151
31555
  DBClusterParameterGroupName: properties["DBClusterParameterGroupName"],
31152
31556
  DeletionProtection: properties["DeletionProtection"],
31557
+ AvailabilityZones: properties["AvailabilityZones"],
31558
+ CopyTagsToSnapshot: properties["CopyTagsToSnapshot"],
31559
+ ManageMasterUserPassword: managedPassword,
31560
+ MasterUserSecretKmsKeyId: properties["MasterUserSecretKmsKeyId"],
31561
+ NetworkType: properties["NetworkType"],
31562
+ StorageType: properties["StorageType"],
31563
+ ...logTypes !== void 0 && logTypes.length > 0 && { EnableCloudwatchLogsExports: logTypes },
31564
+ ...scaling != null && { ServerlessV2ScalingConfiguration: scaling },
31153
31565
  ...tags.length > 0 && { Tags: tags }
31154
31566
  }));
31155
31567
  clusterCreated = true;
@@ -31171,10 +31583,26 @@ var DocDBProvider = class {
31171
31583
  async updateDBCluster(logicalId, physicalId, resourceType, properties, previousProperties, context) {
31172
31584
  this.logger.debug(`Updating DocDB DBCluster ${logicalId}: ${physicalId}`);
31173
31585
  refuseMalformedDesiredTags(properties["Tags"], resourceType, logicalId, physicalId);
31586
+ const origin = {
31587
+ stateBorne: context?.replayingState === true || context?.desiredFromAwsReadback === true,
31588
+ physicalId
31589
+ };
31590
+ const { logTypes, scaling } = this.readClusterBlocks(properties, resourceType, logicalId, origin, false);
31591
+ const logExportConfig = logTypes === void 0 ? void 0 : docdbLogExportChange(logTypes, docdbStringList(previousProperties["EnableCloudwatchLogsExports"]) ?? []);
31174
31592
  try {
31593
+ const credentials = await this.planMasterCredentials(physicalId, properties, previousProperties, resourceType, logicalId, context, origin);
31175
31594
  const vpcSgIds = properties["VpcSecurityGroupIds"];
31176
31595
  const sendVpcSgIds = vpcSgIds !== void 0 && vpcSgIds.length > 0;
31177
31596
  const portToSend = clusterPortToSend(properties, previousProperties);
31597
+ const unrecorded = (key) => properties[key] != null && previousProperties[key] == null;
31598
+ const live = unrecorded("NetworkType") || unrecorded("StorageType") || logExportConfig?.EnableLogTypes !== void 0 ? await this.describeDBCluster(physicalId) : void 0;
31599
+ const networkType = properties["NetworkType"];
31600
+ const networkChange = declaredChange(networkType, previousProperties["NetworkType"], live?.NetworkType);
31601
+ const storageType = properties["StorageType"];
31602
+ const storageChange = declaredChange(storageType, previousProperties["StorageType"], live?.StorageType ?? DOCDB_DEFAULT_STORAGE_TYPE);
31603
+ const previousScaling = docdbServerlessScaling(previousProperties["ServerlessV2ScalingConfiguration"]);
31604
+ const scalingChange = scaling != null && (scaling.MinCapacity !== previousScaling?.MinCapacity || scaling.MaxCapacity !== previousScaling?.MaxCapacity);
31605
+ this.markChangedUnsettled(CLUSTER_MODIFY_UNSETTLED_KEYS, properties, previousProperties, context);
31178
31606
  await this.getClient().send(new ModifyDBClusterCommand$1({
31179
31607
  DBClusterIdentifier: physicalId,
31180
31608
  EngineVersion: properties["EngineVersion"],
@@ -31184,15 +31612,40 @@ var DocDBProvider = class {
31184
31612
  PreferredMaintenanceWindow: properties["PreferredMaintenanceWindow"],
31185
31613
  DBClusterParameterGroupName: properties["DBClusterParameterGroupName"],
31186
31614
  ...sendVpcSgIds && { VpcSecurityGroupIds: vpcSgIds },
31187
- MasterUserPassword: masterUserPasswordToSend(properties, previousProperties, context),
31615
+ MasterUserPassword: credentials.password,
31188
31616
  Port: portToSend,
31617
+ CopyTagsToSnapshot: properties["CopyTagsToSnapshot"],
31618
+ ...rotateMasterUserPassword(properties, previousProperties, context) && { RotateMasterUserPassword: true },
31619
+ ...credentials.managed !== void 0 && { ManageMasterUserPassword: credentials.managed },
31620
+ ...credentials.secretKmsKey !== void 0 && { MasterUserSecretKmsKeyId: credentials.secretKmsKey },
31621
+ ...networkChange && { NetworkType: networkType },
31622
+ ...storageChange && { StorageType: storageType },
31623
+ ...scalingChange && { ServerlessV2ScalingConfiguration: scaling },
31624
+ ...logExportConfig !== void 0 && { CloudwatchLogsExportConfiguration: logExportConfig },
31189
31625
  ApplyImmediately: true
31190
31626
  }));
31627
+ const addedLogTypes = (logExportConfig?.EnableLogTypes ?? []).filter((type) => !live?.EnabledCloudwatchLogsExports?.includes(type));
31628
+ if (addedLogTypes.length > 0) context?.markAttempted?.("EnableCloudwatchLogsExports", addedLogTypes);
31191
31629
  this.logger.debug(`Successfully updated DocDB DBCluster ${logicalId}`);
31192
31630
  const noWait = process.env["CDKD_NO_WAIT"] === "true";
31193
31631
  const portChanged = portToSend !== void 0 && portToSend !== numberOrUndefined(previousProperties["Port"]);
31194
31632
  if (!noWait && portChanged) await this.waitForClusterPortApplied(physicalId, logicalId, portToSend);
31195
31633
  const described = await this.describeDBCluster(physicalId);
31634
+ if (!noWait) {
31635
+ const { EnableLogTypes: enabled = [], DisableLogTypes: disabled = [] } = logExportConfig ?? {};
31636
+ const applied = /* @__PURE__ */ new Map();
31637
+ if (logExportConfig !== void 0) applied.set("EnableCloudwatchLogsExports", (cluster) => {
31638
+ const logs = cluster?.EnabledCloudwatchLogsExports;
31639
+ return enabled.every((type) => logs?.includes(type)) && !disabled.some((type) => logs?.includes(type));
31640
+ });
31641
+ if (networkChange) applied.set("NetworkType", (cluster) => cluster?.NetworkType === networkType);
31642
+ if (storageChange) applied.set("StorageType", (cluster) => (cluster?.StorageType ?? DOCDB_DEFAULT_STORAGE_TYPE) === storageType);
31643
+ if (scalingChange) applied.set("ServerlessV2ScalingConfiguration", (cluster) => {
31644
+ const live = cluster?.ServerlessV2ScalingConfiguration;
31645
+ return live?.MinCapacity === scaling?.MinCapacity && live?.MaxCapacity === scaling?.MaxCapacity;
31646
+ });
31647
+ await this.waitForApplied(logicalId, applied, () => this.describeDBCluster(physicalId), storageChange ? STORAGE_SETTLE_MAX_WAIT_MS : SETTLE_MAX_WAIT_MS);
31648
+ }
31196
31649
  if (!noWait && portChanged) {
31197
31650
  for (const member of described?.DBClusterMembers ?? []) if (member.DBInstanceIdentifier) await this.waitForMemberAfterClusterChange(member.DBInstanceIdentifier, logicalId, PORT_CHANGE_MEMBER_STATUSES, "port");
31198
31651
  }
@@ -31203,15 +31656,20 @@ var DocDBProvider = class {
31203
31656
  if (described?.DBClusterArn) await applyDocDBTagDiff(this.getClient(), this.logger, described.DBClusterArn, resourceType, logicalId, previousProperties["Tags"], properties["Tags"]);
31204
31657
  const keptWarning = keptOnRemovalWarning$1(DOCDB_CLUSTER_KEPT_ON_REMOVAL, properties, previousProperties, context, logicalId, resourceType);
31205
31658
  if (keptWarning !== void 0) this.logger.warn(keptWarning);
31659
+ const unmeasuredWarning = keptOnRemovalWarning$1(DOCDB_CLUSTER_UNMEASURED_ON_REMOVAL, properties, previousProperties, context, logicalId, resourceType, false);
31660
+ if (unmeasuredWarning !== void 0) this.logger.warn(unmeasuredWarning);
31661
+ if (credentials.heldWarning !== void 0) this.logger.warn(credentials.heldWarning);
31206
31662
  return {
31207
31663
  physicalId,
31208
31664
  wasReplaced: false,
31209
31665
  attributes: clusterAttributes(noWait && portChanged && described !== void 0 ? {
31210
31666
  ...described,
31211
31667
  Port: portToSend
31212
- } : described)
31668
+ } : described),
31669
+ ...credentials.effectiveProperties !== void 0 && { effectiveProperties: credentials.effectiveProperties }
31213
31670
  };
31214
31671
  } catch (error) {
31672
+ if (error instanceof ProvisioningError) throw error;
31215
31673
  const cause = error instanceof Error ? error : void 0;
31216
31674
  throw this.wrapCaughtError(context?.maskSecrets, error, (text) => new ProvisioningError(`Failed to update DocDB DBCluster ${logicalId}: ${text}`, resourceType, logicalId, physicalId, cause));
31217
31675
  }
@@ -31293,9 +31751,10 @@ var DocDBProvider = class {
31293
31751
  throw this.wrapDeleteError(context?.maskSecrets, error, (text) => new ProvisioningError(`Failed to delete DocDB DBCluster ${logicalId}: ${text}`, resourceType, logicalId, physicalId, cause));
31294
31752
  }
31295
31753
  }
31296
- async createDBInstance(logicalId, resourceType, properties, mask) {
31754
+ async createDBInstance(logicalId, resourceType, properties, mask, replayingState) {
31297
31755
  this.logger.debug(`Creating DocDB DBInstance ${logicalId}`);
31298
31756
  const tags = refuseMalformedDesiredTags(properties["Tags"], resourceType, logicalId);
31757
+ const insights = this.readBooleanProperty("EnablePerformanceInsights", properties, resourceType, logicalId, { stateBorne: replayingState });
31299
31758
  const dbInstanceIdentifier = properties["DBInstanceIdentifier"] || generatedNameFor("AWS::DocDB::DBInstance", logicalId);
31300
31759
  let instanceCreated = false;
31301
31760
  let createdResourceId;
@@ -31308,6 +31767,8 @@ var DocDBProvider = class {
31308
31767
  AvailabilityZone: properties["AvailabilityZone"],
31309
31768
  PreferredMaintenanceWindow: properties["PreferredMaintenanceWindow"],
31310
31769
  AutoMinorVersionUpgrade: properties["AutoMinorVersionUpgrade"],
31770
+ CACertificateIdentifier: properties["CACertificateIdentifier"],
31771
+ EnablePerformanceInsights: insights,
31311
31772
  ...tags.length > 0 && { Tags: tags }
31312
31773
  }));
31313
31774
  instanceCreated = true;
@@ -31330,13 +31791,25 @@ var DocDBProvider = class {
31330
31791
  this.logger.debug(`Updating DocDB DBInstance ${logicalId}: ${physicalId}`);
31331
31792
  const mask = context?.maskSecrets;
31332
31793
  refuseMalformedDesiredTags(properties["Tags"], resourceType, logicalId, physicalId);
31794
+ const insights = this.readBooleanProperty("EnablePerformanceInsights", properties, resourceType, logicalId, {
31795
+ stateBorne: context?.replayingState === true || context?.desiredFromAwsReadback === true,
31796
+ physicalId
31797
+ });
31333
31798
  try {
31799
+ const certificate = properties["CACertificateIdentifier"];
31800
+ const live = certificate != null && previousProperties["CACertificateIdentifier"] == null || insights !== void 0 && previousProperties["EnablePerformanceInsights"] == null ? await this.describeDBInstance(physicalId) : void 0;
31801
+ const certificateChange = declaredChange(certificate, previousProperties["CACertificateIdentifier"], live?.CACertificateIdentifier);
31802
+ const insightsChange = declaredChange(insights, previousProperties["EnablePerformanceInsights"], live?.PerformanceInsightsEnabled ?? false);
31803
+ this.markChangedUnsettled(INSTANCE_MODIFY_UNSETTLED_KEYS, properties, previousProperties, context);
31334
31804
  await modifyDbInstanceWhenAvailable({
31335
31805
  send: () => this.getClient().send(new ModifyDBInstanceCommand$1({
31336
31806
  DBInstanceIdentifier: physicalId,
31337
31807
  DBInstanceClass: properties["DBInstanceClass"],
31338
31808
  PreferredMaintenanceWindow: properties["PreferredMaintenanceWindow"],
31339
31809
  AutoMinorVersionUpgrade: properties["AutoMinorVersionUpgrade"],
31810
+ ...certificateChange && { CACertificateIdentifier: certificate },
31811
+ ...certificateChange && properties["CertificateRotationRestart"] != null && { CertificateRotationRestart: properties["CertificateRotationRestart"] },
31812
+ ...insightsChange && { EnablePerformanceInsights: insights },
31340
31813
  ApplyImmediately: true
31341
31814
  })),
31342
31815
  readStatus: async () => (await this.describeDBInstance(physicalId))?.DBInstanceStatus,
@@ -31347,6 +31820,12 @@ var DocDBProvider = class {
31347
31820
  remainingMs: enclosingDeadlineRemainingMs()
31348
31821
  });
31349
31822
  this.logger.debug(`Successfully updated DocDB DBInstance ${logicalId}`);
31823
+ if (process.env["CDKD_NO_WAIT"] !== "true") {
31824
+ const applied = /* @__PURE__ */ new Map();
31825
+ if (certificateChange) applied.set("CACertificateIdentifier", (instance) => instance?.CACertificateIdentifier === certificate);
31826
+ if (insightsChange) applied.set("EnablePerformanceInsights", (instance) => instance?.PerformanceInsightsEnabled === insights);
31827
+ await this.waitForApplied(logicalId, applied, () => this.describeDBInstance(physicalId));
31828
+ }
31350
31829
  const described = await this.describeDBInstance(physicalId);
31351
31830
  if (described?.DBInstanceArn) await applyDocDBTagDiff(this.getClient(), this.logger, described.DBInstanceArn, resourceType, logicalId, previousProperties["Tags"], properties["Tags"]);
31352
31831
  const keptWarning = keptOnRemovalWarning$1(DOCDB_INSTANCE_KEPT_ON_REMOVAL, properties, previousProperties, context, logicalId, resourceType);
@@ -31379,6 +31858,106 @@ var DocDBProvider = class {
31379
31858
  throw this.wrapDeleteError(context?.maskSecrets, error, (text) => new ProvisioningError(`Failed to delete DocDB DBInstance ${logicalId}: ${text}`, resourceType, logicalId, physicalId, cause));
31380
31859
  }
31381
31860
  }
31861
+ markChangedUnsettled(keys, properties, previousProperties, context) {
31862
+ for (const key of keys) if (properties[key] != null && !isDeepStrictEqual(properties[key], previousProperties[key])) context?.markUnsettled?.(key);
31863
+ }
31864
+ refuseBlock(logicalId, resourceType, physicalId, text) {
31865
+ throw markNonRetryable(new ProvisioningError(safeMsg`${resourceType === "AWS::DocDB::DBInstance" ? "DocDB DBInstance" : "DocDB DBCluster"} ${logicalId}: ${text}; nothing was changed.`, resourceType, logicalId, physicalId));
31866
+ }
31867
+ readClusterBlocks(properties, resourceType, logicalId, origin, creating) {
31868
+ const leaveOut = (key) => {
31869
+ this.logger.warn(safeMsg`${logicalId} (${resourceType}): the recorded ${key} is unusable, so it is not sent.`);
31870
+ };
31871
+ const rawLogs = properties["EnableCloudwatchLogsExports"];
31872
+ let logTypes = rawLogs == null ? void 0 : docdbStringList(rawLogs);
31873
+ if (rawLogs != null && logTypes === void 0) {
31874
+ if (!(creating && origin.stateBorne)) this.refuseBlock(logicalId, resourceType, origin.physicalId, "EnableCloudwatchLogsExports must be a list of strings");
31875
+ leaveOut("EnableCloudwatchLogsExports");
31876
+ logTypes = void 0;
31877
+ }
31878
+ const scaling = docdbServerlessScaling(properties["ServerlessV2ScalingConfiguration"]);
31879
+ if (scaling === null) {
31880
+ if (!origin.stateBorne) this.refuseBlock(logicalId, resourceType, origin.physicalId, "ServerlessV2ScalingConfiguration must be an object with both a numeric MinCapacity and a numeric MaxCapacity");
31881
+ leaveOut("ServerlessV2ScalingConfiguration");
31882
+ }
31883
+ return {
31884
+ logTypes,
31885
+ scaling
31886
+ };
31887
+ }
31888
+ async planMasterCredentials(physicalId, properties, previousProperties, resourceType, logicalId, context, origin) {
31889
+ const managed = this.readBooleanProperty("ManageMasterUserPassword", properties, resourceType, logicalId, origin);
31890
+ const changedPassword = masterUserPasswordToSend(properties, previousProperties, context);
31891
+ const recordedFlag = coerceCfnBoolean(previousProperties["ManageMasterUserPassword"]);
31892
+ const key = properties["MasterUserSecretKmsKeyId"];
31893
+ const recordedKey = previousProperties["MasterUserSecretKmsKeyId"];
31894
+ let managedSide = recordedFlag ?? false;
31895
+ let keyChange = key != null && !sameKmsKey(key, recordedKey);
31896
+ if (recordedFlag === void 0 && (changedPassword !== void 0 || managed !== void 0 || keyChange)) {
31897
+ const secret = (await this.describeDBCluster(physicalId))?.MasterUserSecret;
31898
+ managedSide = secret !== void 0;
31899
+ if (recordedKey === void 0 && secret?.KmsKeyId !== void 0 && key != null) keyChange = !sameKmsKey(key, secret.KmsKeyId) && !kmsKeyText(key).startsWith("alias/");
31900
+ }
31901
+ const leaving = managed === false && managedSide;
31902
+ const declared = properties["MasterUserPassword"];
31903
+ const declaredUsable = typeof declared === "string" && declared !== "***" && dynamicReferenceTokens(declared).length === 0;
31904
+ const password = leaving ? declaredUsable ? declared : void 0 : changedPassword;
31905
+ const modeChange = managed !== void 0 && managed !== managedSide;
31906
+ if (context?.desiredFromAwsReadback === true && modeChange) return {
31907
+ managed: void 0,
31908
+ secretKmsKey: void 0,
31909
+ password: void 0,
31910
+ heldWarning: safeMsg`${logicalId} (${resourceType}): cdkd drift --revert does not change ManageMasterUserPassword, so it is left as it is. Declare it in the template and deploy to change it.`
31911
+ };
31912
+ if (origin.stateBorne && leaving && password === void 0) return {
31913
+ managed: void 0,
31914
+ secretKmsKey: void 0,
31915
+ password: void 0,
31916
+ heldWarning: safeMsg`${logicalId} (${resourceType}): ManageMasterUserPassword stays true: turning it off needs a MasterUserPassword, which the restored state does not hold. Declare both in the template and deploy.`,
31917
+ effectiveProperties: {
31918
+ ...properties,
31919
+ ManageMasterUserPassword: true
31920
+ }
31921
+ };
31922
+ const sendKey = key != null && (modeChange && managed === true || keyChange && (managed ?? managedSide));
31923
+ return {
31924
+ managed: modeChange || sendKey ? managed : void 0,
31925
+ secretKmsKey: sendKey ? key : void 0,
31926
+ password: this.passwordBesideManaged(managed, managed === void 0 && managedSide, password, resourceType, logicalId, origin),
31927
+ heldWarning: void 0
31928
+ };
31929
+ }
31930
+ readBooleanProperty(key, properties, resourceType, logicalId, origin) {
31931
+ const value = properties[key];
31932
+ if (value == null) return void 0;
31933
+ const flag = coerceCfnBoolean(value);
31934
+ if (flag !== void 0) return flag;
31935
+ if (!origin.stateBorne) this.refuseBlock(logicalId, resourceType, origin.physicalId, `${key} must be a boolean`);
31936
+ this.logger.warn(safeMsg`${logicalId} (${resourceType}): the recorded ${key} is unusable, so it is not sent.`);
31937
+ }
31938
+ passwordBesideManaged(managed, removedFromManaged, password, resourceType, logicalId, origin) {
31939
+ if (managed !== true && !removedFromManaged || password == null) return password;
31940
+ if (!origin.stateBorne) this.refuseBlock(logicalId, resourceType, origin.physicalId, removedFromManaged ? "MasterUserPassword cannot change while AWS manages the password; declare ManageMasterUserPassword: false beside it to leave managed mode" : "MasterUserPassword cannot be set while ManageMasterUserPassword is true, because AWS manages that password");
31941
+ this.logger.warn(removedFromManaged ? safeMsg`${logicalId} (${resourceType}): the recorded MasterUserPassword is not sent: the cluster stays managed, because the recorded ManageMasterUserPassword is absent.` : safeMsg`${logicalId} (${resourceType}): the recorded MasterUserPassword is not sent, because ManageMasterUserPassword is true.`);
31942
+ }
31943
+ async waitForApplied(logicalId, applied, read, maxWaitMs = SETTLE_MAX_WAIT_MS) {
31944
+ if (applied.size === 0) return;
31945
+ const capMs = Math.min(maxWaitMs, enclosingDeadlineRemainingMs() - DEADLINE_MARGIN_MS);
31946
+ const startTime = Date.now();
31947
+ let delay = 2e3;
31948
+ for (;;) {
31949
+ const live = await read();
31950
+ const pending = [...applied].filter(([, isApplied]) => !isApplied(live));
31951
+ if (pending.length === 0) return;
31952
+ if (Date.now() - startTime + delay >= capMs) {
31953
+ const keys = pending.map(([key]) => key).join(", ");
31954
+ this.logger.warn(safeMsg`${logicalId}: the new ${keys} did not read back when cdkd stopped waiting; AWS accepted the change, so cdkd drift may report the old value as the baseline. Once it applies, run cdkd drift --accept.`);
31955
+ return;
31956
+ }
31957
+ await this.sleep(delay);
31958
+ delay = Math.min(delay * 2, 1e4);
31959
+ }
31960
+ }
31382
31961
  async describeDBCluster(dbClusterIdentifier) {
31383
31962
  return (await this.getClient().send(new DescribeDBClustersCommand$1({ DBClusterIdentifier: dbClusterIdentifier }))).DBClusters?.[0];
31384
31963
  }
@@ -31567,6 +32146,60 @@ var DocDBProvider = class {
31567
32146
  sleep(ms) {
31568
32147
  return new Promise((resolve) => setTimeout(resolve, ms));
31569
32148
  }
32149
+ getDriftUnknownPaths(resourceType) {
32150
+ if (resourceType === "AWS::DocDB::DBCluster") return [
32151
+ "AvailabilityZones",
32152
+ "MasterUserSecretKmsKeyId",
32153
+ "RotateMasterUserPassword"
32154
+ ];
32155
+ if (resourceType === "AWS::DocDB::DBInstance") return ["CertificateRotationRestart"];
32156
+ return [];
32157
+ }
32158
+ getDriftUnorderedPaths(resourceType) {
32159
+ return resourceType === "AWS::DocDB::DBCluster" ? ["EnableCloudwatchLogsExports"] : [];
32160
+ }
32161
+ canonicalizeDriftProperties(resourceType, properties) {
32162
+ if (resourceType !== "AWS::DocDB::DBCluster") return properties;
32163
+ const out = { ...properties };
32164
+ const logs = out["EnableCloudwatchLogsExports"];
32165
+ if (Array.isArray(logs) && docdbStringList(logs) !== void 0) out["EnableCloudwatchLogsExports"] = [...new Set(logs)];
32166
+ const scaling = docdbServerlessScaling(out["ServerlessV2ScalingConfiguration"]);
32167
+ if (scaling != null) out["ServerlessV2ScalingConfiguration"] = scaling;
32168
+ return out;
32169
+ }
32170
+ canonicalizeUnsettledProperties(resourceType, properties) {
32171
+ return this.canonicalizeDriftProperties(resourceType, properties);
32172
+ }
32173
+ async readUnsettled(physicalId, logicalId, resourceType, names, recordedProperties, desiredProperties, attemptedItems) {
32174
+ const live = await this.readCurrentState(physicalId, logicalId, resourceType);
32175
+ if (resourceType !== "AWS::DocDB::DBCluster") return live;
32176
+ if (live === void 0 || live === RESOURCE_NOT_FOUND) return live;
32177
+ if (!names.has("EnableCloudwatchLogsExports")) return live;
32178
+ const key = "EnableCloudwatchLogsExports";
32179
+ const named = /* @__PURE__ */ new Set([
32180
+ ...docdbStringList(recordedProperties?.[key]) ?? [],
32181
+ ...docdbStringList(desiredProperties?.[key]) ?? [],
32182
+ ...[...attemptedItems?.get(key) ?? []].filter(isUsableAttemptedName)
32183
+ ]);
32184
+ return {
32185
+ ...live,
32186
+ [key]: (live[key] ?? []).filter((type) => named.has(type))
32187
+ };
32188
+ }
32189
+ async unsettledInTransition(physicalId, _logicalId, resourceType, names, _recordedProperties, desiredProperties) {
32190
+ if (desiredProperties !== void 0) return /* @__PURE__ */ new Set();
32191
+ const unmoving = (status) => isProceedDbStatus(status) || status === "backing-up";
32192
+ try {
32193
+ if (resourceType === "AWS::DocDB::DBCluster") return unmoving((await this.describeDBCluster(physicalId))?.Status) ? /* @__PURE__ */ new Set() : names;
32194
+ if (resourceType === "AWS::DocDB::DBInstance") {
32195
+ const instance = await this.describeDBInstance(physicalId);
32196
+ return unmoving(instance?.DBInstanceStatus) && !holdsDocDBPendingValue(instance?.PendingModifiedValues) ? /* @__PURE__ */ new Set() : names;
32197
+ }
32198
+ return /* @__PURE__ */ new Set();
32199
+ } catch {
32200
+ return names;
32201
+ }
32202
+ }
31570
32203
  async import(input) {
31571
32204
  switch (input.resourceType) {
31572
32205
  case "AWS::DocDB::DBInstance": return this.importDBInstance(input);
@@ -31598,6 +32231,8 @@ var DocDBProvider = class {
31598
32231
  if (inst.AvailabilityZone !== void 0) result["AvailabilityZone"] = inst.AvailabilityZone;
31599
32232
  if (inst.PreferredMaintenanceWindow !== void 0) result["PreferredMaintenanceWindow"] = inst.PreferredMaintenanceWindow;
31600
32233
  if (inst.AutoMinorVersionUpgrade !== void 0) result["AutoMinorVersionUpgrade"] = inst.AutoMinorVersionUpgrade;
32234
+ if (inst.CACertificateIdentifier !== void 0) result["CACertificateIdentifier"] = inst.CACertificateIdentifier;
32235
+ result["EnablePerformanceInsights"] = inst.PerformanceInsightsEnabled ?? false;
31601
32236
  if (inst.DBInstanceArn) await attachDocDBTags(this.getClient(), this.logger, result, inst.DBInstanceArn);
31602
32237
  return result;
31603
32238
  }
@@ -31625,6 +32260,16 @@ var DocDBProvider = class {
31625
32260
  if (cluster.PreferredMaintenanceWindow !== void 0) result["PreferredMaintenanceWindow"] = cluster.PreferredMaintenanceWindow;
31626
32261
  if (cluster.DBClusterParameterGroup !== void 0) result["DBClusterParameterGroupName"] = cluster.DBClusterParameterGroup;
31627
32262
  if (cluster.DeletionProtection !== void 0) result["DeletionProtection"] = cluster.DeletionProtection;
32263
+ result["CopyTagsToSnapshot"] = cluster.CopyTagsToSnapshot ?? false;
32264
+ result["ManageMasterUserPassword"] = cluster.MasterUserSecret !== void 0;
32265
+ result["StorageType"] = cluster.StorageType ?? DOCDB_DEFAULT_STORAGE_TYPE;
32266
+ result["EnableCloudwatchLogsExports"] = cluster.EnabledCloudwatchLogsExports ?? [];
32267
+ if (cluster.NetworkType !== void 0) result["NetworkType"] = cluster.NetworkType;
32268
+ const { MinCapacity: min, MaxCapacity: max } = cluster.ServerlessV2ScalingConfiguration ?? {};
32269
+ if (min !== void 0 && max !== void 0) result["ServerlessV2ScalingConfiguration"] = {
32270
+ MinCapacity: min,
32271
+ MaxCapacity: max
32272
+ };
31628
32273
  if (cluster.DBClusterArn) await attachDocDBTags(this.getClient(), this.logger, result, cluster.DBClusterArn);
31629
32274
  return result;
31630
32275
  }
@@ -33338,14 +33983,14 @@ var WAFv2WebACLProvider = class {
33338
33983
  }));
33339
33984
  const tagsToRemove = plan.remove;
33340
33985
  if (tagsToRemove.length > 0) {
33341
- await this.getClient().send(new UntagResourceCommand$16({
33986
+ await this.getClient().send(new UntagResourceCommand$17({
33342
33987
  ResourceARN: arn,
33343
33988
  TagKeys: tagsToRemove
33344
33989
  }));
33345
33990
  this.logger.debug(`Removed ${tagsToRemove.length} tag(s) from WAFv2 WebACL ${arn}`);
33346
33991
  }
33347
33992
  if (tagsToAdd.length > 0) {
33348
- await this.getClient().send(new TagResourceCommand$16({
33993
+ await this.getClient().send(new TagResourceCommand$17({
33349
33994
  ResourceARN: arn,
33350
33995
  Tags: tagsToAdd
33351
33996
  }));
@@ -33384,7 +34029,7 @@ var WAFv2WebACLProvider = class {
33384
34029
  if (webACL.ApplicationConfig) result["ApplicationConfig"] = webACL.ApplicationConfig;
33385
34030
  if (webACL.MonetizationConfig) result["MonetizationConfig"] = webACL.MonetizationConfig;
33386
34031
  try {
33387
- const tagsResp = await this.getClient().send(new ListTagsForResourceCommand$13({ ResourceARN: physicalId }));
34032
+ const tagsResp = await this.getClient().send(new ListTagsForResourceCommand$14({ ResourceARN: physicalId }));
33388
34033
  result["Tags"] = normalizeAwsTagsToCfn(tagsResp.TagInfoForResource?.TagList);
33389
34034
  } catch (err) {
33390
34035
  this.logger.debug(`WAFv2 ListTagsForResource(${physicalId}) failed: ${describeAwsFailure(err).detail}`);
@@ -33446,6 +34091,7 @@ function userPoolDeletionProtectionUpdate(physicalId, pool, value, opts = {}) {
33446
34091
  if (acr === void 0) delete input.AcrConfiguration;
33447
34092
  else input.AcrConfiguration = acr;
33448
34093
  if (echoesDeveloperEmail(pool) && opts.withoutDeveloperEmail !== true) input.EmailConfiguration = pool.EmailConfiguration;
34094
+ if (echoesCustomerManagedKey(pool)) input.KeyConfiguration = pool.KeyConfiguration;
33449
34095
  input.DeletionProtection = value;
33450
34096
  return input;
33451
34097
  }
@@ -33471,6 +34117,19 @@ function reportKind(record) {
33471
34117
  function echoesDeveloperEmail(pool) {
33472
34118
  return pool.EmailConfiguration?.EmailSendingAccount === "DEVELOPER";
33473
34119
  }
34120
+ function echoesCustomerManagedKey(pool) {
34121
+ return pool.KeyConfiguration?.KeyType === "CUSTOMER_MANAGED_KEY";
34122
+ }
34123
+ function bareFlipResets(pool) {
34124
+ const reset = [
34125
+ "self sign-up",
34126
+ "Lambda triggers",
34127
+ "advanced security"
34128
+ ];
34129
+ if (echoesDeveloperEmail(pool)) reset.push("SES email configuration");
34130
+ if (echoesCustomerManagedKey(pool)) reset.push("customer-managed key");
34131
+ return `${reset.slice(0, -1).join(", ")} and ${reset[reset.length - 1]}`;
34132
+ }
33474
34133
  const REFUSED_ECHO_ERRORS = /* @__PURE__ */ new Set([
33475
34134
  "InvalidParameterException",
33476
34135
  "InvalidSmsRoleAccessPolicyException",
@@ -33553,12 +34212,13 @@ const KEPT_ON_REMOVAL_MEMBERS = {
33553
34212
  AccountRecoverySetting: void 0,
33554
34213
  SmsConfiguration: void 0,
33555
34214
  UserPoolTier: "ESSENTIALS",
33556
- DeletionProtection: "INACTIVE"
34215
+ DeletionProtection: "INACTIVE",
34216
+ IssuerConfiguration: { Type: "ORIGINAL" }
33557
34217
  };
33558
34218
  function declaresMember(value, unset) {
33559
34219
  if (value === void 0 || value === null || value === "") return false;
33560
34220
  if (isEmptyObjectPlaceholder(value)) return false;
33561
- return unset === void 0 || value !== unset;
34221
+ return unset === void 0 || !isDeepStrictEqual(value, unset);
33562
34222
  }
33563
34223
  function sendsKeptMember(member, value) {
33564
34224
  if (!value) return false;
@@ -33763,6 +34423,8 @@ var CognitoUserPoolProvider = class {
33763
34423
  "SmsAuthenticationMessage",
33764
34424
  "SmsVerificationMessage",
33765
34425
  "UserPoolTier",
34426
+ "KeyConfiguration",
34427
+ "IssuerConfiguration",
33766
34428
  "EnabledMfas",
33767
34429
  "EmailAuthenticationMessage",
33768
34430
  "EmailAuthenticationSubject",
@@ -33844,6 +34506,8 @@ var CognitoUserPoolProvider = class {
33844
34506
  if (properties["SmsAuthenticationMessage"]) createParams.SmsAuthenticationMessage = properties["SmsAuthenticationMessage"];
33845
34507
  if (properties["SmsVerificationMessage"]) createParams.SmsVerificationMessage = properties["SmsVerificationMessage"];
33846
34508
  if (properties["UserPoolTier"]) createParams.UserPoolTier = properties["UserPoolTier"];
34509
+ if (properties["KeyConfiguration"]) createParams.KeyConfiguration = properties["KeyConfiguration"];
34510
+ if (properties["IssuerConfiguration"]) createParams.IssuerConfiguration = properties["IssuerConfiguration"];
33847
34511
  const orphanWindow = createUserPoolLatch.take(logicalId);
33848
34512
  if (orphanWindow !== void 0) await this.reportPossibleOrphanPools(logicalId, poolName, orphanWindow, createMaskedLogSinks(this.logger, context?.maskSecrets));
33849
34513
  let created;
@@ -34104,6 +34768,8 @@ var CognitoUserPoolProvider = class {
34104
34768
  if (properties["SmsAuthenticationMessage"] !== void 0) updateParams.SmsAuthenticationMessage = properties["SmsAuthenticationMessage"];
34105
34769
  if (properties["SmsVerificationMessage"] !== void 0) updateParams.SmsVerificationMessage = properties["SmsVerificationMessage"];
34106
34770
  if (properties["UserPoolTier"]) updateParams.UserPoolTier = properties["UserPoolTier"];
34771
+ if (properties["KeyConfiguration"]) updateParams.KeyConfiguration = properties["KeyConfiguration"];
34772
+ if (properties["IssuerConfiguration"]) updateParams.IssuerConfiguration = properties["IssuerConfiguration"];
34107
34773
  const mfaOptions = {
34108
34774
  ...liveMfa?.value !== void 0 ? { liveMfaConfiguration: liveMfa.value } : {},
34109
34775
  ...liveMfa?.failed === true ? { liveReadFailed: true } : {},
@@ -34163,7 +34829,7 @@ var CognitoUserPoolProvider = class {
34163
34829
  this.logger.warn(safeMsg`Cognito User Pool ${logicalId} (${physicalId}): the template no longer declares ` + safeMsg`${removed.length} UserPoolTags key(s), but DescribeUserPool returned no ARN to ` + safeMsg`untag them with, so they stay on the pool. Remove them with ` + safeMsg`aws cognito-idp untag-resource.`);
34164
34830
  return;
34165
34831
  }
34166
- await this.getClient().send(new UntagResourceCommand$17({
34832
+ await this.getClient().send(new UntagResourceCommand$18({
34167
34833
  ResourceArn: poolArn,
34168
34834
  TagKeys: removed
34169
34835
  }));
@@ -34211,7 +34877,7 @@ var CognitoUserPoolProvider = class {
34211
34877
  before: "aws cognito-idp update-user-pool --user-pool-id",
34212
34878
  identifier: physicalId,
34213
34879
  after: "--deletion-protection INACTIVE",
34214
- caveat: "Note UpdateUserPool resets some members a call omits (self sign-up, Lambda triggers, advanced security and AutoVerifiedAttributes among them), so send your complete pool configuration alongside that flag rather than the flag alone."
34880
+ caveat: "Note UpdateUserPool resets some members a call omits (self sign-up, Lambda triggers, advanced security, AutoVerifiedAttributes and a customer-managed KeyConfiguration among them), so send your complete pool configuration alongside that flag rather than the flag alone."
34215
34881
  }
34216
34882
  }) : `AWS::Cognito::UserPool is a stateful type, so re-run with ${replaceFlags} to recreate it (this deletes all users in the pool).`;
34217
34883
  }
@@ -34236,16 +34902,16 @@ var CognitoUserPoolProvider = class {
34236
34902
  try {
34237
34903
  pool = (await this.getClient().send(new DescribeUserPoolCommand({ UserPoolId: physicalId }))).UserPool;
34238
34904
  } catch (readError) {
34239
- if (bareFlip) this.reportSettingsResetByBareFlip(physicalId, bareFlip.pool, reportKind(bareFlip));
34905
+ if (bareFlip) this.reportSettingsResetByBareFlip(physicalId, bareFlip.pool, reportKind(bareFlip), maskerOrIdentity(context?.maskSecrets));
34240
34906
  throw readError;
34241
34907
  }
34242
34908
  if (!pool) {
34243
- if (bareFlip) this.reportSettingsResetByBareFlip(physicalId, bareFlip.pool, reportKind(bareFlip));
34909
+ if (bareFlip) this.reportSettingsResetByBareFlip(physicalId, bareFlip.pool, reportKind(bareFlip), maskerOrIdentity(context?.maskSecrets));
34244
34910
  throw new Error(`DescribeUserPool returned no pool for ${physicalId}`);
34245
34911
  }
34246
34912
  if (bareFlip && pool.DeletionProtection !== "ACTIVE") bareFlip.ambiguous = false;
34247
34913
  const resetConfirmed = bareFlip !== void 0 && !bareFlip.ambiguous;
34248
- if (bareFlip) this.reportSettingsResetByBareFlip(physicalId, bareFlip.pool, reportKind(bareFlip));
34914
+ if (bareFlip) this.reportSettingsResetByBareFlip(physicalId, bareFlip.pool, reportKind(bareFlip), maskerOrIdentity(context?.maskSecrets));
34249
34915
  if (flipRecord && this.emailOmittedFlips.has(flipRecord) && !echoesDeveloperEmail(pool) && !(bareFlip && echoesDeveloperEmail(bareFlip.pool))) this.logger.error(safeMsg`Cognito User Pool ${physicalId} is LIVE with its SES email configuration reset: ` + safeMsg`--remove-protection turned DeletionProtection off with an UpdateUserPool that left ` + safeMsg`out its DEVELOPER EmailConfiguration (sending it was refused), and the delete then ` + safeMsg`failed. The pool's email configuration was ${EMAIL_RESET_CLAUSE}`);
34250
34916
  const bareLicensed = resetConfirmed && bareFlip.echoedSince !== true;
34251
34917
  const readOn = pool.DeletionProtection === "ACTIVE";
@@ -34278,7 +34944,7 @@ var CognitoUserPoolProvider = class {
34278
34944
  }
34279
34945
  });
34280
34946
  }
34281
- reportSettingsResetByBareFlip(physicalId, before, kind) {
34947
+ reportSettingsResetByBareFlip(physicalId, before, kind, mask) {
34282
34948
  const held = [];
34283
34949
  const adminOnly = before.AdminCreateUserConfig?.AllowAdminCreateUserOnly;
34284
34950
  if (adminOnly !== void 0) held.push(`AllowAdminCreateUserOnly=${String(adminOnly)}`);
@@ -34292,10 +34958,11 @@ var CognitoUserPoolProvider = class {
34292
34958
  const mode = before.UserPoolAddOns?.AdvancedSecurityMode;
34293
34959
  if (mode) held.push(`AdvancedSecurityMode=${mode}`);
34294
34960
  if (echoesDeveloperEmail(before)) held.push("EmailConfiguration.EmailSendingAccount=DEVELOPER (SES)");
34295
- const heldText = held.length > 0 ? held.join(", ") : "none of these settings";
34296
- const what = echoesDeveloperEmail(before) ? "self sign-up, Lambda triggers, advanced security and SES email configuration" : "self sign-up, Lambda triggers and advanced security";
34961
+ if (echoesCustomerManagedKey(before)) held.push(`KeyConfiguration.KmsKeyArn=${String(before.KeyConfiguration?.KmsKeyArn)}`);
34962
+ const heldText = held.length > 0 ? held.map((entry) => mask(entry)).join(", ") : "none of these settings";
34963
+ const what = bareFlipResets(before);
34297
34964
  const state = kind === "unclear" ? safeMsg`is LIVE and its ${what} MAY have been reset: ` + safeMsg`--remove-protection sent UpdateUserPool with DeletionProtection alone (the pool's own ` + safeMsg`configuration was refused) and got no clear answer, and the delete then failed. Check it ` + safeMsg`with aws cognito-idp describe-user-pool.` : kind === "earlier" ? safeMsg`is LIVE; its ${what} were reset by an ` + safeMsg`earlier UpdateUserPool that --remove-protection sent with DeletionProtection alone (the ` + safeMsg`pool's own configuration was refused); they may have been restored since. Check it with ` + safeMsg`aws cognito-idp describe-user-pool.` : safeMsg`is LIVE with its ${what} reset: ` + safeMsg`--remove-protection had to turn DeletionProtection off with UpdateUserPool alone (the ` + safeMsg`pool's own configuration was refused), and the delete then failed.`;
34298
- this.logger.error(safeMsg`Cognito User Pool ${physicalId} ` + state + safeMsg` Before that write the pool held: ${heldText}. Put them back with ` + safeMsg`aws cognito-idp update-user-pool, sending the pool's complete configuration -- a ` + safeMsg`cdkd deploy will NOT restore them, because its recorded properties still match the template.`);
34965
+ this.logger.error(mask(safeMsg`Cognito User Pool ${physicalId} ` + state + safeMsg` Before that write the pool held: ${heldText}. Put them back with ` + safeMsg`aws cognito-idp update-user-pool, sending the pool's complete configuration -- a ` + safeMsg`cdkd deploy will NOT restore them, because its recorded properties still match the template.`));
34299
34966
  }
34300
34967
  async deleteOnce(logicalId, physicalId, resourceType, context, flip) {
34301
34968
  this.logger.debug(`Deleting Cognito User Pool ${logicalId}: ${physicalId}`);
@@ -34397,7 +35064,7 @@ var CognitoUserPoolProvider = class {
34397
35064
  if (observedOn && isAmbiguousWriteFailure(echoError)) flip.flippedOffByThisRun = true;
34398
35065
  if (isTransientCognitoFailure(echoError)) throw echoError;
34399
35066
  if (!isRefusedEcho(echoError)) {
34400
- this.warnGuardLeftOn(physicalId, mask, echoError);
35067
+ this.warnGuardLeftOn(physicalId, pool, mask, echoError);
34401
35068
  throw echoError;
34402
35069
  }
34403
35070
  try {
@@ -34415,10 +35082,10 @@ var CognitoUserPoolProvider = class {
34415
35082
  });
34416
35083
  }
34417
35084
  if (isTransientCognitoFailure(bareError)) {
34418
- if (isAmbiguousWriteFailure(bareError)) this.logger.warn(safeMsg`Cognito User Pool ${physicalId}: UpdateUserPool with DeletionProtection alone ` + safeMsg`(the pool's own configuration was refused) answered ${mask(describeAwsFailure(bareError).summary)}; ` + safeMsg`if that write landed, the pool's self sign-up, Lambda triggers and advanced ` + safeMsg`security were reset. Retrying the delete.`);
35085
+ if (isAmbiguousWriteFailure(bareError)) this.logger.warn(safeMsg`Cognito User Pool ${physicalId}: UpdateUserPool with DeletionProtection alone ` + safeMsg`(the pool's own configuration was refused) answered ${mask(describeAwsFailure(bareError).summary)}; ` + safeMsg`if that write landed, the pool's ${bareFlipResets(pool)} were reset. Retrying the delete.`);
34419
35086
  throw bareError;
34420
35087
  }
34421
- this.warnGuardLeftOn(physicalId, mask, bareError, echoError);
35088
+ this.warnGuardLeftOn(physicalId, pool, mask, bareError, echoError);
34422
35089
  throw bareError;
34423
35090
  }
34424
35091
  const kept = this.preFlipPools.get(flip);
@@ -34431,16 +35098,16 @@ var CognitoUserPoolProvider = class {
34431
35098
  kept.echoedSince = false;
34432
35099
  }
34433
35100
  this.logger.debug(mask(safeMsg`UpdateUserPool refused the echoed configuration of ${mask(physicalId)}: ${mask(describeAwsFailure(echoError).detail)}`));
34434
- this.logger.warn(safeMsg`Cognito User Pool ${physicalId}: UpdateUserPool refused the pool's own configuration ` + safeMsg`echoed back (${mask(describeAwsFailure(echoError).summary)}), so DeletionProtection was ` + safeMsg`turned off alone. That write resets the settings it omits -- self sign-up, Lambda ` + safeMsg`triggers and advanced security among them -- which stays that way if the delete fails.`);
35101
+ this.logger.warn(safeMsg`Cognito User Pool ${physicalId}: UpdateUserPool refused the pool's own configuration ` + safeMsg`echoed back (${mask(describeAwsFailure(echoError).summary)}), so DeletionProtection was ` + safeMsg`turned off alone. That write resets the settings it omits -- ${bareFlipResets(pool)} ` + safeMsg`among them -- which stays that way if the delete fails.`);
34435
35102
  }
34436
35103
  }
34437
- warnGuardLeftOn(physicalId, mask, error, echoError) {
35104
+ warnGuardLeftOn(physicalId, pool, mask, error, echoError) {
34438
35105
  const name = typeof error === "object" && error !== null ? safeStringify(error.name) : "";
34439
35106
  const accessHint = /AccessDenied|NotAuthorized|Unauthorized/.test(name) ? " The caller needs cognito-idp:UpdateUserPool." : "";
34440
35107
  const echoClause = echoError === void 0 ? "" : safeMsg`; the pool's own settings sent back were refused first (${mask(describeAwsFailure(echoError).summary)})`;
34441
35108
  this.logger.debug(mask(safeMsg`UpdateUserPool did not turn DeletionProtection off on ${mask(physicalId)}: ${mask(describeAwsFailure(error).detail)}`));
34442
35109
  const refused = error instanceof Error && isAwsAuthoredFailure(error);
34443
- this.logger.warn(refused ? safeMsg`Cognito User Pool ${physicalId}: DeletionProtection was left on, because UpdateUserPool ` + safeMsg`refused to turn it off (${mask(describeAwsFailure(error).summary)})` + echoClause + safeMsg`. The delete will be refused while it is on.${accessHint}` : safeMsg`Cognito User Pool ${physicalId}: UpdateUserPool failed without an answer from AWS ` + safeMsg`(${mask(describeAwsFailure(error).summary)})` + echoClause + (echoError === void 0 ? typeof error === "object" && error !== null && sentWithoutEmail.has(error) ? safeMsg`, so whether DeletionProtection was turned off is unknown. Its other settings were ` + safeMsg`not reset, except the SES EmailConfiguration, which that write omitted: if it ` + safeMsg`landed, the pool's email configuration was ${EMAIL_RESET_BEFORE_DELETE_CLAUSE}` : safeMsg`, so whether DeletionProtection was turned off is unknown. Its other settings were ` + safeMsg`not reset.` : safeMsg`, so whether DeletionProtection was turned off ALONE is unknown; if it was, the ` + safeMsg`pool's self sign-up, Lambda triggers and advanced security were reset.`) + safeMsg` If the delete then fails, cdkd turns the guard back on. Check the pool with ` + safeMsg`aws cognito-idp describe-user-pool.`);
35110
+ this.logger.warn(refused ? safeMsg`Cognito User Pool ${physicalId}: DeletionProtection was left on, because UpdateUserPool ` + safeMsg`refused to turn it off (${mask(describeAwsFailure(error).summary)})` + echoClause + safeMsg`. The delete will be refused while it is on.${accessHint}` : safeMsg`Cognito User Pool ${physicalId}: UpdateUserPool failed without an answer from AWS ` + safeMsg`(${mask(describeAwsFailure(error).summary)})` + echoClause + (echoError === void 0 ? typeof error === "object" && error !== null && sentWithoutEmail.has(error) ? safeMsg`, so whether DeletionProtection was turned off is unknown. Its other settings were ` + safeMsg`not reset, except the SES EmailConfiguration, which that write omitted: if it ` + safeMsg`landed, the pool's email configuration was ${EMAIL_RESET_BEFORE_DELETE_CLAUSE}` : safeMsg`, so whether DeletionProtection was turned off is unknown. Its other settings were ` + safeMsg`not reset.` : safeMsg`, so whether DeletionProtection was turned off ALONE is unknown; if it was, the ` + safeMsg`pool's ${bareFlipResets(pool)} were reset.`) + safeMsg` If the delete then fails, cdkd turns the guard back on. Check the pool with ` + safeMsg`aws cognito-idp describe-user-pool.`);
34444
35111
  }
34445
35112
  async readCurrentState(physicalId, _logicalId, resourceType) {
34446
35113
  if (resourceType !== "AWS::Cognito::UserPool") return void 0;
@@ -34482,6 +35149,8 @@ var CognitoUserPoolProvider = class {
34482
35149
  }
34483
35150
  result["UserPoolTags"] = userTags;
34484
35151
  result["UserPoolTier"] = pool.UserPoolTier ?? "ESSENTIALS";
35152
+ if (pool.KeyConfiguration) result["KeyConfiguration"] = pool.KeyConfiguration;
35153
+ if (pool.IssuerConfiguration) result["IssuerConfiguration"] = pool.IssuerConfiguration;
34485
35154
  try {
34486
35155
  const mfa = await this.getClient().send(new GetUserPoolMfaConfigCommand({ UserPoolId: physicalId }));
34487
35156
  const enabledMfas = [];
@@ -35753,11 +36422,11 @@ var ServiceDiscoveryProvider = class ServiceDiscoveryProvider {
35753
36422
  if (hasTagChange) {
35754
36423
  const arn = knownArn ?? (await client.send(new GetServiceCommand({ Id: physicalId }))).Service?.Arn;
35755
36424
  if (!arn) throw new ProvisioningError(safeMsg`Could not resolve the ARN of service discovery service ${logicalId}; its Tags were not updated`, resourceType, logicalId, physicalId);
35756
- if (tagPlan.remove.length > 0) await client.send(new UntagResourceCommand$18({
36425
+ if (tagPlan.remove.length > 0) await client.send(new UntagResourceCommand$19({
35757
36426
  ResourceARN: arn,
35758
36427
  TagKeys: tagPlan.remove
35759
36428
  }));
35760
- if (tagPlan.set.size > 0) await client.send(new TagResourceCommand$17({
36429
+ if (tagPlan.set.size > 0) await client.send(new TagResourceCommand$18({
35761
36430
  ResourceARN: arn,
35762
36431
  Tags: [...tagPlan.set].map(([Key, Value]) => ({
35763
36432
  Key,
@@ -35873,11 +36542,11 @@ var ServiceDiscoveryProvider = class ServiceDiscoveryProvider {
35873
36542
  const hasAdds = tagsToAdd.length > 0;
35874
36543
  if (removedKeys.length === 0 && !hasAdds) return;
35875
36544
  const arn = await this.resolveNamespaceArn(physicalId);
35876
- if (removedKeys.length > 0) await this.getClient().send(new UntagResourceCommand$18({
36545
+ if (removedKeys.length > 0) await this.getClient().send(new UntagResourceCommand$19({
35877
36546
  ResourceARN: arn,
35878
36547
  TagKeys: removedKeys
35879
36548
  }));
35880
- if (hasAdds) await this.getClient().send(new TagResourceCommand$17({
36549
+ if (hasAdds) await this.getClient().send(new TagResourceCommand$18({
35881
36550
  ResourceARN: arn,
35882
36551
  Tags: tagsToAdd
35883
36552
  }));
@@ -36050,7 +36719,7 @@ var ServiceDiscoveryProvider = class ServiceDiscoveryProvider {
36050
36719
  }
36051
36720
  async attachTags(result, arn) {
36052
36721
  try {
36053
- const tagsResp = await this.getClient().send(new ListTagsForResourceCommand$14({ ResourceARN: arn }));
36722
+ const tagsResp = await this.getClient().send(new ListTagsForResourceCommand$15({ ResourceARN: arn }));
36054
36723
  result["Tags"] = normalizeAwsTagsToCfn(tagsResp.Tags);
36055
36724
  } catch (err) {
36056
36725
  this.logger.debug(`ServiceDiscovery ListTagsForResource(${arn}) failed: ${describeAwsFailure(err).detail}`);
@@ -36642,7 +37311,7 @@ var AppSyncProvider = class {
36642
37311
  const tagKeysToRemove = plan.remove;
36643
37312
  const tagsToAdd = Object.fromEntries(plan.set);
36644
37313
  if (tagKeysToRemove.length > 0) try {
36645
- await this.getClient().send(new UntagResourceCommand$19({
37314
+ await this.getClient().send(new UntagResourceCommand$20({
36646
37315
  resourceArn: arn,
36647
37316
  tagKeys: tagKeysToRemove
36648
37317
  }));
@@ -36650,7 +37319,7 @@ var AppSyncProvider = class {
36650
37319
  throw this.wrapUpdateError(error, resourceType, logicalId, apiId, "GraphqlApi (untag)", mask);
36651
37320
  }
36652
37321
  if (Object.keys(tagsToAdd).length > 0) try {
36653
- await this.getClient().send(new TagResourceCommand$18({
37322
+ await this.getClient().send(new TagResourceCommand$19({
36654
37323
  resourceArn: arn,
36655
37324
  tags: tagsToAdd
36656
37325
  }));
@@ -39345,11 +40014,11 @@ async function applyGlueTagDiff(client, resourceArn, recorded, desired, resource
39345
40014
  if (toSet.size === 0 && plan.remove.length === 0) return;
39346
40015
  unsettled.beforeWrite();
39347
40016
  const arn = await resourceArn();
39348
- if (toSet.size > 0) await client.send(new TagResourceCommand$19({
40017
+ if (toSet.size > 0) await client.send(new TagResourceCommand$20({
39349
40018
  ResourceArn: arn,
39350
40019
  TagsToAdd: Object.fromEntries(toSet)
39351
40020
  }));
39352
- if (plan.remove.length > 0) await client.send(new UntagResourceCommand$20({
40021
+ if (plan.remove.length > 0) await client.send(new UntagResourceCommand$21({
39353
40022
  ResourceArn: arn,
39354
40023
  TagsToRemove: plan.remove
39355
40024
  }));
@@ -41131,7 +41800,7 @@ var BudgetsBudgetProvider = class {
41131
41800
  const newTags = this.toSdkResourceTags(next.ResourceTags);
41132
41801
  if (prevTags.kind === "list") await this.reconcileResourceTags(accountId, physicalId, this.toSdkResourceTags(removableRecorded("ResourceTags", prevTags.items)), newTags);
41133
41802
  else {
41134
- if (newTags.length > 0) await this.getClient().send(new TagResourceCommand$20({
41803
+ if (newTags.length > 0) await this.getClient().send(new TagResourceCommand$21({
41135
41804
  ResourceARN: await this.budgetArn(accountId, physicalId),
41136
41805
  ResourceTags: newTags
41137
41806
  }));
@@ -41275,11 +41944,11 @@ var BudgetsBudgetProvider = class {
41275
41944
  const removedKeys = oldTags.map((t) => t.Key).filter((k) => {
41276
41945
  return typeof k === "string" && !newKeys.has(k);
41277
41946
  });
41278
- if (removedKeys.length > 0) await this.getClient().send(new UntagResourceCommand$21({
41947
+ if (removedKeys.length > 0) await this.getClient().send(new UntagResourceCommand$22({
41279
41948
  ResourceARN: arn,
41280
41949
  ResourceTagKeys: removedKeys
41281
41950
  }));
41282
- if (newTags.length > 0) await this.getClient().send(new TagResourceCommand$20({
41951
+ if (newTags.length > 0) await this.getClient().send(new TagResourceCommand$21({
41283
41952
  ResourceARN: arn,
41284
41953
  ResourceTags: newTags
41285
41954
  }));
@@ -41359,7 +42028,7 @@ var BudgetsBudgetProvider = class {
41359
42028
  }));
41360
42029
  let tags;
41361
42030
  try {
41362
- tags = await client.send(new ListTagsForResourceCommand$15({ ResourceARN: await this.budgetArn(accountId, physicalId) }));
42031
+ tags = await client.send(new ListTagsForResourceCommand$16({ ResourceARN: await this.budgetArn(accountId, physicalId) }));
41363
42032
  } catch (error) {
41364
42033
  if (error instanceof NotFoundException$5 && await describe() === RESOURCE_NOT_FOUND) return RESOURCE_NOT_FOUND;
41365
42034
  throw error;
@@ -42337,7 +43006,7 @@ var KinesisStreamConsumerProvider = class {
42337
43006
  if (desc.ConsumerName !== void 0) result["ConsumerName"] = desc.ConsumerName;
42338
43007
  if (desc.StreamARN !== void 0) result["StreamARN"] = desc.StreamARN;
42339
43008
  try {
42340
- const tagsResp = await this.getClient().send(new ListTagsForResourceCommand$16({ ResourceARN: physicalId }));
43009
+ const tagsResp = await this.getClient().send(new ListTagsForResourceCommand$17({ ResourceARN: physicalId }));
42341
43010
  result["Tags"] = normalizeAwsTagsToCfn(tagsResp.Tags);
42342
43011
  } catch (err) {
42343
43012
  if (err instanceof ResourceNotFoundException$12) return RESOURCE_NOT_FOUND;
@@ -42354,14 +43023,14 @@ var KinesisStreamConsumerProvider = class {
42354
43023
  const tagsToAdd = Object.fromEntries(plan.set);
42355
43024
  const tagsToRemove = plan.remove;
42356
43025
  if (tagsToRemove.length > 0) {
42357
- await this.getClient().send(new UntagResourceCommand$22({
43026
+ await this.getClient().send(new UntagResourceCommand$23({
42358
43027
  ResourceARN: consumerArn,
42359
43028
  TagKeys: tagsToRemove
42360
43029
  }));
42361
43030
  this.logger.debug(mask(`Removed ${tagsToRemove.length} tag(s) from Kinesis stream consumer ${consumerArn}`));
42362
43031
  }
42363
43032
  if (Object.keys(tagsToAdd).length > 0) {
42364
- await this.getClient().send(new TagResourceCommand$21({
43033
+ await this.getClient().send(new TagResourceCommand$22({
42365
43034
  ResourceARN: consumerArn,
42366
43035
  Tags: tagsToAdd
42367
43036
  }));
@@ -43168,11 +43837,11 @@ var PipesPipeProvider = class {
43168
43837
  settled ??= await this.describe(physicalId);
43169
43838
  const arn = settled.Arn;
43170
43839
  if (!arn) throw new Error("DescribePipe returned no Arn, which tagging needs");
43171
- if (plan.remove.length > 0) await this.getClient().send(new UntagResourceCommand$23({
43840
+ if (plan.remove.length > 0) await this.getClient().send(new UntagResourceCommand$24({
43172
43841
  resourceArn: arn,
43173
43842
  tagKeys: plan.remove
43174
43843
  }));
43175
- if (plan.set.size > 0) await this.getClient().send(new TagResourceCommand$22({
43844
+ if (plan.set.size > 0) await this.getClient().send(new TagResourceCommand$23({
43176
43845
  resourceArn: arn,
43177
43846
  tags: Object.fromEntries(plan.set)
43178
43847
  }));
@@ -43599,11 +44268,11 @@ var EFSProvider = class {
43599
44268
  const plan = planTagDiff(recorded, desired);
43600
44269
  const warning = tagPlanWarning(plan, resourceType, logicalId);
43601
44270
  if (warning !== void 0) log.warn(warning);
43602
- if (plan.remove.length > 0) await this.retryOnTransientControlPlane(() => this.getClient().send(new UntagResourceCommand$24({
44271
+ if (plan.remove.length > 0) await this.retryOnTransientControlPlane(() => this.getClient().send(new UntagResourceCommand$25({
43603
44272
  ResourceId: resourceId,
43604
44273
  TagKeys: plan.remove
43605
44274
  })), `UntagResource ${resourceId}`, log);
43606
- if (plan.set.size > 0) await this.retryOnTransientControlPlane(() => this.getClient().send(new TagResourceCommand$23({
44275
+ if (plan.set.size > 0) await this.retryOnTransientControlPlane(() => this.getClient().send(new TagResourceCommand$24({
43607
44276
  ResourceId: resourceId,
43608
44277
  Tags: [...plan.set].map(([Key, Value]) => ({
43609
44278
  Key,
@@ -45191,11 +45860,11 @@ var FSxFileSystemProvider = class {
45191
45860
  Value
45192
45861
  }));
45193
45862
  const toRemove = plan.remove;
45194
- if (toSet.length > 0) await this.getClient().send(new TagResourceCommand$24({
45863
+ if (toSet.length > 0) await this.getClient().send(new TagResourceCommand$25({
45195
45864
  ResourceARN: arn,
45196
45865
  Tags: toSet
45197
45866
  }));
45198
- if (toRemove.length > 0) await this.getClient().send(new UntagResourceCommand$25({
45867
+ if (toRemove.length > 0) await this.getClient().send(new UntagResourceCommand$26({
45199
45868
  ResourceARN: arn,
45200
45869
  TagKeys: toRemove
45201
45870
  }));
@@ -47429,6 +48098,7 @@ var FirehoseProvider = class {
47429
48098
  "S3DestinationConfiguration",
47430
48099
  "ExtendedS3DestinationConfiguration",
47431
48100
  "KinesisStreamSourceConfiguration",
48101
+ "DirectPutSourceConfiguration",
47432
48102
  "Tags",
47433
48103
  "HttpEndpointDestinationConfiguration",
47434
48104
  "RedshiftDestinationConfiguration",
@@ -47481,6 +48151,7 @@ var FirehoseProvider = class {
47481
48151
  RoleARN: kinesisConfig["RoleArn"] || kinesisConfig["RoleARN"]
47482
48152
  };
47483
48153
  }
48154
+ if (properties["DirectPutSourceConfiguration"] !== void 0) input.DirectPutSourceConfiguration = { ThroughputHintInMBs: properties["DirectPutSourceConfiguration"]["ThroughputHintInMBs"] };
47484
48155
  if (properties["HttpEndpointDestinationConfiguration"]) {
47485
48156
  const httpConfig = properties["HttpEndpointDestinationConfiguration"];
47486
48157
  const endpointConfig = httpConfig["EndpointConfiguration"];
@@ -48267,6 +48938,8 @@ var FirehoseProvider = class {
48267
48938
  if (src.RoleARN !== void 0) srcOut["RoleARN"] = src.RoleARN;
48268
48939
  if (Object.keys(srcOut).length > 0) result["KinesisStreamSourceConfiguration"] = srcOut;
48269
48940
  }
48941
+ const directPut = desc.Source?.DirectPutSourceDescription;
48942
+ if (directPut?.ThroughputHintInMBs !== void 0) result["DirectPutSourceConfiguration"] = { ThroughputHintInMBs: directPut.ThroughputHintInMBs };
48270
48943
  const dest = desc.Destinations?.[0];
48271
48944
  if (dest?.ExtendedS3DestinationDescription) result["ExtendedS3DestinationConfiguration"] = mapExtendedS3DescriptionToCfn(dest.ExtendedS3DestinationDescription);
48272
48945
  else if (dest?.S3DestinationDescription) result["S3DestinationConfiguration"] = mapS3DescriptionToCfn(dest.S3DestinationDescription);
@@ -49786,11 +50459,11 @@ var CodeCommitRepositoryProvider = class {
49786
50459
  const repoArn = metadata?.Arn;
49787
50460
  if (repoArn) {
49788
50461
  const removedKeys = Object.keys(oldTagMap).filter((k) => !Object.hasOwn(newTagMap, k));
49789
- if (removedKeys.length > 0) await this.getClient().send(new UntagResourceCommand$26({
50462
+ if (removedKeys.length > 0) await this.getClient().send(new UntagResourceCommand$27({
49790
50463
  resourceArn: repoArn,
49791
50464
  tagKeys: removedKeys
49792
50465
  }));
49793
- if (Object.keys(newTagMap).length > 0) await this.getClient().send(new TagResourceCommand$25({
50466
+ if (Object.keys(newTagMap).length > 0) await this.getClient().send(new TagResourceCommand$26({
49794
50467
  resourceArn: repoArn,
49795
50468
  tags: newTagMap
49796
50469
  }));
@@ -49987,7 +50660,7 @@ var CodeCommitRepositoryProvider = class {
49987
50660
  if (!metadata) return void 0;
49988
50661
  let tags = [];
49989
50662
  if (metadata.Arn) try {
49990
- const tagsResp = await this.getClient().send(new ListTagsForResourceCommand$17({ resourceArn: metadata.Arn }));
50663
+ const tagsResp = await this.getClient().send(new ListTagsForResourceCommand$18({ resourceArn: metadata.Arn }));
49991
50664
  tags = normalizeAwsTagsToCfn(tagsResp.tags);
49992
50665
  } catch (err) {
49993
50666
  if (err instanceof RepositoryDoesNotExistException) return RESOURCE_NOT_FOUND;
@@ -50262,7 +50935,7 @@ var DLMLifecyclePolicyProvider = class {
50262
50935
  if (tagsChanged && arn) {
50263
50936
  const removedKeys = plan.remove;
50264
50937
  if (removedKeys.length > 0) {
50265
- await this.getClient().send(new UntagResourceCommand$27({
50938
+ await this.getClient().send(new UntagResourceCommand$28({
50266
50939
  ResourceArn: arn,
50267
50940
  TagKeys: removedKeys
50268
50941
  }));
@@ -50270,7 +50943,7 @@ var DLMLifecyclePolicyProvider = class {
50270
50943
  }
50271
50944
  const tagsToAdd = Object.fromEntries(plan.set);
50272
50945
  if (Object.keys(tagsToAdd).length > 0) {
50273
- await this.getClient().send(new TagResourceCommand$26({
50946
+ await this.getClient().send(new TagResourceCommand$27({
50274
50947
  ResourceArn: arn,
50275
50948
  Tags: tagsToAdd
50276
50949
  }));
@@ -50434,11 +51107,11 @@ var S3VectorsProvider = class {
50434
51107
  }
50435
51108
  if (!resourceArn) throw new ProvisioningError(`Could not resolve ARN for S3 VectorBucket ${logicalId} (${mask(physicalId)}); cannot apply tag update.`, resourceType, logicalId, physicalId);
50436
51109
  try {
50437
- if (Object.keys(toSet).length > 0) await this.getClient().send(new TagResourceCommand$27({
51110
+ if (Object.keys(toSet).length > 0) await this.getClient().send(new TagResourceCommand$28({
50438
51111
  resourceArn,
50439
51112
  tags: toSet
50440
51113
  }));
50441
- if (toRemove.length > 0) await this.getClient().send(new UntagResourceCommand$28({
51114
+ if (toRemove.length > 0) await this.getClient().send(new UntagResourceCommand$29({
50442
51115
  resourceArn,
50443
51116
  tagKeys: toRemove
50444
51117
  }));
@@ -50540,7 +51213,7 @@ var S3VectorsProvider = class {
50540
51213
  if (Object.keys(enc).length > 0) result["EncryptionConfiguration"] = enc;
50541
51214
  }
50542
51215
  if (bucket?.vectorBucketArn) try {
50543
- const tagsResp = await this.getClient().send(new ListTagsForResourceCommand$18({ resourceArn: bucket.vectorBucketArn }));
51216
+ const tagsResp = await this.getClient().send(new ListTagsForResourceCommand$19({ resourceArn: bucket.vectorBucketArn }));
50544
51217
  result["Tags"] = normalizeAwsTagsToCfn(tagsResp.tags);
50545
51218
  } catch (err) {
50546
51219
  this.logger.debug(`S3Vectors ListTagsForResource(${bucket.vectorBucketArn}) failed: ${describeAwsFailure(err).detail}`);
@@ -51218,7 +51891,7 @@ var S3DirectoryBucketProvider = class {
51218
51891
  const resourceArn = await this.buildBucketArn(physicalId, accountId);
51219
51892
  if (removedKeys.length > 0) {
51220
51893
  context?.markUnsettled?.("Tags");
51221
- await this.getS3ControlClient().send(new UntagResourceCommand$29({
51894
+ await this.getS3ControlClient().send(new UntagResourceCommand$13({
51222
51895
  AccountId: accountId,
51223
51896
  ResourceArn: resourceArn,
51224
51897
  TagKeys: removedKeys
@@ -51226,7 +51899,7 @@ var S3DirectoryBucketProvider = class {
51226
51899
  }
51227
51900
  if (tagsToApply.length > 0) {
51228
51901
  context?.markUnsettled?.("Tags");
51229
- await this.getS3ControlClient().send(new TagResourceCommand$28({
51902
+ await this.getS3ControlClient().send(new TagResourceCommand$13({
51230
51903
  AccountId: accountId,
51231
51904
  ResourceArn: resourceArn,
51232
51905
  Tags: tagsToApply
@@ -51381,7 +52054,7 @@ var S3DirectoryBucketProvider = class {
51381
52054
  async readTags(bucketName) {
51382
52055
  const accountId = await this.getAccountId();
51383
52056
  const resourceArn = await this.buildBucketArn(bucketName, accountId);
51384
- const resp = await this.getS3ControlClient().send(new ListTagsForResourceCommand$19({
52057
+ const resp = await this.getS3ControlClient().send(new ListTagsForResourceCommand$11({
51385
52058
  AccountId: accountId,
51386
52059
  ResourceArn: resourceArn
51387
52060
  }));
@@ -53734,4 +54407,4 @@ var ACMCertificateProvider = class {
53734
54407
 
53735
54408
  //#endregion
53736
54409
  export { ACMCertificateProvider, ASGProvider, AgentCoreBrowserProvider, AgentCoreCodeInterpreterProvider, AgentCoreEvaluatorProvider, AgentCoreRuntimeProvider, ApiGatewayProvider, ApiGatewayV2Provider, AppSyncProvider, BudgetsBudgetProvider, CloudFrontDistributionProvider, CloudFrontOACProvider, CloudFrontOAIProvider, CloudTrailProvider, CloudWatchAlarmProvider, CloudWatchAnomalyDetectorProvider, CodeBuildProvider, CodeCommitRepositoryProvider, CognitoUserPoolProvider, DLMLifecyclePolicyProvider, DocDBProvider, DocDBSubnetGroupProvider, DynamoDBGlobalTableProvider, DynamoDBTableProvider, EC2Provider, ECRProvider, ECSProvider, EFSProvider, ELBv2Provider, EMRClusterProvider, EMRInstanceFleetConfigProvider, EMRInstanceGroupConfigProvider, ElastiCacheProvider, EventBridgeBusProvider, EventBridgeRuleProvider, FSxFileSystemProvider, FirehoseProvider, GlueConnectionProvider, GlueCrawlerProvider, GlueJobProvider, GlueProvider, GlueSecurityConfigurationProvider, GlueTriggerProvider, GlueWorkflowProvider, IAMAccessKeyProvider, IAMInstanceProfileProvider, IAMManagedPolicyProvider, IAMPolicyProvider, IAMRoleProvider, IAMUserGroupProvider, KMSProvider, KinesisStreamConsumerProvider, KinesisStreamProvider, LambdaEventInvokeConfigProvider, LambdaEventSourceMappingProvider, LambdaFunctionProvider, LambdaLayerVersionProvider, LambdaMicrovmImageProvider, LambdaNetworkConnectorProvider, LambdaPermissionProvider, LambdaUrlProvider, LambdaWebFunctionEndpointProvider, LambdaWebFunctionRevisionProvider, LogsLogGroupProvider, NeptuneProvider, NestedStackProvider, PipesPipeProvider, RDSDBProxyEndpointProvider, RDSDBProxyProvider, RDSDBProxyTargetGroupProvider, RDSProvider, Route53Provider, S3BucketPolicyProvider, S3BucketProvider, S3DirectoryBucketProvider, S3TablesProvider, S3VectorsProvider, SNSSubscriptionProvider, SNSTopicPolicyProvider, SNSTopicProvider, SQSQueuePolicyProvider, SQSQueueProvider, SSMParameterProvider, SchedulerScheduleProvider, SecretsManagerSecretProvider, ServiceDiscoveryProvider, StepFunctionsProvider, WAFv2WebACLProvider, WaitConditionHandleProvider };
53737
- //# sourceMappingURL=provider-classes-DefoNqY7.js.map
54410
+ //# sourceMappingURL=provider-classes-B8kkAZqJ.js.map