@intentius/chant-lexicon-aws 0.124.31 → 0.124.33
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/actions/dynamodb.js +41 -0
- package/dist/actions/ecr.js +9 -0
- package/dist/actions/ecs.js +5 -0
- package/dist/actions/iam.js +3 -0
- package/dist/actions/index.js +9 -0
- package/dist/actions/lambda.js +11 -0
- package/dist/actions/logs.js +4 -0
- package/dist/actions/s3.js +40 -0
- package/dist/actions/sns.js +5 -0
- package/dist/actions/sqs.js +15 -0
- package/dist/agentcore/trace-fetch.d.ts.map +1 -1
- package/dist/agentcore/trace-fetch.js +472 -0
- package/dist/agentcore/trace-render.js +359 -0
- package/dist/ambient.js +148 -0
- package/dist/api/credential-chain.d.ts +30 -3
- package/dist/api/credential-chain.d.ts.map +1 -1
- package/dist/api/credential-chain.js +509 -0
- package/dist/api/read-client.d.ts +16 -43
- package/dist/api/read-client.d.ts.map +1 -1
- package/dist/api/read-client.js +458 -0
- package/dist/api/sigv4.d.ts +4 -4
- package/dist/api/sigv4.js +185 -0
- package/dist/behaviour-kinds.js +114 -0
- package/dist/caller-identity.d.ts +3 -5
- package/dist/caller-identity.d.ts.map +1 -1
- package/dist/caller-identity.js +146 -0
- package/dist/codegen/docs-cli.js +2 -0
- package/dist/codegen/docs.js +120 -0
- package/dist/codegen/enum-overlay.js +162 -0
- package/dist/codegen/extensions.js +139 -0
- package/dist/codegen/fallback.js +32 -0
- package/dist/codegen/generate-cli.js +15 -0
- package/dist/codegen/generate-lexicon.js +70 -0
- package/dist/codegen/generate-typescript.js +226 -0
- package/dist/codegen/generate.d.ts.map +1 -1
- package/dist/codegen/generate.js +234 -0
- package/dist/codegen/naming.js +135 -0
- package/dist/codegen/package.js +67 -0
- package/dist/codegen/patches.d.ts +26 -1
- package/dist/codegen/patches.d.ts.map +1 -1
- package/dist/codegen/patches.js +90 -0
- package/dist/codegen/property-overlay.js +85 -0
- package/dist/codegen/property-overlay.json +1 -16
- package/dist/codegen/sam.js +402 -0
- package/dist/codegen/typecheck.js +4 -0
- package/dist/codegen/versions.js +31 -0
- package/dist/components/__tests__/mock-cloud-executor.js +326 -0
- package/dist/components/apply.d.ts +44 -1
- package/dist/components/apply.d.ts.map +1 -1
- package/dist/components/apply.js +752 -0
- package/dist/components/builders.js +37 -0
- package/dist/components/capability-plugin.js +66 -0
- package/dist/components/cloud-executor.d.ts +35 -0
- package/dist/components/cloud-executor.d.ts.map +1 -1
- package/dist/components/cloud-executor.js +576 -0
- package/dist/components/config-bom.js +207 -0
- package/dist/components/host-delivery.js +117 -0
- package/dist/components/index.js +18 -0
- package/dist/components/job-submission.js +77 -0
- package/dist/components/publish.js +234 -0
- package/dist/components/safety.js +62 -0
- package/dist/components/wait-aws.js +68 -0
- package/dist/composites/agentcore-agent.js +187 -0
- package/dist/composites/agentcore-trust-policy.js +13 -0
- package/dist/composites/alb-shared.js +84 -0
- package/dist/composites/bucket-deployment.js +93 -0
- package/dist/composites/catalog.js +2714 -0
- package/dist/composites/dynamodb-table.js +66 -0
- package/dist/composites/ec2-instance-bundle.js +75 -0
- package/dist/composites/ec2-instance-role.js +26 -0
- package/dist/composites/ecr-repository.js +64 -0
- package/dist/composites/ecs-trust-policy.js +10 -0
- package/dist/composites/efs-with-access-point.js +44 -0
- package/dist/composites/eks-cluster.js +118 -0
- package/dist/composites/fargate-alb.js +216 -0
- package/dist/composites/fargate-service.js +222 -0
- package/dist/composites/index.js +28 -0
- package/dist/composites/lambda-api.js +15 -0
- package/dist/composites/lambda-dynamodb.js +77 -0
- package/dist/composites/lambda-eventbridge.js +27 -0
- package/dist/composites/lambda-function.js +54 -0
- package/dist/composites/lambda-s3.js +93 -0
- package/dist/composites/lambda-sns.js +23 -0
- package/dist/composites/lambda-sqs.js +34 -0
- package/dist/composites/landing-zone.js +82 -0
- package/dist/composites/microvm-app.js +293 -0
- package/dist/composites/minimal-vpc.js +40 -0
- package/dist/composites/monitoring-stack.js +105 -0
- package/dist/composites/nlb-service.js +61 -0
- package/dist/composites/rds-instance.js +98 -0
- package/dist/composites/scheduled-lambda.js +28 -0
- package/dist/composites/solr-fargate-service.js +33 -0
- package/dist/composites/step-functions-workflow.js +78 -0
- package/dist/composites/vpc-default.js +132 -0
- package/dist/condition.js +43 -0
- package/dist/coverage.js +4 -0
- package/dist/deep-observe.d.ts.map +1 -1
- package/dist/deep-observe.js +709 -0
- package/dist/deep-topology.js +226 -0
- package/dist/default-tags.js +50 -0
- package/dist/defaults.js +85 -0
- package/dist/dependencies.js +269 -0
- package/dist/detect.js +21 -0
- package/dist/disruption.d.ts.map +1 -1
- package/dist/disruption.js +129 -0
- package/dist/effect-receipt-row.js +107 -0
- package/dist/generated/index.d.ts +1297 -82
- package/dist/generated/index.d.ts.map +1 -1
- package/dist/generated/index.js +12382 -0
- package/dist/generated/runtime.js +4 -0
- package/dist/governance.js +131 -0
- package/dist/health.d.ts +61 -0
- package/dist/health.d.ts.map +1 -0
- package/dist/health.js +216 -0
- package/dist/identity-observe.d.ts.map +1 -1
- package/dist/identity-observe.js +127 -0
- package/dist/import/generator.js +757 -0
- package/dist/import/live-export.js +34 -0
- package/dist/import/parser.js +394 -0
- package/dist/index.js +69 -0
- package/dist/integrity.json +6 -6
- package/dist/intrinsics.js +393 -0
- package/dist/lint/audit-catalog.js +87 -0
- package/dist/lint/audit-lineage.js +150 -0
- package/dist/lint/post-synth/cf-refs.js +247 -0
- package/dist/lint/post-synth/cor020.js +60 -0
- package/dist/lint/post-synth/ext001.d.ts.map +1 -1
- package/dist/lint/post-synth/ext001.js +197 -0
- package/dist/lint/post-synth/index.js +124 -0
- package/dist/lint/post-synth/waw010.js +41 -0
- package/dist/lint/post-synth/waw011.js +41 -0
- package/dist/lint/post-synth/waw013.js +38 -0
- package/dist/lint/post-synth/waw014.js +42 -0
- package/dist/lint/post-synth/waw015.js +88 -0
- package/dist/lint/post-synth/waw016.d.ts.map +1 -1
- package/dist/lint/post-synth/waw016.js +116 -0
- package/dist/lint/post-synth/waw017.js +43 -0
- package/dist/lint/post-synth/waw018.js +61 -0
- package/dist/lint/post-synth/waw019.js +64 -0
- package/dist/lint/post-synth/waw020.js +56 -0
- package/dist/lint/post-synth/waw021.js +44 -0
- package/dist/lint/post-synth/waw022.js +36 -0
- package/dist/lint/post-synth/waw023.js +40 -0
- package/dist/lint/post-synth/waw024.js +46 -0
- package/dist/lint/post-synth/waw025.js +36 -0
- package/dist/lint/post-synth/waw026.js +38 -0
- package/dist/lint/post-synth/waw027.js +41 -0
- package/dist/lint/post-synth/waw028.js +39 -0
- package/dist/lint/post-synth/waw029.js +54 -0
- package/dist/lint/post-synth/waw030.js +282 -0
- package/dist/lint/post-synth/waw031.js +58 -0
- package/dist/lint/post-synth/waw032.js +45 -0
- package/dist/lint/post-synth/waw033.js +75 -0
- package/dist/lint/post-synth/waw034.js +52 -0
- package/dist/lint/post-synth/waw035.js +56 -0
- package/dist/lint/post-synth/waw036.js +79 -0
- package/dist/lint/post-synth/waw037.js +67 -0
- package/dist/lint/post-synth/waw038.js +42 -0
- package/dist/lint/post-synth/waw039.js +42 -0
- package/dist/lint/post-synth/waw040.js +45 -0
- package/dist/lint/post-synth/waw041.js +40 -0
- package/dist/lint/post-synth/waw042.js +99 -0
- package/dist/lint/post-synth/waw043.js +51 -0
- package/dist/lint/post-synth/waw044.js +64 -0
- package/dist/lint/post-synth/waw045.js +49 -0
- package/dist/lint/post-synth/waw046.js +52 -0
- package/dist/lint/post-synth/waw047.js +43 -0
- package/dist/lint/post-synth/waw048.js +40 -0
- package/dist/lint/post-synth/waw049.js +78 -0
- package/dist/lint/post-synth/waw050.js +44 -0
- package/dist/lint/post-synth/waw051.js +41 -0
- package/dist/lint/post-synth/waw052.js +43 -0
- package/dist/lint/post-synth/waw053.js +43 -0
- package/dist/lint/post-synth/waw054.js +41 -0
- package/dist/lint/post-synth/waw055.js +41 -0
- package/dist/lint/post-synth/waw056.js +65 -0
- package/dist/lint/post-synth/waw057.js +43 -0
- package/dist/lint/post-synth/waw058.js +61 -0
- package/dist/lint/post-synth/waw059.js +338 -0
- package/dist/lint/post-synth/waw060.js +83 -0
- package/dist/lint/post-synth/waw061.js +60 -0
- package/dist/lint/post-synth/waw062.js +0 -0
- package/dist/lint/post-synth/waw063.js +0 -0
- package/dist/lint/post-synth/waw064.js +45 -0
- package/dist/lint/post-synth/waw065.js +104 -0
- package/dist/lint/post-synth/waw066.js +145 -0
- package/dist/lint/post-synth/waw067.js +115 -0
- package/dist/lint/post-synth/waw068.js +69 -0
- package/dist/lint/post-synth/waw069.js +0 -0
- package/dist/lint/rules/hardcoded-region.js +38 -0
- package/dist/lint/rules/iam-wildcard.js +60 -0
- package/dist/lint/rules/index.js +6 -0
- package/dist/lint/rules/s3-encryption.js +60 -0
- package/dist/live-attrs.js +42 -0
- package/dist/lsp/completions.d.ts.map +1 -1
- package/dist/lsp/completions.js +18 -0
- package/dist/lsp/hover.d.ts.map +1 -1
- package/dist/lsp/hover.js +66 -0
- package/dist/manifest.json +1 -1
- package/dist/mapping.js +33 -0
- package/dist/meta.json +17359 -784
- package/dist/nested-stack.js +95 -0
- package/dist/okf/index.md +203 -0
- package/dist/okf/rules/EXT001.md +1 -0
- package/dist/okf/rules/WAW016.md +2 -0
- package/dist/okf/rules/WAW019.md +1 -0
- package/dist/okf/rules/WAW028.md +1 -0
- package/dist/okf/rules/WAW030.md +2 -0
- package/dist/okf/rules/WAW039.md +1 -0
- package/dist/okf/rules/WAW049.md +1 -0
- package/dist/okf/rules/WAW056.md +1 -0
- package/dist/okf/rules/WAW058.md +1 -0
- package/dist/okf/rules/WAW062.md +1 -0
- package/dist/okf/rules/WAW064.md +1 -0
- package/dist/okf/rules/WAW065.md +1 -0
- package/dist/okf/rules/WAW066.md +1 -0
- package/dist/okf/rules/WAW067.md +1 -0
- package/dist/okf/rules/WAW068.md +1 -0
- package/dist/okf/rules/WAW069.md +4 -0
- package/dist/okf/types/AIWorkloadConfig.md +23 -0
- package/dist/okf/types/ARCRegionSwitchPlan.md +1 -0
- package/dist/okf/types/AccountAccessApplication.md +28 -0
- package/dist/okf/types/AccountAccessEntitlement.md +22 -0
- package/dist/okf/types/ActionTarget.md +20 -0
- package/dist/okf/types/AdConfiguration.md +21 -0
- package/dist/okf/types/Adapter.md +26 -0
- package/dist/okf/types/AgentContext.md +35 -0
- package/dist/okf/types/AgentGoal.md +31 -0
- package/dist/okf/types/AgentProfile.md +34 -0
- package/dist/okf/types/Alarm.md +3 -1
- package/dist/okf/types/AlarmModel.md +14 -9
- package/dist/okf/types/AmplifyWebhook.md +25 -0
- package/dist/okf/types/ApiCache.md +8 -8
- package/dist/okf/types/ApiGatewayManagedOverrides.md +5 -5
- package/dist/okf/types/AppAuthorization.md +35 -0
- package/dist/okf/types/AppBlockBuilder.md +1 -0
- package/dist/okf/types/AppInstance.md +2 -2
- package/dist/okf/types/AppInstanceBot.md +2 -2
- package/dist/okf/types/AppStreamFleet.md +3 -2
- package/dist/okf/types/AppSyncApiKey.md +6 -6
- package/dist/okf/types/AppSyncType.md +22 -0
- package/dist/okf/types/ApplicationStatusCheck.md +36 -0
- package/dist/okf/types/ApplicationVersion.md +4 -1
- package/dist/okf/types/ApplicationsList.md +26 -0
- package/dist/okf/types/ApprovalPolicy.md +28 -0
- package/dist/okf/types/ArchiveRule.md +24 -0
- package/dist/okf/types/Asset.md +30 -0
- package/dist/okf/types/Backup.md +31 -0
- package/dist/okf/types/BedrockAgentCoreDataset.md +1 -1
- package/dist/okf/types/BedrockAgentCoreGateway.md +3 -0
- package/dist/okf/types/BedrockSession.md +28 -0
- package/dist/okf/types/BillEstimate.md +35 -0
- package/dist/okf/types/Brand.md +32 -0
- package/dist/okf/types/CallAnalyticsCategory.md +25 -0
- package/dist/okf/types/Campaign.md +28 -0
- package/dist/okf/types/CapacityProvider.md +30 -0
- package/dist/okf/types/Case.md +24 -0
- package/dist/okf/types/CertificateAssociation.md +13 -0
- package/dist/okf/types/ChangeSet.md +36 -0
- package/dist/okf/types/ChannelFlow.md +29 -0
- package/dist/okf/types/ChimeChannel.md +39 -0
- package/dist/okf/types/Classifier.md +6 -6
- package/dist/okf/types/ClientVpnAuthorizationRule.md +6 -6
- package/dist/okf/types/ClientVpnEndpoint.md +2 -0
- package/dist/okf/types/ClientVpnRoute.md +5 -5
- package/dist/okf/types/CloudConnector.md +29 -0
- package/dist/okf/types/Cluster.md +39 -0
- package/dist/okf/types/ClusterSchedulerConfig.md +30 -0
- package/dist/okf/types/CodeCommitRepository.md +12 -12
- package/dist/okf/types/CodeConnectionsHost.md +26 -0
- package/dist/okf/types/CodeRepository.md +5 -5
- package/dist/okf/types/CompositeAlarm.md +1 -0
- package/dist/okf/types/ComputeEnvironment.md +2 -0
- package/dist/okf/types/ComputeNodeGroup.md +1 -1
- package/dist/okf/types/ComputeQuota.md +34 -0
- package/dist/okf/types/ConfigRule.md +1 -1
- package/dist/okf/types/ConfigurationRecorder.md +7 -6
- package/dist/okf/types/ConnectAttachment.md +2 -0
- package/dist/okf/types/ConnectQueue.md +5 -1
- package/dist/okf/types/ConnectVocabulary.md +28 -0
- package/dist/okf/types/ConnectionType.md +24 -0
- package/dist/okf/types/ConsentPortal.md +33 -0
- package/dist/okf/types/ContactMethod.md +29 -0
- package/dist/okf/types/ContainerAssociation.md +26 -0
- package/dist/okf/types/ContainerFleet.md +1 -1
- package/dist/okf/types/ContainerGroupDefinition.md +1 -1
- package/dist/okf/types/Content.md +40 -0
- package/dist/okf/types/ContentAssociation.md +28 -0
- package/dist/okf/types/CustomDetectionRuleAssociation.md +28 -0
- package/dist/okf/types/CustomEntityType.md +4 -9
- package/dist/okf/types/Customization.md +22 -0
- package/dist/okf/types/CwIntegration.md +31 -0
- package/dist/okf/types/DAXParameterGroup.md +3 -8
- package/dist/okf/types/DAXSubnetGroup.md +0 -5
- package/dist/okf/types/DBClusterEndpoint.md +31 -0
- package/dist/okf/types/DBProxyTargetGroup.md +1 -0
- package/dist/okf/types/DBSnapshot.md +62 -0
- package/dist/okf/types/DLMLifecyclePolicy.md +12 -12
- package/dist/okf/types/DLPSetting.md +31 -0
- package/dist/okf/types/DMSInstanceProfile.md +1 -1
- package/dist/okf/types/DRSLaunchConfigurationTemplate.md +28 -0
- package/dist/okf/types/Daemon.md +1 -0
- package/dist/okf/types/DataExchangeDataSet.md +29 -0
- package/dist/okf/types/DataIntegrationFlow.md +27 -0
- package/dist/okf/types/DataMigration.md +1 -1
- package/dist/okf/types/DataProvider.md +2 -1
- package/dist/okf/types/DataQualityRuleset.md +6 -11
- package/dist/okf/types/DataSource.md +23 -0
- package/dist/okf/types/Dataset.md +20 -0
- package/dist/okf/types/DatasetIntegration.md +23 -0
- package/dist/okf/types/DbCluster.md +1 -1
- package/dist/okf/types/DbInstance.md +8 -2
- package/dist/okf/types/DeadlineBudget.md +29 -0
- package/dist/okf/types/DelegationSet.md +23 -0
- package/dist/okf/types/DeliveryChannel.md +6 -11
- package/dist/okf/types/DevOpsAgentAgentSpace.md +4 -0
- package/dist/okf/types/DevOpsAgentService.md +1 -0
- package/dist/okf/types/DevOpsAgentTrigger.md +28 -0
- package/dist/okf/types/DirectConnectGatewayAttachment.md +2 -0
- package/dist/okf/types/Directory.md +60 -0
- package/dist/okf/types/DocDBDBClusterParameterGroup.md +5 -10
- package/dist/okf/types/DocDBDBSubnetGroup.md +4 -9
- package/dist/okf/types/DocDBElasticClusterSnapshot.md +36 -0
- package/dist/okf/types/DocumentClassifierEndpoint.md +27 -0
- package/dist/okf/types/Domain.md +27 -0
- package/dist/okf/types/EKSCertificateAuthority.md +42 -0
- package/dist/okf/types/EKSCluster.md +8 -0
- package/dist/okf/types/EcSnapshot.md +66 -0
- package/dist/okf/types/EmailIdentityCertificate.md +15 -0
- package/dist/okf/types/EndpointConfig.md +14 -13
- package/dist/okf/types/EntityRecognizer.md +27 -0
- package/dist/okf/types/EntityRecognizerEndpoint.md +31 -0
- package/dist/okf/types/EnvironmentEC2.md +13 -13
- package/dist/okf/types/EvaluationForm.md +1 -0
- package/dist/okf/types/Evaluator.md +6 -2
- package/dist/okf/types/EventAction.md +26 -0
- package/dist/okf/types/EventRule.md +2 -0
- package/dist/okf/types/EventSource.md +30 -0
- package/dist/okf/types/EventTracker.md +22 -0
- package/dist/okf/types/EventsV2EventBus.md +28 -0
- package/dist/okf/types/EventsV2ResourcePolicy.md +19 -0
- package/dist/okf/types/EventsV2Subscriber.md +39 -0
- package/dist/okf/types/ExperimentDefinition.md +39 -0
- package/dist/okf/types/ExperimentRun.md +33 -0
- package/dist/okf/types/ExperimentTrialComponent.md +13 -11
- package/dist/okf/types/FHIRDatastore.md +3 -0
- package/dist/okf/types/FSxSnapshot.md +5 -5
- package/dist/okf/types/FSxVolume.md +9 -9
- package/dist/okf/types/FeaturedResultsSet.md +26 -0
- package/dist/okf/types/Feed.md +1 -0
- package/dist/okf/types/FieldLevelEncryptionConfig.md +25 -0
- package/dist/okf/types/FieldLevelEncryptionProfile.md +22 -0
- package/dist/okf/types/FileCache.md +45 -0
- package/dist/okf/types/Filter.md +27 -0
- package/dist/okf/types/Firewall.md +6 -0
- package/dist/okf/types/FlowMediaStream.md +28 -0
- package/dist/okf/types/FlowOutput.md +1 -0
- package/dist/okf/types/FpgaImage.md +38 -0
- package/dist/okf/types/Function.md +2 -2
- package/dist/okf/types/Gateway.md +41 -0
- package/dist/okf/types/GatewayClusterAssociations.md +23 -0
- package/dist/okf/types/GatewayRateLimit.md +26 -0
- package/dist/okf/types/GatewayRule.md +32 -0
- package/dist/okf/types/GlobalReplicationGroup.md +3 -0
- package/dist/okf/types/GlobalResolver.md +1 -1
- package/dist/okf/types/GlobalTable.md +1 -0
- package/dist/okf/types/GlueConnection.md +5 -4
- package/dist/okf/types/GlueSecurityConfiguration.md +1 -6
- package/dist/okf/types/GlueSession.md +38 -0
- package/dist/okf/types/GlueTable.md +5 -10
- package/dist/okf/types/GlueWorkflow.md +5 -10
- package/dist/okf/types/Group.md +27 -0
- package/dist/okf/types/Harness.md +1 -0
- package/dist/okf/types/HostKey.md +33 -0
- package/dist/okf/types/HostedZone.md +1 -0
- package/dist/okf/types/HttpApi.md +2 -0
- package/dist/okf/types/HttpNamespace.md +5 -5
- package/dist/okf/types/HubV2.md +1 -0
- package/dist/okf/types/HumanTaskUi.md +22 -0
- package/dist/okf/types/IPv4Pool.md +28 -0
- package/dist/okf/types/ImageBuilder.md +1 -0
- package/dist/okf/types/ImageBuilderImage.md +1 -1
- package/dist/okf/types/ImagePipeline.md +1 -1
- package/dist/okf/types/InferenceComponent.md +5 -1
- package/dist/okf/types/InfluxDBBackup.md +65 -0
- package/dist/okf/types/InfluxDBCluster.md +3 -0
- package/dist/okf/types/InfrastructureConfiguration.md +2 -0
- package/dist/okf/types/IngestionDestination.md +28 -0
- package/dist/okf/types/InputSecurityGroup.md +6 -4
- package/dist/okf/types/InspectorV2Connector.md +38 -0
- package/dist/okf/types/InstanceEventWindow.md +25 -0
- package/dist/okf/types/InstanceFleetConfig.md +10 -10
- package/dist/okf/types/InstanceGroupConfig.md +3 -3
- package/dist/okf/types/InstrumentationConfig.md +31 -0
- package/dist/okf/types/IntegrationAssociation.md +3 -0
- package/dist/okf/types/IoTSiteWiseApplication.md +34 -0
- package/dist/okf/types/IoTSiteWiseDataset.md +5 -2
- package/dist/okf/types/IoTSiteWiseTask.md +24 -0
- package/dist/okf/types/IpamExternalResourceVerificationToken.md +35 -0
- package/dist/okf/types/IpamInternetRegistryAssociation.md +32 -0
- package/dist/okf/types/Job.md +35 -0
- package/dist/okf/types/JobTemplate.md +26 -0
- package/dist/okf/types/KinesisChannel.md +31 -0
- package/dist/okf/types/KinesisStream.md +1 -0
- package/dist/okf/types/LambdaResourcePolicy.md +14 -0
- package/dist/okf/types/Lexicon.md +34 -0
- package/dist/okf/types/LicenseAssetGroup.md +23 -0
- package/dist/okf/types/LicenseConfiguration.md +33 -0
- package/dist/okf/types/LicenseServerEndpoint.md +32 -0
- package/dist/okf/types/LightsailKeyPair.md +29 -0
- package/dist/okf/types/LimitsProfile.md +27 -0
- package/dist/okf/types/LocationAzureBlob.md +2 -1
- package/dist/okf/types/LocationObjectStorage.md +1 -0
- package/dist/okf/types/LogAlarm.md +2 -0
- package/dist/okf/types/MGNConnector.md +23 -0
- package/dist/okf/types/MGNLaunchConfigurationTemplate.md +37 -0
- package/dist/okf/types/MLTransform.md +15 -15
- package/dist/okf/types/MWAAServerlessWorkflow.md +3 -0
- package/dist/okf/types/ManagedNotificationAccountContactAssociation.md +1 -0
- package/dist/okf/types/ManagedNotificationAdditionalChannelAssociation.md +1 -0
- package/dist/okf/types/MediaConvertJobTemplate.md +11 -13
- package/dist/okf/types/MediaConvertQueue.md +8 -10
- package/dist/okf/types/MediaInsightsPipelineConfiguration.md +28 -0
- package/dist/okf/types/MediaLiveInput.md +41 -18
- package/dist/okf/types/MediaPackageV2Channel.md +3 -0
- package/dist/okf/types/MediaPackageV2OriginEndpoint.md +1 -0
- package/dist/okf/types/MediaPipelineKinesisVideoStreamPool.md +28 -0
- package/dist/okf/types/MediaTailorFunction.md +27 -0
- package/dist/okf/types/MedicalVocabulary.md +21 -0
- package/dist/okf/types/Member.md +26 -0
- package/dist/okf/types/Memory.md +6 -0
- package/dist/okf/types/MemoryDBSnapshot.md +29 -0
- package/dist/okf/types/Metric.md +59 -0
- package/dist/okf/types/MetricAttribution.md +23 -0
- package/dist/okf/types/MicrosoftAD.md +11 -11
- package/dist/okf/types/MigrationProject.md +8 -1
- package/dist/okf/types/Monitor.md +26 -0
- package/dist/okf/types/NFSFileShare.md +44 -0
- package/dist/okf/types/NeptuneGraphGraph.md +1 -0
- package/dist/okf/types/NetworkConnector.md +4 -0
- package/dist/okf/types/NetworkFlowMonitorScope.md +23 -0
- package/dist/okf/types/NetworkMigrationDefinition.md +31 -0
- package/dist/okf/types/NetworkSecurityManagerDeployment.md +31 -0
- package/dist/okf/types/NetworkSecurityManagerPolicy.md +32 -0
- package/dist/okf/types/NetworkSecurityManagerScope.md +29 -0
- package/dist/okf/types/NotebookInstance.md +18 -18
- package/dist/okf/types/NotebookInstanceLifecycleConfig.md +6 -5
- package/dist/okf/types/NotifyConfiguration.md +35 -0
- package/dist/okf/types/OTelEnrichment.md +2 -0
- package/dist/okf/types/OnlineEvaluationConfig.md +0 -1
- package/dist/okf/types/OrganizationConfigRule.md +7 -7
- package/dist/okf/types/Outpost.md +32 -0
- package/dist/okf/types/ParallelData.md +40 -0
- package/dist/okf/types/Partition.md +5 -5
- package/dist/okf/types/PaymentConnector.md +4 -1
- package/dist/okf/types/Pentest.md +1 -0
- package/dist/okf/types/PerfReports.md +28 -0
- package/dist/okf/types/PermissionAssociation.md +30 -0
- package/dist/okf/types/PersonalizeDataset.md +1 -0
- package/dist/okf/types/PersonalizeDatasetGroup.md +1 -0
- package/dist/okf/types/PersonalizeSchema.md +1 -0
- package/dist/okf/types/Pipeline.md +25 -0
- package/dist/okf/types/PlaybackConfiguration.md +1 -0
- package/dist/okf/types/PolicyAssociation.md +1 -1
- package/dist/okf/types/PolicyGrant.md +2 -2
- package/dist/okf/types/PolicyPrincipalAttachment.md +2 -7
- package/dist/okf/types/PortalProduct.md +24 -0
- package/dist/okf/types/PrefetchSchedule.md +25 -0
- package/dist/okf/types/PricingPlanManagerSubscription.md +31 -0
- package/dist/okf/types/PrincipalAssociation.md +27 -0
- package/dist/okf/types/PrivateDnsNamespace.md +8 -8
- package/dist/okf/types/PrivateVirtualInterface.md +1 -0
- package/dist/okf/types/ProcurementPortalPreference.md +45 -0
- package/dist/okf/types/Program.md +33 -0
- package/dist/okf/types/ProjectMembership.md +1 -1
- package/dist/okf/types/ProtocolsList.md +26 -0
- package/dist/okf/types/PublicDnsNamespace.md +7 -7
- package/dist/okf/types/PublicVirtualInterface.md +1 -0
- package/dist/okf/types/QEV2IdcApplication.md +25 -0
- package/dist/okf/types/QueryLoggingConfig.md +21 -0
- package/dist/okf/types/QuerySuggestionsBlockList.md +25 -0
- package/dist/okf/types/QuickSightAssignment.md +24 -0
- package/dist/okf/types/RAMResourceAssociation.md +27 -0
- package/dist/okf/types/RDSClusterSnapshot.md +54 -0
- package/dist/okf/types/RDSDBParameterGroup.md +5 -0
- package/dist/okf/types/RDSDeployment.md +41 -0
- package/dist/okf/types/RcsAgent.md +38 -0
- package/dist/okf/types/ReceiptRule.md +5 -5
- package/dist/okf/types/ReceiptRuleSet.md +1 -6
- package/dist/okf/types/RecommenderFilter.md +27 -0
- package/dist/okf/types/RecommenderSchema.md +25 -0
- package/dist/okf/types/RecordSet.md +16 -22
- package/dist/okf/types/RecoveryPlan.md +28 -0
- package/dist/okf/types/RedshiftIdcApplication.md +31 -0
- package/dist/okf/types/RedshiftSnapshot.md +59 -0
- package/dist/okf/types/RegistrationAttachment.md +28 -0
- package/dist/okf/types/Registry.md +41 -0
- package/dist/okf/types/RegistryRecord.md +38 -0
- package/dist/okf/types/RelatedItem.md +24 -0
- package/dist/okf/types/ReplicationConfigurationTemplate.md +35 -0
- package/dist/okf/types/ReplicationSubnetGroup.md +4 -9
- package/dist/okf/types/ReplicationTask.md +14 -14
- package/dist/okf/types/ReportGenerator.md +29 -0
- package/dist/okf/types/ReportGroup.md +1 -3
- package/dist/okf/types/ResilienceHubV2Policy.md +1 -0
- package/dist/okf/types/ResilienceHubV2Service.md +1 -0
- package/dist/okf/types/ResourceConfiguration.md +1 -1
- package/dist/okf/types/ResourceMetricsConfiguration.md +21 -0
- package/dist/okf/types/RestApi.md +1 -0
- package/dist/okf/types/RetrievalInstruction.md +32 -0
- package/dist/okf/types/RouterOutput.md +1 -0
- package/dist/okf/types/Rule.md +31 -0
- package/dist/okf/types/RunCache.md +29 -0
- package/dist/okf/types/Runtime.md +2 -1
- package/dist/okf/types/SCNInstance.md +33 -0
- package/dist/okf/types/SDBDomain.md +2 -2
- package/dist/okf/types/SMBFileShare.md +49 -0
- package/dist/okf/types/SageMakerArtifact.md +27 -0
- package/dist/okf/types/SageMakerEndpoint.md +0 -1
- package/dist/okf/types/ScalableTarget.md +1 -0
- package/dist/okf/types/ScalingPlan.md +6 -6
- package/dist/okf/types/ScheduledReport.md +31 -0
- package/dist/okf/types/SecondaryNetwork.md +26 -0
- package/dist/okf/types/SecurityAgentArtifact.md +25 -0
- package/dist/okf/types/SecurityAgentIntegration.md +31 -0
- package/dist/okf/types/Server.md +1 -0
- package/dist/okf/types/ServerlessCache.md +2 -0
- package/dist/okf/types/ServerlessCacheSnapshot.md +31 -0
- package/dist/okf/types/ServerlessRepoApplication.md +32 -0
- package/dist/okf/types/ServiceDiscoveryInstance.md +3 -7
- package/dist/okf/types/SipMediaApplication.md +27 -0
- package/dist/okf/types/SiteToSiteVpnAttachment.md +2 -0
- package/dist/okf/types/SnapshotCopyGrant.md +20 -0
- package/dist/okf/types/Solution.md +1 -0
- package/dist/okf/types/SourceAssociation.md +25 -0
- package/dist/okf/types/SourceCredential.md +6 -6
- package/dist/okf/types/SourceNetwork.md +23 -0
- package/dist/okf/types/StackFleetAssociation.md +2 -7
- package/dist/okf/types/StorageTierPolicy.md +20 -0
- package/dist/okf/types/StorageVirtualMachine.md +9 -9
- package/dist/okf/types/Stream.md +28 -0
- package/dist/okf/types/SubnetCidrReservation.md +26 -0
- package/dist/okf/types/SubscriptionProvider.md +26 -0
- package/dist/okf/types/SupportPermit.md +29 -0
- package/dist/okf/types/Table.md +2 -1
- package/dist/okf/types/TableOptimizer.md +5 -10
- package/dist/okf/types/Tape.md +31 -0
- package/dist/okf/types/Template.md +36 -0
- package/dist/okf/types/Tenant.md +2 -0
- package/dist/okf/types/Terminology.md +39 -0
- package/dist/okf/types/Thesaurus.md +25 -0
- package/dist/okf/types/ThingPrincipalAttachment.md +3 -8
- package/dist/okf/types/Topic.md +1 -0
- package/dist/okf/types/TopicRuleDestination.md +1 -0
- package/dist/okf/types/TrafficPolicy.md +26 -0
- package/dist/okf/types/TrafficPolicyInstance.md +28 -0
- package/dist/okf/types/TranscribeVocabulary.md +27 -0
- package/dist/okf/types/TransitGatewayRouteTableAttachment.md +2 -0
- package/dist/okf/types/TransitVirtualInterface.md +1 -0
- package/dist/okf/types/Tunnel.md +25 -0
- package/dist/okf/types/UsageLimit.md +26 -0
- package/dist/okf/types/UseCase.md +23 -0
- package/dist/okf/types/User.md +47 -0
- package/dist/okf/types/VPCEndpoint.md +1 -1
- package/dist/okf/types/VPCEndpointService.md +6 -0
- package/dist/okf/types/VPCPeeringConnection.md +2 -2
- package/dist/okf/types/VPNConcentrator.md +1 -1
- package/dist/okf/types/VPNConnection.md +1 -1
- package/dist/okf/types/VerifiedDestinationNumber.md +25 -0
- package/dist/okf/types/View.md +27 -0
- package/dist/okf/types/VoiceConnector.md +30 -0
- package/dist/okf/types/Volume.md +44 -0
- package/dist/okf/types/Vpc.md +1 -1
- package/dist/okf/types/VpcAttachment.md +2 -0
- package/dist/okf/types/WebFunction.md +27 -0
- package/dist/okf/types/WebFunctionEndpoint.md +44 -0
- package/dist/okf/types/WebFunctionRevision.md +32 -0
- package/dist/okf/types/WickrNetwork.md +27 -0
- package/dist/okf/types/Worker.md +29 -0
- package/dist/okf/types/Workforce.md +26 -0
- package/dist/okf/types/Workload.md +35 -0
- package/dist/okf/types/WorkloadEstimate.md +35 -0
- package/dist/okf/types/Workspace.md +28 -0
- package/dist/okf/types/Workteam.md +8 -8
- package/dist/op/activities/aws-apply.js +214 -0
- package/dist/op/activities/floci.js +97 -0
- package/dist/op/activities/index.js +32 -0
- package/dist/op/builders.js +50 -0
- package/dist/ownership.js +52 -0
- package/dist/package-cli.js +25 -0
- package/dist/parameter.js +19 -0
- package/dist/plugin.d.ts.map +1 -1
- package/dist/plugin.js +1012 -0
- package/dist/properties.js +166 -0
- package/dist/pseudo.js +25 -0
- package/dist/receipt-store.d.ts.map +1 -1
- package/dist/receipt-store.js +233 -0
- package/dist/reference-catalog.js +106 -0
- package/dist/rules/ext001.ts +3 -3
- package/dist/rules/waw016.ts +2 -2
- package/dist/serializer.js +529 -0
- package/dist/spec/fetch.js +193 -0
- package/dist/spec/parse.js +259 -0
- package/dist/spec/pin.js +185 -0
- package/dist/spec/pinned-types.json +203 -0
- package/dist/stack-errors.js +14 -0
- package/dist/taggable.d.ts.map +1 -1
- package/dist/taggable.js +33 -0
- package/dist/teardown.js +199 -0
- package/dist/template-sections.js +53 -0
- package/dist/template-transform.js +50 -0
- package/dist/types/index.d.ts +18847 -1124
- package/dist/validate-cli.js +16 -0
- package/dist/validate.js +33 -0
- package/package.json +9 -9
- package/src/agentcore/trace-fetch.ts +2 -1
- package/src/api/credential-chain.ts +119 -9
- package/src/api/credential-isolation.test.ts +72 -0
- package/src/api/read-client-chain.test.ts +159 -0
- package/src/api/read-client.ts +42 -6
- package/src/api/sigv4.ts +4 -4
- package/src/caller-identity.ts +3 -5
- package/src/codegen/any-budget.test.ts +12 -2
- package/src/codegen/generate.ts +9 -0
- package/src/codegen/package.ts +2 -2
- package/src/codegen/patches.test.ts +95 -0
- package/src/codegen/patches.ts +53 -9
- package/src/codegen/property-overlay.json +1 -16
- package/src/components/apply.ts +218 -6
- package/src/components/cfn-plan-floci.e2e.test.ts +76 -0
- package/src/components/cfn-plan.test.ts +225 -16
- package/src/components/cloud-executor.ts +73 -25
- package/src/deep-observe.ts +2 -1
- package/src/disruption.ts +2 -1
- package/src/generated/index.d.ts +18847 -1124
- package/src/generated/index.ts +1376 -161
- package/src/generated/lexicon-aws.json +17359 -784
- package/src/health.test.ts +136 -0
- package/src/health.ts +281 -0
- package/src/identity-observe.ts +2 -1
- package/src/lint/post-synth/ext001.ts +3 -3
- package/src/lint/post-synth/waw016.ts +2 -2
- package/src/lsp/completions.ts +2 -1
- package/src/lsp/hover.ts +2 -1
- package/src/plugin.ts +10 -1
- package/src/receipt-store.ts +2 -1
- package/src/spec/pin.ts +3 -3
- package/src/spec/pinned-types.json +203 -0
- package/src/taggable.ts +2 -2
|
@@ -0,0 +1,529 @@
|
|
|
1
|
+
import { isPropertyDeclarable, isResourceDeclarable } from "@intentius/chant/declarable";
|
|
2
|
+
import { ownershipEntries } from "@intentius/chant/ownership";
|
|
3
|
+
import { isEffectReceipt, receiptExpectation, referenceInputPaths, } from "@intentius/chant/effect-receipt";
|
|
4
|
+
import { AWS_TAG_OWNERSHIP_KEYS, OWNERSHIP_METADATA_KEY } from "./ownership.js";
|
|
5
|
+
import { AWS_EFFECT_RECEIPT_ENTITY_TYPE, EFFECT_RECEIPTS_METADATA_KEY, RECEIPT_UNRESOLVED_VALUE_NOTE, receiptParameterName, } from "./effect-receipt-row.js";
|
|
6
|
+
import { walkValue } from "@intentius/chant/serializer-walker";
|
|
7
|
+
import { isChildProject } from "@intentius/chant/child-project";
|
|
8
|
+
import { isStackOutput } from "@intentius/chant/stack-output";
|
|
9
|
+
import { isAttrRefLike } from "@intentius/chant/utils";
|
|
10
|
+
import { resolveDependsOn } from "@intentius/chant/resource-attributes";
|
|
11
|
+
import { conditionName, isCondition } from "./condition.js";
|
|
12
|
+
import { isMapping } from "./mapping.js";
|
|
13
|
+
import { isDefaultTags } from "./default-tags.js";
|
|
14
|
+
import { isTemplateTransform } from "./template-transform.js";
|
|
15
|
+
import { isTemplateSection } from "./template-sections.js";
|
|
16
|
+
import { loadTaggableResources } from "./taggable.js";
|
|
17
|
+
/**
|
|
18
|
+
* Check if a declarable is a CoreParameter
|
|
19
|
+
*/
|
|
20
|
+
function isCoreParameter(entity) {
|
|
21
|
+
return "parameterType" in entity;
|
|
22
|
+
}
|
|
23
|
+
/** Parameter constraint options and the CloudFormation keys they emit as. */
|
|
24
|
+
const PARAMETER_CONSTRAINT_KEYS = [
|
|
25
|
+
["allowedValues", "AllowedValues"],
|
|
26
|
+
["allowedPattern", "AllowedPattern"],
|
|
27
|
+
["constraintDescription", "ConstraintDescription"],
|
|
28
|
+
["minLength", "MinLength"],
|
|
29
|
+
["maxLength", "MaxLength"],
|
|
30
|
+
["minValue", "MinValue"],
|
|
31
|
+
["maxValue", "MaxValue"],
|
|
32
|
+
["noEcho", "NoEcho"],
|
|
33
|
+
];
|
|
34
|
+
/**
|
|
35
|
+
* CloudFormation-specific visitor for the generic serializer walker.
|
|
36
|
+
*/
|
|
37
|
+
function cfnVisitor(entityNames) {
|
|
38
|
+
return {
|
|
39
|
+
attrRef: (name, attr) => ({ "Fn::GetAtt": [name, attr] }),
|
|
40
|
+
resourceRef: (name) => ({ Ref: name }),
|
|
41
|
+
propertyDeclarable: (entity, walk) => {
|
|
42
|
+
if (!isResourceDeclarable(entity) || typeof entity.props !== "object" || entity.props === null) {
|
|
43
|
+
return undefined;
|
|
44
|
+
}
|
|
45
|
+
const props = entity.props;
|
|
46
|
+
const cfProps = {};
|
|
47
|
+
for (const [key, value] of Object.entries(props)) {
|
|
48
|
+
if (value !== undefined) {
|
|
49
|
+
cfProps[key] = walk(value);
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
return Object.keys(cfProps).length > 0 ? cfProps : undefined;
|
|
53
|
+
},
|
|
54
|
+
};
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* Convert a value to CF-compatible JSON using the generic walker.
|
|
58
|
+
*/
|
|
59
|
+
function toCFValue(value, entityNames) {
|
|
60
|
+
return walkValue(value, entityNames, cfnVisitor(entityNames));
|
|
61
|
+
}
|
|
62
|
+
/**
|
|
63
|
+
* Set logical names on any AttrRefs nested inside a value (e.g. inside a `Join`
|
|
64
|
+
* that a `stackOutput` exports). resolveAttrRefs only reaches entity attributes,
|
|
65
|
+
* not refs buried in an output's intrinsic — without this the walker would throw
|
|
66
|
+
* "logical name not set" for them (#517).
|
|
67
|
+
*/
|
|
68
|
+
function resolveNestedAttrRefs(value, entityNames, seen = new Set()) {
|
|
69
|
+
if (value === null || typeof value !== "object" || seen.has(value))
|
|
70
|
+
return;
|
|
71
|
+
seen.add(value);
|
|
72
|
+
if (isAttrRefLike(value)) {
|
|
73
|
+
if (!value.getLogicalName()) {
|
|
74
|
+
const parent = value.parent.deref();
|
|
75
|
+
const parentName = parent ? entityNames.get(parent) : undefined;
|
|
76
|
+
if (parentName)
|
|
77
|
+
value._setLogicalName(parentName);
|
|
78
|
+
}
|
|
79
|
+
return;
|
|
80
|
+
}
|
|
81
|
+
const children = Array.isArray(value) ? value : Object.values(value);
|
|
82
|
+
for (const child of children)
|
|
83
|
+
resolveNestedAttrRefs(child, entityNames, seen);
|
|
84
|
+
}
|
|
85
|
+
/**
|
|
86
|
+
* Convert entity props to CF properties
|
|
87
|
+
*/
|
|
88
|
+
function toProperties(entity, entityNames) {
|
|
89
|
+
if (!isResourceDeclarable(entity) || typeof entity.props !== "object" || entity.props === null) {
|
|
90
|
+
return undefined;
|
|
91
|
+
}
|
|
92
|
+
const props = entity.props;
|
|
93
|
+
const cfProps = {};
|
|
94
|
+
for (const [key, value] of Object.entries(props)) {
|
|
95
|
+
if (value !== undefined) {
|
|
96
|
+
cfProps[key] = toCFValue(value, entityNames);
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
return Object.keys(cfProps).length > 0 ? cfProps : undefined;
|
|
100
|
+
}
|
|
101
|
+
/** The rendered `Value`: the synthesis-time expectation when the receipt is
|
|
102
|
+
* fully static, a placeholder note when reference inputs resolve later —
|
|
103
|
+
* never a digest hashed over placeholders (epic #1703, decision 5). */
|
|
104
|
+
function receiptRowValue(receipt) {
|
|
105
|
+
if (receipt.flavor === "hash" && referenceInputPaths(receipt).length > 0) {
|
|
106
|
+
return RECEIPT_UNRESOLVED_VALUE_NOTE;
|
|
107
|
+
}
|
|
108
|
+
return receiptExpectation(receipt);
|
|
109
|
+
}
|
|
110
|
+
/**
|
|
111
|
+
* Render the effect receipts (#1835) the build withheld from the apply-bound
|
|
112
|
+
* entity set (`SerializeContext.receipts`, #1832) as `AWS::SSM::Parameter`
|
|
113
|
+
* rows: plain `String`, named `/chant-receipts/<stack>/<env>/<effect>` from
|
|
114
|
+
* the resolved ownership marker (epic decision 4 — the same fields that stamp
|
|
115
|
+
* tags), carrying the ownership tags. Visibility only: the rows go under the
|
|
116
|
+
* template's `Metadata`, and the receipt store (./receipt-store.ts) is what
|
|
117
|
+
* actually writes the parameter — through the `effect()` step, on success,
|
|
118
|
+
* last.
|
|
119
|
+
*
|
|
120
|
+
* The env segment is explicit: a receipt with no resolved `ownership.env` is
|
|
121
|
+
* an error here, never a guessed path.
|
|
122
|
+
*/
|
|
123
|
+
function renderReceiptRows(receipts, ownership) {
|
|
124
|
+
const rows = {};
|
|
125
|
+
const names = [...receipts.keys()].join(", ");
|
|
126
|
+
if (!ownership) {
|
|
127
|
+
throw new Error(`aws receipts (${names}): no ownership marker resolved — the receipt path is ` +
|
|
128
|
+
`/chant-receipts/<stack>/<env>/<effect>, derived from the same ownership fields that ` +
|
|
129
|
+
`stamp markers (chant #1703, decision 4). Set ownership: { stack, env } in chant.config.ts.`);
|
|
130
|
+
}
|
|
131
|
+
if (!ownership.env) {
|
|
132
|
+
throw new Error(`aws receipts (${names}): ownership resolved no env — the receipt path's <env> segment is ` +
|
|
133
|
+
`explicit (chant #1703, decision 4). Set ownership.env in chant.config.ts (a literal, or ` +
|
|
134
|
+
`{ param: "env" } with --param env=<name>).`);
|
|
135
|
+
}
|
|
136
|
+
const tags = Object.entries(ownershipEntries(AWS_TAG_OWNERSHIP_KEYS, ownership)).map(([Key, Value]) => ({ Key, Value }));
|
|
137
|
+
for (const [name, entity] of receipts) {
|
|
138
|
+
if (!isEffectReceipt(entity))
|
|
139
|
+
continue;
|
|
140
|
+
rows[name] = {
|
|
141
|
+
Type: AWS_EFFECT_RECEIPT_ENTITY_TYPE,
|
|
142
|
+
Properties: {
|
|
143
|
+
Name: receiptParameterName(ownership.stack, ownership.env, entity.effect),
|
|
144
|
+
Type: "String",
|
|
145
|
+
Value: receiptRowValue(entity),
|
|
146
|
+
Tags: tags,
|
|
147
|
+
},
|
|
148
|
+
};
|
|
149
|
+
}
|
|
150
|
+
return rows;
|
|
151
|
+
}
|
|
152
|
+
/**
|
|
153
|
+
* Serialize a set of entities into a CFTemplate object (without JSON.stringify).
|
|
154
|
+
*/
|
|
155
|
+
function serializeToTemplate(entities, outputs, extraParameters, extraOutputs, ownership, receiptRows) {
|
|
156
|
+
const template = {
|
|
157
|
+
AWSTemplateFormatVersion: "2010-09-09",
|
|
158
|
+
Resources: {},
|
|
159
|
+
};
|
|
160
|
+
// Add extra parameters (e.g. TemplateBasePath)
|
|
161
|
+
if (extraParameters && Object.keys(extraParameters).length > 0) {
|
|
162
|
+
template.Parameters = { ...extraParameters };
|
|
163
|
+
}
|
|
164
|
+
// Build reverse map: entity -> name
|
|
165
|
+
const entityNames = new Map();
|
|
166
|
+
for (const [name, entity] of entities) {
|
|
167
|
+
entityNames.set(entity, name);
|
|
168
|
+
}
|
|
169
|
+
// Collect default tags. The ownership marker is stamped as tags, seeded
|
|
170
|
+
// first so user default tags (and explicit per-resource tags) take precedence
|
|
171
|
+
// on key collisions.
|
|
172
|
+
const defaultTagEntries = [];
|
|
173
|
+
if (ownership) {
|
|
174
|
+
for (const [Key, Value] of Object.entries(ownershipEntries(AWS_TAG_OWNERSHIP_KEYS, ownership))) {
|
|
175
|
+
defaultTagEntries.push({ Key, Value });
|
|
176
|
+
}
|
|
177
|
+
// Also carry the marker at the template level (#1222): stack tags are a
|
|
178
|
+
// CreateStack/UpdateStack API parameter, not a template section, so the
|
|
179
|
+
// apply paths read this Metadata block and stamp it as the stack's own
|
|
180
|
+
// tags — what stack-level teardown verifies ownership on.
|
|
181
|
+
template.Metadata = {
|
|
182
|
+
[OWNERSHIP_METADATA_KEY]: ownershipEntries(AWS_TAG_OWNERSHIP_KEYS, ownership),
|
|
183
|
+
};
|
|
184
|
+
}
|
|
185
|
+
// Effect receipt rows (#1835) — visibility only, deliberately outside
|
|
186
|
+
// `Resources`: the applier's desired and prune sets both read `Resources`,
|
|
187
|
+
// and the `effect()` step is a receipt's sole writer (#1832, epic #1703
|
|
188
|
+
// decision 3). The observation leg (plugin.ts) reads the paths back from
|
|
189
|
+
// this block, so the identity is derived exactly once, here.
|
|
190
|
+
if (receiptRows && Object.keys(receiptRows).length > 0) {
|
|
191
|
+
template.Metadata = { ...(template.Metadata ?? {}), [EFFECT_RECEIPTS_METADATA_KEY]: receiptRows };
|
|
192
|
+
}
|
|
193
|
+
for (const [, entity] of entities) {
|
|
194
|
+
if (isDefaultTags(entity)) {
|
|
195
|
+
defaultTagEntries.push(...entity.tags);
|
|
196
|
+
}
|
|
197
|
+
}
|
|
198
|
+
// Collect top-level Transform macros (e.g. AWS::SecretsManager-2020-07-23),
|
|
199
|
+
// de-duplicated in declaration order. One → a string, several → a list,
|
|
200
|
+
// matching CloudFormation's own `Transform` shape.
|
|
201
|
+
const transforms = [];
|
|
202
|
+
for (const [, entity] of entities) {
|
|
203
|
+
if (isTemplateTransform(entity) && !transforms.includes(entity.transform)) {
|
|
204
|
+
transforms.push(entity.transform);
|
|
205
|
+
}
|
|
206
|
+
}
|
|
207
|
+
if (transforms.length === 1) {
|
|
208
|
+
template.Transform = transforms[0];
|
|
209
|
+
}
|
|
210
|
+
else if (transforms.length > 1) {
|
|
211
|
+
template.Transform = transforms;
|
|
212
|
+
}
|
|
213
|
+
// Template-level Description and Metadata declarations. Declared Metadata
|
|
214
|
+
// keys come first; the ownership marker and receipt rows written above are
|
|
215
|
+
// chant's own and win on a key collision.
|
|
216
|
+
const declaredMetadata = {};
|
|
217
|
+
for (const [, entity] of entities) {
|
|
218
|
+
if (!isTemplateSection(entity))
|
|
219
|
+
continue;
|
|
220
|
+
if (entity.section === "Description") {
|
|
221
|
+
template.Description = entity.value;
|
|
222
|
+
}
|
|
223
|
+
else {
|
|
224
|
+
Object.assign(declaredMetadata, toCFValue(entity.value, entityNames));
|
|
225
|
+
}
|
|
226
|
+
}
|
|
227
|
+
if (Object.keys(declaredMetadata).length > 0) {
|
|
228
|
+
template.Metadata = { ...declaredMetadata, ...(template.Metadata ?? {}) };
|
|
229
|
+
}
|
|
230
|
+
// Process entities
|
|
231
|
+
for (const [name, entity] of entities) {
|
|
232
|
+
// Skip StackOutput entities — they go in the Outputs section
|
|
233
|
+
if (isStackOutput(entity)) {
|
|
234
|
+
continue;
|
|
235
|
+
}
|
|
236
|
+
// Skip DefaultTags entities — handled via tag injection below
|
|
237
|
+
if (isDefaultTags(entity)) {
|
|
238
|
+
continue;
|
|
239
|
+
}
|
|
240
|
+
// Skip TemplateTransform entities — lifted to the top-level Transform above
|
|
241
|
+
if (isTemplateTransform(entity) || isTemplateSection(entity)) {
|
|
242
|
+
continue;
|
|
243
|
+
}
|
|
244
|
+
if (isCoreParameter(entity)) {
|
|
245
|
+
if (!template.Parameters) {
|
|
246
|
+
template.Parameters = {};
|
|
247
|
+
}
|
|
248
|
+
const param = {
|
|
249
|
+
Type: entity.parameterType,
|
|
250
|
+
};
|
|
251
|
+
if ("description" in entity && typeof entity.description === "string") {
|
|
252
|
+
param.Description = entity.description;
|
|
253
|
+
}
|
|
254
|
+
if ("defaultValue" in entity && entity.defaultValue !== undefined) {
|
|
255
|
+
param.Default = entity.defaultValue;
|
|
256
|
+
}
|
|
257
|
+
const constraints = entity.constraints;
|
|
258
|
+
if (constraints) {
|
|
259
|
+
for (const [option, key] of PARAMETER_CONSTRAINT_KEYS) {
|
|
260
|
+
if (constraints[option] !== undefined)
|
|
261
|
+
param[key] = constraints[option];
|
|
262
|
+
}
|
|
263
|
+
}
|
|
264
|
+
template.Parameters[name] = param;
|
|
265
|
+
}
|
|
266
|
+
else if (isMapping(entity)) {
|
|
267
|
+
// Mapping declarable -> Mappings section, read with FindInMap.
|
|
268
|
+
if (!template.Mappings) {
|
|
269
|
+
template.Mappings = {};
|
|
270
|
+
}
|
|
271
|
+
template.Mappings[entity.name ?? name] = toCFValue(entity.map, entityNames);
|
|
272
|
+
}
|
|
273
|
+
else if (isCondition(entity)) {
|
|
274
|
+
// Condition declarable → Conditions section (#2068), lifted the way
|
|
275
|
+
// Parameter is lifted into Parameters above.
|
|
276
|
+
if (!template.Conditions) {
|
|
277
|
+
template.Conditions = {};
|
|
278
|
+
}
|
|
279
|
+
template.Conditions[entity.name ?? name] = toCFValue(entity.expression, entityNames);
|
|
280
|
+
}
|
|
281
|
+
else if (isChildProject(entity)) {
|
|
282
|
+
// ChildProjectInstance → AWS::CloudFormation::Stack resource
|
|
283
|
+
const childProject = entity;
|
|
284
|
+
const childName = childProject.logicalName;
|
|
285
|
+
const filename = `${childName}.template.json`;
|
|
286
|
+
const properties = {
|
|
287
|
+
TemplateURL: {
|
|
288
|
+
"Fn::Sub": `\${TemplateBasePath}/${filename}`,
|
|
289
|
+
},
|
|
290
|
+
};
|
|
291
|
+
// Build parameters: always pass TemplateBasePath down
|
|
292
|
+
const parameters = {
|
|
293
|
+
TemplateBasePath: { Ref: "TemplateBasePath" },
|
|
294
|
+
};
|
|
295
|
+
// Add user-specified parameters
|
|
296
|
+
const opts = childProject.options;
|
|
297
|
+
if (opts.parameters) {
|
|
298
|
+
for (const [key, value] of Object.entries(opts.parameters)) {
|
|
299
|
+
parameters[key] = value;
|
|
300
|
+
}
|
|
301
|
+
}
|
|
302
|
+
properties.Parameters = parameters;
|
|
303
|
+
template.Resources[name] = {
|
|
304
|
+
Type: "AWS::CloudFormation::Stack",
|
|
305
|
+
Properties: properties,
|
|
306
|
+
};
|
|
307
|
+
}
|
|
308
|
+
else if (!isPropertyDeclarable(entity)) {
|
|
309
|
+
const resource = {
|
|
310
|
+
Type: entity.entityType,
|
|
311
|
+
};
|
|
312
|
+
// Read resource-level attributes from the second constructor arg
|
|
313
|
+
const attrs = (isResourceDeclarable(entity) && typeof entity.attributes === "object" && entity.attributes !== null)
|
|
314
|
+
? entity.attributes
|
|
315
|
+
: undefined;
|
|
316
|
+
if (attrs) {
|
|
317
|
+
// DependsOn — resolve Declarable refs to logical names
|
|
318
|
+
if (attrs.DependsOn !== undefined) {
|
|
319
|
+
const resolved = resolveDependsOn(attrs.DependsOn, entityNames, name);
|
|
320
|
+
if (resolved.length > 0) {
|
|
321
|
+
resource.DependsOn = resolved.length === 1 ? resolved[0] : resolved;
|
|
322
|
+
}
|
|
323
|
+
}
|
|
324
|
+
// Pass-through attributes. Condition accepts the Condition declarable
|
|
325
|
+
// as well as a name string (#2068).
|
|
326
|
+
if (attrs.Condition) {
|
|
327
|
+
resource.Condition = isCondition(attrs.Condition)
|
|
328
|
+
? conditionName(attrs.Condition, entityNames)
|
|
329
|
+
: attrs.Condition;
|
|
330
|
+
}
|
|
331
|
+
if (attrs.DeletionPolicy)
|
|
332
|
+
resource.DeletionPolicy = attrs.DeletionPolicy;
|
|
333
|
+
if (attrs.UpdateReplacePolicy)
|
|
334
|
+
resource.UpdateReplacePolicy = attrs.UpdateReplacePolicy;
|
|
335
|
+
if (attrs.UpdatePolicy)
|
|
336
|
+
resource.UpdatePolicy = attrs.UpdatePolicy;
|
|
337
|
+
if (attrs.CreationPolicy)
|
|
338
|
+
resource.CreationPolicy = attrs.CreationPolicy;
|
|
339
|
+
if (attrs.Metadata)
|
|
340
|
+
resource.Metadata = toCFValue(attrs.Metadata, entityNames);
|
|
341
|
+
}
|
|
342
|
+
const properties = toProperties(entity, entityNames);
|
|
343
|
+
if (properties) {
|
|
344
|
+
if (Object.keys(properties).length > 0) {
|
|
345
|
+
resource.Properties = properties;
|
|
346
|
+
}
|
|
347
|
+
}
|
|
348
|
+
template.Resources[name] = resource;
|
|
349
|
+
}
|
|
350
|
+
}
|
|
351
|
+
// Inject default tags into taggable resources
|
|
352
|
+
if (defaultTagEntries.length > 0) {
|
|
353
|
+
const taggable = loadTaggableResources();
|
|
354
|
+
for (const [, resource] of Object.entries(template.Resources)) {
|
|
355
|
+
if (!taggable.has(resource.Type))
|
|
356
|
+
continue;
|
|
357
|
+
const resolved = defaultTagEntries.map(t => ({
|
|
358
|
+
Key: t.Key,
|
|
359
|
+
Value: toCFValue(t.Value, entityNames),
|
|
360
|
+
}));
|
|
361
|
+
const explicit = (resource.Properties?.Tags ?? []);
|
|
362
|
+
const explicitKeys = new Set(explicit.map(t => t.Key));
|
|
363
|
+
const merged = [...resolved.filter(t => !explicitKeys.has(t.Key)), ...explicit];
|
|
364
|
+
if (!resource.Properties)
|
|
365
|
+
resource.Properties = {};
|
|
366
|
+
resource.Properties.Tags = merged;
|
|
367
|
+
}
|
|
368
|
+
}
|
|
369
|
+
// Emit StackOutput entities as CF Outputs
|
|
370
|
+
for (const [name, entity] of entities) {
|
|
371
|
+
if (isStackOutput(entity)) {
|
|
372
|
+
if (!template.Outputs) {
|
|
373
|
+
template.Outputs = {};
|
|
374
|
+
}
|
|
375
|
+
const stackOutput = entity;
|
|
376
|
+
// Typed `unknown` so `isAttrRefLike` narrows cleanly regardless of how the
|
|
377
|
+
// AttrRef type resolves across the workspace/published boundary.
|
|
378
|
+
const ref = stackOutput.sourceRef;
|
|
379
|
+
let value;
|
|
380
|
+
if (typeof ref === "string") {
|
|
381
|
+
// Literal output (constants a stack publishes, e.g. a port number).
|
|
382
|
+
value = ref;
|
|
383
|
+
}
|
|
384
|
+
else if (isAttrRefLike(ref)) {
|
|
385
|
+
const logicalName = ref.getLogicalName();
|
|
386
|
+
if (!logicalName)
|
|
387
|
+
continue;
|
|
388
|
+
// Use Ref for primary identifier ("Id") since not all resources
|
|
389
|
+
// support Fn::GetAtt for their primary identifier (e.g. ACM Certificate).
|
|
390
|
+
// Ref always returns the primary identifier for any CF resource.
|
|
391
|
+
value = ref.attribute === "Id" ? { Ref: logicalName } : { "Fn::GetAtt": [logicalName, ref.attribute] };
|
|
392
|
+
}
|
|
393
|
+
else {
|
|
394
|
+
// An intrinsic wrapping refs (e.g. Join(",", zone.NameServers), #517):
|
|
395
|
+
// resolve the nested AttrRefs' logical names from the entity map, then
|
|
396
|
+
// serialize through the CF walker → {Fn::Join:[",",{Fn::GetAtt:[…]}]}.
|
|
397
|
+
resolveNestedAttrRefs(ref, entityNames);
|
|
398
|
+
value = toCFValue(ref, entityNames);
|
|
399
|
+
}
|
|
400
|
+
const output = { Value: value };
|
|
401
|
+
if (stackOutput.description) {
|
|
402
|
+
output.Description = stackOutput.description;
|
|
403
|
+
}
|
|
404
|
+
// Read defensively: a project may pair this lexicon with an older
|
|
405
|
+
// published core whose StackOutput type predates exportName.
|
|
406
|
+
const exportName = stackOutput.exportName;
|
|
407
|
+
if (exportName) {
|
|
408
|
+
output.Export = { Name: exportName };
|
|
409
|
+
}
|
|
410
|
+
// Same defensive read: condition (#2068/#2069) postdates older cores.
|
|
411
|
+
const condition = stackOutput.condition;
|
|
412
|
+
if (condition) {
|
|
413
|
+
output.Condition = isCondition(condition)
|
|
414
|
+
? conditionName(condition, entityNames)
|
|
415
|
+
: condition;
|
|
416
|
+
}
|
|
417
|
+
// Read defensively, like exportName: the name option postdates older cores.
|
|
418
|
+
template.Outputs[stackOutput.name ?? name] = output;
|
|
419
|
+
}
|
|
420
|
+
}
|
|
421
|
+
// Add CF Outputs for LexiconOutputs produced by this lexicon. Run the value
|
|
422
|
+
// through the CF walker so an AttrRef nested in an intrinsic (e.g.
|
|
423
|
+
// Join(",", [subnet1.SubnetId, …])) becomes Fn::GetAtt instead of leaking the
|
|
424
|
+
// generic `{__attrRef}` envelope — the same conversion resource Properties get
|
|
425
|
+
// (#935). A bare Fn::GetAtt value walks through unchanged.
|
|
426
|
+
if (outputs && outputs.length > 0) {
|
|
427
|
+
template.Outputs = template.Outputs ?? {};
|
|
428
|
+
for (const output of outputs) {
|
|
429
|
+
template.Outputs[output.outputName] = {
|
|
430
|
+
Value: toCFValue(output.getOutputValue(), entityNames),
|
|
431
|
+
};
|
|
432
|
+
}
|
|
433
|
+
}
|
|
434
|
+
// Add extra outputs (e.g. auto-wired cross-stack refs)
|
|
435
|
+
if (extraOutputs && Object.keys(extraOutputs).length > 0) {
|
|
436
|
+
template.Outputs = { ...template.Outputs, ...extraOutputs };
|
|
437
|
+
}
|
|
438
|
+
refuseImportEnvelopes(template);
|
|
439
|
+
return template;
|
|
440
|
+
}
|
|
441
|
+
/**
|
|
442
|
+
* Throw on an import IR envelope (`{ "__intrinsic": "FindInMap", ... }`) in
|
|
443
|
+
* the synthesized template. It is not CloudFormation, and a build that wrote
|
|
444
|
+
* one used to exit 0 with a template CloudFormation rejects.
|
|
445
|
+
*/
|
|
446
|
+
function refuseImportEnvelopes(value, path = []) {
|
|
447
|
+
if (value === null || typeof value !== "object")
|
|
448
|
+
return;
|
|
449
|
+
if (Array.isArray(value)) {
|
|
450
|
+
value.forEach((item, i) => refuseImportEnvelopes(item, [...path, String(i)]));
|
|
451
|
+
return;
|
|
452
|
+
}
|
|
453
|
+
const obj = value;
|
|
454
|
+
if (typeof obj.__intrinsic === "string") {
|
|
455
|
+
throw new Error(`${path.join(".")}: { __intrinsic: "${obj.__intrinsic}" } is an import envelope, not CloudFormation; ` +
|
|
456
|
+
`write the ${obj.__intrinsic} intrinsic instead`);
|
|
457
|
+
}
|
|
458
|
+
for (const [key, v] of Object.entries(obj))
|
|
459
|
+
refuseImportEnvelopes(v, [...path, key]);
|
|
460
|
+
}
|
|
461
|
+
/**
|
|
462
|
+
* AWS CloudFormation serializer implementation
|
|
463
|
+
*/
|
|
464
|
+
export const awsSerializer = {
|
|
465
|
+
name: "aws",
|
|
466
|
+
rulePrefix: "WAW",
|
|
467
|
+
serialize(entities, outputs, context) {
|
|
468
|
+
const ownership = context?.ownership;
|
|
469
|
+
// Effect receipts (#1835): withheld from `entities` by the build (#1832),
|
|
470
|
+
// rendered here as Metadata rows — never as `Resources` an applier would
|
|
471
|
+
// write. Env-less ownership is an error, not a guessed path segment.
|
|
472
|
+
const receiptRows = context?.receipts && context.receipts.size > 0
|
|
473
|
+
? renderReceiptRows(context.receipts, ownership)
|
|
474
|
+
: undefined;
|
|
475
|
+
// Check if any entities are child projects (nested stacks)
|
|
476
|
+
const childProjects = new Map();
|
|
477
|
+
let hasChildProjects = false;
|
|
478
|
+
for (const [name, entity] of entities) {
|
|
479
|
+
if (isChildProject(entity)) {
|
|
480
|
+
childProjects.set(name, entity);
|
|
481
|
+
hasChildProjects = true;
|
|
482
|
+
}
|
|
483
|
+
}
|
|
484
|
+
// No nested stacks — use the simple path
|
|
485
|
+
if (!hasChildProjects) {
|
|
486
|
+
const template = serializeToTemplate(entities, outputs, undefined, undefined, ownership, receiptRows);
|
|
487
|
+
return JSON.stringify(template, null, 2);
|
|
488
|
+
}
|
|
489
|
+
// Has child projects — produce multi-file output
|
|
490
|
+
const allFiles = {};
|
|
491
|
+
// Add TemplateBasePath parameter to the parent template
|
|
492
|
+
const parentParams = {
|
|
493
|
+
TemplateBasePath: {
|
|
494
|
+
Type: "String",
|
|
495
|
+
Default: ".",
|
|
496
|
+
Description: "Base URL/path for nested stack templates",
|
|
497
|
+
},
|
|
498
|
+
};
|
|
499
|
+
// Collect child template files from build results
|
|
500
|
+
for (const [, childProject] of childProjects) {
|
|
501
|
+
if (childProject.buildResult) {
|
|
502
|
+
const childOutput = childProject.buildResult.outputs.get("aws");
|
|
503
|
+
if (childOutput) {
|
|
504
|
+
const childName = childProject.logicalName;
|
|
505
|
+
const filename = `${childName}.template.json`;
|
|
506
|
+
if (typeof childOutput === "string") {
|
|
507
|
+
allFiles[filename] = childOutput;
|
|
508
|
+
}
|
|
509
|
+
else {
|
|
510
|
+
// SerializerResult — the child itself has child templates
|
|
511
|
+
allFiles[filename] = childOutput.primary;
|
|
512
|
+
if (childOutput.files) {
|
|
513
|
+
for (const [childFile, content] of Object.entries(childOutput.files)) {
|
|
514
|
+
allFiles[childFile] = content;
|
|
515
|
+
}
|
|
516
|
+
}
|
|
517
|
+
}
|
|
518
|
+
}
|
|
519
|
+
}
|
|
520
|
+
}
|
|
521
|
+
// Serialize the parent template (ChildProjectInstance entities become CF::Stack resources)
|
|
522
|
+
const parentTemplate = serializeToTemplate(entities, outputs, parentParams, undefined, ownership, receiptRows);
|
|
523
|
+
const primary = JSON.stringify(parentTemplate, null, 2);
|
|
524
|
+
return {
|
|
525
|
+
primary,
|
|
526
|
+
files: allFiles,
|
|
527
|
+
};
|
|
528
|
+
},
|
|
529
|
+
};
|