@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,136 @@
|
|
|
1
|
+
import { describe, expect, test } from "vitest";
|
|
2
|
+
import {
|
|
3
|
+
clusterOfServiceArn,
|
|
4
|
+
ecsServiceEntry,
|
|
5
|
+
healthCheckEntry,
|
|
6
|
+
observeHealthAws,
|
|
7
|
+
parseHealthCheckStatus,
|
|
8
|
+
type AwsHealthHttp,
|
|
9
|
+
} from "./health";
|
|
10
|
+
import type { AwsReadHttp } from "./api/read-client";
|
|
11
|
+
import { awsPlugin } from "./plugin";
|
|
12
|
+
|
|
13
|
+
const AT = "2026-10-20T21:00:00.000Z";
|
|
14
|
+
const now = () => new Date(AT);
|
|
15
|
+
|
|
16
|
+
function stackXml(members: Array<{ logical: string; type: string; physical: string }>): string {
|
|
17
|
+
const body = members
|
|
18
|
+
.map((m) => `<member><LogicalResourceId>${m.logical}</LogicalResourceId><ResourceType>${m.type}</ResourceType><PhysicalResourceId>${m.physical}</PhysicalResourceId><ResourceStatus>CREATE_COMPLETE</ResourceStatus></member>`)
|
|
19
|
+
.join("");
|
|
20
|
+
return `<DescribeStackResourcesResponse><DescribeStackResourcesResult><StackResources>${body}</StackResources></DescribeStackResourcesResult></DescribeStackResourcesResponse>`;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
function statusXml(obs: Array<{ region: string; status: string; time: string }>): string {
|
|
24
|
+
const body = obs
|
|
25
|
+
.map((o) => `<HealthCheckObservation><Region>${o.region}</Region><IPAddress>1.2.3.4</IPAddress><StatusReport><Status>${o.status}</Status><CheckedTime>${o.time}</CheckedTime></StatusReport></HealthCheckObservation>`)
|
|
26
|
+
.join("");
|
|
27
|
+
return `<GetHealthCheckStatusResponse><HealthCheckObservations>${body}</HealthCheckObservations></GetHealthCheckStatusResponse>`;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
const ENV = { AWS_ENDPOINT_URL: "http://localhost:4566" };
|
|
31
|
+
|
|
32
|
+
describe("aws health (#4177)", () => {
|
|
33
|
+
test("parses checker observations", () => {
|
|
34
|
+
const obs = parseHealthCheckStatus(statusXml([{ region: "us-east-1", status: "Success: HTTP Status Code 200, OK", time: "2026-10-20T20:59:00Z" }]));
|
|
35
|
+
expect(obs).toEqual([{ region: "us-east-1", ipAddress: "1.2.3.4", status: "Success: HTTP Status Code 200, OK", checkedTime: "2026-10-20T20:59:00Z" }]);
|
|
36
|
+
});
|
|
37
|
+
|
|
38
|
+
test("a health check is healthy only when more than 18% of checkers say so", () => {
|
|
39
|
+
const mk = (ok: number, total: number) =>
|
|
40
|
+
Array.from({ length: total }, (_, i) => ({ status: i < ok ? "Success: HTTP 200" : "Failure: timed out", checkedTime: `2026-10-20T20:5${i}:00Z` }));
|
|
41
|
+
expect(healthCheckEntry(mk(2, 10), AT).state).toBe("healthy");
|
|
42
|
+
expect(healthCheckEntry(mk(1, 10), AT).state).toBe("unhealthy");
|
|
43
|
+
const e = healthCheckEntry(mk(2, 10), AT);
|
|
44
|
+
expect(e.detail).toBe("2/10 checkers healthy; last: Failure: timed out");
|
|
45
|
+
expect(e.checkedAt).toBe("2026-10-20T20:59:00Z");
|
|
46
|
+
expect(healthCheckEntry([], AT).state).toBe("unknown");
|
|
47
|
+
});
|
|
48
|
+
|
|
49
|
+
test("an ECS service is running against desired", () => {
|
|
50
|
+
expect(ecsServiceEntry({ status: "ACTIVE", desiredCount: 2, runningCount: 2 }, AT)).toMatchObject({ state: "healthy", detail: "2/2 running" });
|
|
51
|
+
expect(ecsServiceEntry({ status: "ACTIVE", desiredCount: 3, runningCount: 1, pendingCount: 2 }, AT)).toMatchObject({ state: "unhealthy", detail: "1/3 running, 2 pending" });
|
|
52
|
+
expect(ecsServiceEntry({ status: "ACTIVE", desiredCount: 0, runningCount: 0 }, AT).state).toBe("unknown");
|
|
53
|
+
expect(ecsServiceEntry({ status: "DRAINING", desiredCount: 1, runningCount: 1 }, AT).state).toBe("unhealthy");
|
|
54
|
+
});
|
|
55
|
+
|
|
56
|
+
test("the cluster comes from the service ARN", () => {
|
|
57
|
+
expect(clusterOfServiceArn("arn:aws:ecs:us-east-1:000000000000:service/app/web")).toBe("app");
|
|
58
|
+
expect(clusterOfServiceArn("arn:aws:ecs:us-east-1:000000000000:service/web")).toBe("default");
|
|
59
|
+
});
|
|
60
|
+
|
|
61
|
+
test("reads both kinds through the endpoint override, keyed by logical id", async () => {
|
|
62
|
+
const cfn: AwsReadHttp = async (url) => {
|
|
63
|
+
expect(url).toBe("http://localhost:4566/");
|
|
64
|
+
return {
|
|
65
|
+
status: 200,
|
|
66
|
+
text: stackXml([
|
|
67
|
+
{ logical: "web", type: "AWS::ECS::Service", physical: "arn:aws:ecs:us-east-1:000000000000:service/app/web" },
|
|
68
|
+
{ logical: "webCheck", type: "AWS::Route53::HealthCheck", physical: "abc-123" },
|
|
69
|
+
]),
|
|
70
|
+
};
|
|
71
|
+
};
|
|
72
|
+
const calls: string[] = [];
|
|
73
|
+
const http: AwsHealthHttp = async (method, url, init) => {
|
|
74
|
+
calls.push(`${method} ${url}`);
|
|
75
|
+
if (url.includes("/healthcheck/")) {
|
|
76
|
+
return { status: 200, text: statusXml([{ region: "us-east-1", status: "Success: HTTP 200", time: "2026-10-20T20:58:00Z" }]) };
|
|
77
|
+
}
|
|
78
|
+
expect(JSON.parse(init.body!)).toEqual({ cluster: "app", services: ["arn:aws:ecs:us-east-1:000000000000:service/app/web"] });
|
|
79
|
+
return {
|
|
80
|
+
status: 200,
|
|
81
|
+
text: JSON.stringify({ services: [{ serviceArn: "arn:aws:ecs:us-east-1:000000000000:service/app/web", status: "ACTIVE", desiredCount: 2, runningCount: 2 }], failures: [] }),
|
|
82
|
+
};
|
|
83
|
+
};
|
|
84
|
+
const r = await observeHealthAws({
|
|
85
|
+
environment: "dev",
|
|
86
|
+
buildOutput: "",
|
|
87
|
+
entities: new Map([
|
|
88
|
+
["web", { entityType: "AWS::ECS::Service", props: {} }],
|
|
89
|
+
["webCheck", { entityType: "AWS::Route53::HealthCheck", props: {} }],
|
|
90
|
+
["later", { entityType: "AWS::ECS::Service", props: {} }],
|
|
91
|
+
]),
|
|
92
|
+
http,
|
|
93
|
+
client: { http: cfn, env: ENV },
|
|
94
|
+
now,
|
|
95
|
+
});
|
|
96
|
+
expect(r.entities.web).toMatchObject({ state: "healthy", observedAt: AT });
|
|
97
|
+
expect(r.entities.webCheck).toMatchObject({ state: "healthy", checkedAt: "2026-10-20T20:58:00Z" });
|
|
98
|
+
expect(r.absent).toEqual(["later"]);
|
|
99
|
+
expect(calls).toContain("GET http://localhost:4566/2013-04-01/healthcheck/abc-123/status");
|
|
100
|
+
});
|
|
101
|
+
|
|
102
|
+
test("a missing stack is absent; a failed stack read is a hole for every entity", async () => {
|
|
103
|
+
const entities = new Map([["web", { entityType: "AWS::ECS::Service", props: {} }]]);
|
|
104
|
+
const missing: AwsReadHttp = async () => ({
|
|
105
|
+
status: 400,
|
|
106
|
+
text: "<ErrorResponse><Error><Code>ValidationError</Code><Message>Stack with id dev does not exist</Message></Error></ErrorResponse>",
|
|
107
|
+
});
|
|
108
|
+
const gone = await observeHealthAws({ environment: "dev", buildOutput: "", entities, client: { http: missing, env: ENV } });
|
|
109
|
+
expect(gone.absent).toEqual(["web"]);
|
|
110
|
+
|
|
111
|
+
const broken: AwsReadHttp = async () => {
|
|
112
|
+
throw new Error("connect ECONNREFUSED");
|
|
113
|
+
};
|
|
114
|
+
const hole = await observeHealthAws({ environment: "dev", buildOutput: "", entities, client: { http: broken, env: ENV } });
|
|
115
|
+
expect(hole.entities).toEqual({});
|
|
116
|
+
expect(hole.unobserved.web?.reason).toBe("read-failed");
|
|
117
|
+
});
|
|
118
|
+
|
|
119
|
+
test("a failed service read is a hole, never unhealthy", async () => {
|
|
120
|
+
const cfn: AwsReadHttp = async () => ({ status: 200, text: stackXml([{ logical: "web", type: "AWS::ECS::Service", physical: "arn:aws:ecs:us-east-1:0:service/app/web" }]) });
|
|
121
|
+
const http: AwsHealthHttp = async () => ({ status: 400, text: JSON.stringify({ __type: "ClusterNotFoundException", message: "Cluster not found." }) });
|
|
122
|
+
const r = await observeHealthAws({
|
|
123
|
+
environment: "dev",
|
|
124
|
+
buildOutput: "",
|
|
125
|
+
entities: new Map([["web", { entityType: "AWS::ECS::Service", props: {} }]]),
|
|
126
|
+
http,
|
|
127
|
+
client: { http: cfn, env: ENV },
|
|
128
|
+
});
|
|
129
|
+
expect(r.unobserved.web).toMatchObject({ reason: "read-failed", detail: "ClusterNotFoundException: Cluster not found." });
|
|
130
|
+
});
|
|
131
|
+
|
|
132
|
+
test("the plugin names the types it reads", () => {
|
|
133
|
+
expect(awsPlugin.healthTypes).toEqual(["AWS::Route53::HealthCheck", "AWS::ECS::Service"]);
|
|
134
|
+
expect(typeof awsPlugin.observeHealth).toBe("function");
|
|
135
|
+
});
|
|
136
|
+
});
|
package/src/health.ts
ADDED
|
@@ -0,0 +1,281 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Runtime health for AWS (#4177): Route 53 health checks and ECS services.
|
|
3
|
+
*
|
|
4
|
+
* The stack's own resource list maps each logical id (the graph's node id) to
|
|
5
|
+
* the physical id the health APIs take. A stack that does not exist yet means
|
|
6
|
+
* nothing is deployed, so every entity is absent. Any other stack failure is a
|
|
7
|
+
* hole for every entity, never `unhealthy`.
|
|
8
|
+
*
|
|
9
|
+
* - `AWS::Route53::HealthCheck`: `GetHealthCheckStatus`, aggregated as Route 53
|
|
10
|
+
* does: healthy when more than 18% of the checkers report healthy.
|
|
11
|
+
* - `AWS::ECS::Service`: `DescribeServices`, `runningCount` against
|
|
12
|
+
* `desiredCount`.
|
|
13
|
+
*
|
|
14
|
+
* Both go through the read transport's endpoint rule, so `AWS_ENDPOINT_URL`
|
|
15
|
+
* (Floci) answers them.
|
|
16
|
+
*/
|
|
17
|
+
|
|
18
|
+
import type { HealthEntry, HealthReadOptions, HealthReadResult, UnobservedEntity } from "@intentius/chant/lexicon";
|
|
19
|
+
import {
|
|
20
|
+
AwsReadError,
|
|
21
|
+
describeStackResources,
|
|
22
|
+
requestHeaders,
|
|
23
|
+
serviceUrl,
|
|
24
|
+
withChainCredentials,
|
|
25
|
+
withEndpointOverride,
|
|
26
|
+
xmlError,
|
|
27
|
+
xmlLeaves,
|
|
28
|
+
type AwsReadClientOptions,
|
|
29
|
+
} from "./api/read-client";
|
|
30
|
+
import { resolveCredentials, signRequest } from "./api/sigv4";
|
|
31
|
+
import { stackDoesNotExist } from "./stack-errors";
|
|
32
|
+
|
|
33
|
+
export const AWS_HEALTH_TYPES = ["AWS::Route53::HealthCheck", "AWS::ECS::Service"] as const;
|
|
34
|
+
|
|
35
|
+
/** Injectable HTTP for both calls, so tests never reach the network. */
|
|
36
|
+
export type AwsHealthHttp = (
|
|
37
|
+
method: "GET" | "POST",
|
|
38
|
+
url: string,
|
|
39
|
+
init: { headers: Record<string, string>; body?: string },
|
|
40
|
+
) => Promise<{ status: number; text: string }>;
|
|
41
|
+
|
|
42
|
+
const defaultHttp: AwsHealthHttp = async (method, url, init) => {
|
|
43
|
+
const res = await fetch(url, { method, headers: init.headers, ...(init.body !== undefined ? { body: init.body } : {}) });
|
|
44
|
+
return { status: res.status, text: await res.text() };
|
|
45
|
+
};
|
|
46
|
+
|
|
47
|
+
export interface AwsHealthOptions extends HealthReadOptions {
|
|
48
|
+
http?: AwsHealthHttp;
|
|
49
|
+
/** Read client for the stack list and the signing decision. Tests inject `http` and `env` here. */
|
|
50
|
+
client?: AwsReadClientOptions;
|
|
51
|
+
now?: () => Date;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
/** Route 53 treats an endpoint as healthy when more than this share of checkers says so. */
|
|
55
|
+
const ROUTE53_HEALTHY_SHARE = 0.18;
|
|
56
|
+
|
|
57
|
+
/** One checker's report, as `GetHealthCheckStatus` returns it. */
|
|
58
|
+
export interface CheckerObservation {
|
|
59
|
+
region?: string;
|
|
60
|
+
ipAddress?: string;
|
|
61
|
+
status: string;
|
|
62
|
+
checkedTime?: string;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
/** Parse `GetHealthCheckStatusResponse`'s observations. */
|
|
66
|
+
export function parseHealthCheckStatus(xml: string): CheckerObservation[] {
|
|
67
|
+
const out: CheckerObservation[] = [];
|
|
68
|
+
for (const m of xml.matchAll(/<HealthCheckObservation>([\s\S]*?)<\/HealthCheckObservation>/g)) {
|
|
69
|
+
const body = m[1] ?? "";
|
|
70
|
+
const report = xmlLeaves(body.match(/<StatusReport>([\s\S]*?)<\/StatusReport>/)?.[1] ?? "");
|
|
71
|
+
const top = xmlLeaves(body.replace(/<StatusReport>[\s\S]*?<\/StatusReport>/, ""));
|
|
72
|
+
out.push({
|
|
73
|
+
...(top.Region ? { region: top.Region } : {}),
|
|
74
|
+
...(top.IPAddress ? { ipAddress: top.IPAddress } : {}),
|
|
75
|
+
status: report.Status ?? "",
|
|
76
|
+
...(report.CheckedTime ? { checkedTime: report.CheckedTime } : {}),
|
|
77
|
+
});
|
|
78
|
+
}
|
|
79
|
+
return out;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
/** A checker's status text starts with `Success` when it found the endpoint healthy. */
|
|
83
|
+
function checkerHealthy(o: CheckerObservation): boolean {
|
|
84
|
+
return /^success/i.test(o.status.trim());
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
/** Route 53's verdict over its checkers' observations. */
|
|
88
|
+
export function healthCheckEntry(observations: CheckerObservation[], observedAt: string): HealthEntry {
|
|
89
|
+
const type = "AWS::Route53::HealthCheck";
|
|
90
|
+
if (observations.length === 0) {
|
|
91
|
+
return { type, state: "unknown", detail: "no checker has reported yet", observedAt };
|
|
92
|
+
}
|
|
93
|
+
const healthy = observations.filter(checkerHealthy).length;
|
|
94
|
+
const latest = [...observations].sort((a, b) => (b.checkedTime ?? "").localeCompare(a.checkedTime ?? ""))[0]!;
|
|
95
|
+
const state = healthy / observations.length > ROUTE53_HEALTHY_SHARE ? "healthy" : "unhealthy";
|
|
96
|
+
return {
|
|
97
|
+
type,
|
|
98
|
+
state,
|
|
99
|
+
detail: `${healthy}/${observations.length} checkers healthy; last: ${latest.status}`,
|
|
100
|
+
observedAt,
|
|
101
|
+
...(latest.checkedTime ? { checkedAt: latest.checkedTime } : {}),
|
|
102
|
+
};
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
/** The parts of an ECS service `DescribeServices` returns that decide health. */
|
|
106
|
+
export interface EcsServiceState {
|
|
107
|
+
status?: string;
|
|
108
|
+
desiredCount?: number;
|
|
109
|
+
runningCount?: number;
|
|
110
|
+
pendingCount?: number;
|
|
111
|
+
deployments?: Array<{ rolloutState?: string; updatedAt?: number | string }>;
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
/** Running against desired. Scaled to zero is `unknown`: nothing is serving, by choice. */
|
|
115
|
+
export function ecsServiceEntry(service: EcsServiceState, observedAt: string): HealthEntry {
|
|
116
|
+
const type = "AWS::ECS::Service";
|
|
117
|
+
const desired = service.desiredCount ?? 0;
|
|
118
|
+
const running = service.runningCount ?? 0;
|
|
119
|
+
const pending = service.pendingCount ?? 0;
|
|
120
|
+
const counts = `${running}/${desired} running${pending > 0 ? `, ${pending} pending` : ""}`;
|
|
121
|
+
const rollout = service.deployments?.find((d) => d.rolloutState)?.rolloutState;
|
|
122
|
+
const detail = `${counts}${rollout ? `, rollout ${rollout}` : ""}`;
|
|
123
|
+
if (service.status && service.status !== "ACTIVE") {
|
|
124
|
+
return { type, state: "unhealthy", detail: `service is ${service.status}; ${detail}`, observedAt };
|
|
125
|
+
}
|
|
126
|
+
if (desired === 0) return { type, state: "unknown", detail: `desired count is 0; ${detail}`, observedAt };
|
|
127
|
+
return { type, state: running >= desired ? "healthy" : "unhealthy", detail, observedAt };
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
/** The cluster a service ARN names: `service/<cluster>/<name>`, or the default cluster for the old `service/<name>` form. */
|
|
131
|
+
export function clusterOfServiceArn(arn: string): string {
|
|
132
|
+
const resource = arn.split(":").slice(5).join(":");
|
|
133
|
+
const parts = resource.split("/");
|
|
134
|
+
return parts.length >= 3 ? parts[1]! : "default";
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
function holeFrom(type: string, err: unknown): UnobservedEntity {
|
|
138
|
+
const detail = err instanceof AwsReadError && err.code ? `${err.code}: ${err.message}` : err instanceof Error ? err.message : String(err);
|
|
139
|
+
const reason = /credential|token|expired|AccessDenied|not authorized|Unauthorized/i.test(detail) ? "no-credentials" : "read-failed";
|
|
140
|
+
return { type, reason, detail: detail.slice(0, 200) };
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
async function getHealthCheckStatus(
|
|
144
|
+
id: string,
|
|
145
|
+
client: AwsReadClientOptions,
|
|
146
|
+
http: AwsHealthHttp,
|
|
147
|
+
): Promise<CheckerObservation[]> {
|
|
148
|
+
const options = await withChainCredentials(withEndpointOverride("route53", client));
|
|
149
|
+
// Route 53 is global: one host, signed in us-east-1.
|
|
150
|
+
const base = (options.endpoint ?? "https://route53.amazonaws.com").replace(/\/$/, "");
|
|
151
|
+
const url = `${base}/2013-04-01/healthcheck/${encodeURIComponent(id)}/status`;
|
|
152
|
+
const env = options.env ?? process.env;
|
|
153
|
+
const credentials = resolveCredentials(options.credentials, env);
|
|
154
|
+
const signable = credentials && (!options.endpoint || options.signEndpointOverride === true);
|
|
155
|
+
const headers = signable
|
|
156
|
+
? signRequest({ method: "GET", url, headers: {}, body: "", service: "route53", region: "us-east-1", credentials, ...(options.now ? { now: options.now } : {}) })
|
|
157
|
+
: {};
|
|
158
|
+
const res = await http("GET", url, { headers });
|
|
159
|
+
const err = xmlError(res.text);
|
|
160
|
+
if (err || res.status >= 400) {
|
|
161
|
+
throw new AwsReadError(err?.message ?? `GetHealthCheckStatus failed with HTTP ${res.status}`, res.status, err?.code);
|
|
162
|
+
}
|
|
163
|
+
return parseHealthCheckStatus(res.text);
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
async function describeServices(
|
|
167
|
+
cluster: string,
|
|
168
|
+
arns: string[],
|
|
169
|
+
client: AwsReadClientOptions,
|
|
170
|
+
http: AwsHealthHttp,
|
|
171
|
+
): Promise<{ services: Array<EcsServiceState & { serviceArn?: string }>; failures: Array<{ arn?: string; reason?: string }> }> {
|
|
172
|
+
const options = await withChainCredentials(withEndpointOverride("ecs", client));
|
|
173
|
+
const url = serviceUrl("ecs", options.endpoint, options.region);
|
|
174
|
+
const body = JSON.stringify({ cluster, services: arns });
|
|
175
|
+
const headers = requestHeaders(
|
|
176
|
+
"ecs",
|
|
177
|
+
url,
|
|
178
|
+
body,
|
|
179
|
+
{ "content-type": "application/x-amz-json-1.1", "x-amz-target": "AmazonEC2ContainerServiceV20141113.DescribeServices" },
|
|
180
|
+
options,
|
|
181
|
+
);
|
|
182
|
+
const res = await http("POST", url, { headers, body });
|
|
183
|
+
let parsed: Record<string, unknown> = {};
|
|
184
|
+
try {
|
|
185
|
+
const value: unknown = JSON.parse(res.text);
|
|
186
|
+
if (value && typeof value === "object" && !Array.isArray(value)) parsed = value as Record<string, unknown>;
|
|
187
|
+
} catch {
|
|
188
|
+
throw new AwsReadError("unparseable DescribeServices response", res.status);
|
|
189
|
+
}
|
|
190
|
+
const errType = typeof parsed.__type === "string" ? parsed.__type.split("#").pop() : undefined;
|
|
191
|
+
if (errType || res.status >= 400) {
|
|
192
|
+
const message = typeof parsed.message === "string" ? parsed.message : `DescribeServices failed with HTTP ${res.status}`;
|
|
193
|
+
throw new AwsReadError(message, res.status, errType);
|
|
194
|
+
}
|
|
195
|
+
return {
|
|
196
|
+
services: Array.isArray(parsed.services) ? (parsed.services as Array<EcsServiceState & { serviceArn?: string }>) : [],
|
|
197
|
+
failures: Array.isArray(parsed.failures) ? (parsed.failures as Array<{ arn?: string; reason?: string }>) : [],
|
|
198
|
+
};
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
export async function observeHealthAws(options: AwsHealthOptions): Promise<HealthReadResult> {
|
|
202
|
+
const http = options.http ?? defaultHttp;
|
|
203
|
+
const observedAt = (options.now?.() ?? new Date()).toISOString();
|
|
204
|
+
const client: AwsReadClientOptions = { ...(options.client ?? {}), ...(options.region ? { region: options.region } : {}) };
|
|
205
|
+
const entities: Record<string, HealthEntry> = {};
|
|
206
|
+
const unobserved: Record<string, UnobservedEntity> = {};
|
|
207
|
+
const absent: string[] = [];
|
|
208
|
+
if (options.entities.size === 0) return { entities, unobserved, absent };
|
|
209
|
+
|
|
210
|
+
const stackName = options.stack ?? options.environment;
|
|
211
|
+
let physical: Map<string, string>;
|
|
212
|
+
try {
|
|
213
|
+
const resources = await describeStackResources(stackName, client);
|
|
214
|
+
physical = new Map(resources.filter((r) => r.physicalId).map((r) => [r.logicalId, r.physicalId!]));
|
|
215
|
+
} catch (err) {
|
|
216
|
+
if (err instanceof AwsReadError && stackDoesNotExist(err.message)) return { entities, unobserved, absent: [...options.entities.keys()] };
|
|
217
|
+
for (const [name, { entityType }] of options.entities) {
|
|
218
|
+
unobserved[name] = holeFrom(entityType, err);
|
|
219
|
+
unobserved[name]!.detail = `DescribeStackResources failed for stack "${stackName}": ${unobserved[name]!.detail}`;
|
|
220
|
+
}
|
|
221
|
+
return { entities, unobserved, absent };
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
const services = new Map<string, Array<{ name: string; arn: string }>>();
|
|
225
|
+
const checks: Array<{ name: string; id: string }> = [];
|
|
226
|
+
for (const [name, { entityType }] of options.entities) {
|
|
227
|
+
const id = physical.get(name);
|
|
228
|
+
if (!id) {
|
|
229
|
+
absent.push(name);
|
|
230
|
+
continue;
|
|
231
|
+
}
|
|
232
|
+
if (entityType === "AWS::ECS::Service") {
|
|
233
|
+
const cluster = clusterOfServiceArn(id);
|
|
234
|
+
const list = services.get(cluster) ?? [];
|
|
235
|
+
list.push({ name, arn: id });
|
|
236
|
+
services.set(cluster, list);
|
|
237
|
+
} else if (entityType === "AWS::Route53::HealthCheck") {
|
|
238
|
+
checks.push({ name, id });
|
|
239
|
+
}
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
await Promise.all(
|
|
243
|
+
checks.map(async ({ name, id }) => {
|
|
244
|
+
try {
|
|
245
|
+
entities[name] = healthCheckEntry(await getHealthCheckStatus(id, client, http), observedAt);
|
|
246
|
+
} catch (err) {
|
|
247
|
+
if (err instanceof AwsReadError && err.code === "NoSuchHealthCheck") absent.push(name);
|
|
248
|
+
else unobserved[name] = holeFrom("AWS::Route53::HealthCheck", err);
|
|
249
|
+
}
|
|
250
|
+
}),
|
|
251
|
+
);
|
|
252
|
+
|
|
253
|
+
await Promise.all(
|
|
254
|
+
[...services].map(async ([cluster, members]) => {
|
|
255
|
+
// DescribeServices takes at most ten services per call.
|
|
256
|
+
for (let i = 0; i < members.length; i += 10) {
|
|
257
|
+
const batch = members.slice(i, i + 10);
|
|
258
|
+
try {
|
|
259
|
+
const { services: found, failures } = await describeServices(cluster, batch.map((m) => m.arn), client, http);
|
|
260
|
+
for (const member of batch) {
|
|
261
|
+
const service = found.find((s) => s.serviceArn === member.arn || s.serviceArn?.endsWith(`/${member.arn.split("/").pop()}`));
|
|
262
|
+
const failure = failures.find((f) => f.arn === member.arn);
|
|
263
|
+
if (service) entities[member.name] = ecsServiceEntry(service, observedAt);
|
|
264
|
+
else if (failure?.reason === "MISSING") absent.push(member.name);
|
|
265
|
+
else {
|
|
266
|
+
unobserved[member.name] = {
|
|
267
|
+
type: "AWS::ECS::Service",
|
|
268
|
+
reason: "read-failed",
|
|
269
|
+
detail: failure?.reason ? `DescribeServices: ${failure.reason}` : "DescribeServices did not return the service",
|
|
270
|
+
};
|
|
271
|
+
}
|
|
272
|
+
}
|
|
273
|
+
} catch (err) {
|
|
274
|
+
for (const member of batch) unobserved[member.name] = holeFrom("AWS::ECS::Service", err);
|
|
275
|
+
}
|
|
276
|
+
}
|
|
277
|
+
}),
|
|
278
|
+
);
|
|
279
|
+
|
|
280
|
+
return { entities, unobserved, absent };
|
|
281
|
+
}
|
package/src/identity-observe.ts
CHANGED
|
@@ -22,10 +22,11 @@
|
|
|
22
22
|
* `create` the moment the emulator lacks Cloud Control.
|
|
23
23
|
*/
|
|
24
24
|
import { createRequire } from "module";
|
|
25
|
+
import { moduleSourceUrl } from "@intentius/chant/module-source";
|
|
25
26
|
import { AwsReadError, getResource, listResources, type AwsReadClientOptions, type CloudControlDescription } from "./api/read-client";
|
|
26
27
|
import type { ResourceMetadata } from "@intentius/chant/lexicon";
|
|
27
28
|
|
|
28
|
-
const require = createRequire(import.meta.url);
|
|
29
|
+
const require = createRequire(moduleSourceUrl(import.meta.url));
|
|
29
30
|
|
|
30
31
|
interface LexiconEntry {
|
|
31
32
|
resourceType: string;
|
|
@@ -13,6 +13,7 @@
|
|
|
13
13
|
|
|
14
14
|
import { readFileSync } from "fs";
|
|
15
15
|
import { join } from "path";
|
|
16
|
+
import { moduleSourceDir } from "@intentius/chant/module-source";
|
|
16
17
|
import type { PostSynthCheck, PostSynthContext, PostSynthDiagnostic } from "@intentius/chant/lint/post-synth";
|
|
17
18
|
import { parseCFTemplate, type CFResource } from "./cf-refs";
|
|
18
19
|
|
|
@@ -36,9 +37,8 @@ interface LexiconEntry {
|
|
|
36
37
|
function loadLexiconConstraints(): Map<string, ExtensionConstraint[]> {
|
|
37
38
|
const map = new Map<string, ExtensionConstraint[]>();
|
|
38
39
|
try {
|
|
39
|
-
//
|
|
40
|
-
const
|
|
41
|
-
const lexiconPath = join(pkgDir, "src", "generated", "lexicon-aws.json");
|
|
40
|
+
// From src/lint/post-synth/ (or its compiled twin under dist/) to src/generated/
|
|
41
|
+
const lexiconPath = join(moduleSourceDir(import.meta.url), "..", "..", "generated", "lexicon-aws.json");
|
|
42
42
|
const content = readFileSync(lexiconPath, "utf-8");
|
|
43
43
|
const data = JSON.parse(content) as Record<string, LexiconEntry>;
|
|
44
44
|
|
|
@@ -17,6 +17,7 @@
|
|
|
17
17
|
|
|
18
18
|
import { readFileSync } from "fs";
|
|
19
19
|
import { join } from "path";
|
|
20
|
+
import { moduleSourceDir } from "@intentius/chant/module-source";
|
|
20
21
|
import type { PostSynthCheck, PostSynthContext, PostSynthDiagnostic } from "@intentius/chant/lint/post-synth";
|
|
21
22
|
import { parseCFTemplate } from "./cf-refs";
|
|
22
23
|
|
|
@@ -38,8 +39,7 @@ interface LexiconEntry {
|
|
|
38
39
|
function loadDeprecatedProperties(): Map<string, Map<string, DeprecationBasis>> {
|
|
39
40
|
const map = new Map<string, Map<string, DeprecationBasis>>();
|
|
40
41
|
try {
|
|
41
|
-
const
|
|
42
|
-
const lexiconPath = join(pkgDir, "src", "generated", "lexicon-aws.json");
|
|
42
|
+
const lexiconPath = join(moduleSourceDir(import.meta.url), "..", "..", "generated", "lexicon-aws.json");
|
|
43
43
|
const content = readFileSync(lexiconPath, "utf-8");
|
|
44
44
|
const data = JSON.parse(content) as Record<string, LexiconEntry>;
|
|
45
45
|
|
package/src/lsp/completions.ts
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { createRequire } from "module";
|
|
2
|
+
import { moduleSourceUrl } from "@intentius/chant/module-source";
|
|
2
3
|
import type { CompletionContext, CompletionItem } from "@intentius/chant/lsp/types";
|
|
3
4
|
import { LexiconIndex, lexiconCompletions, type LexiconEntry } from "@intentius/chant/lsp/lexicon-providers";
|
|
4
|
-
const require = createRequire(import.meta.url);
|
|
5
|
+
const require = createRequire(moduleSourceUrl(import.meta.url));
|
|
5
6
|
|
|
6
7
|
let cachedIndex: LexiconIndex | null = null;
|
|
7
8
|
|
package/src/lsp/hover.ts
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { createRequire } from "module";
|
|
2
|
+
import { moduleSourceUrl } from "@intentius/chant/module-source";
|
|
2
3
|
import type { HoverContext, HoverInfo } from "@intentius/chant/lsp/types";
|
|
3
4
|
import { LexiconIndex, lexiconHover, type LexiconEntry } from "@intentius/chant/lsp/lexicon-providers";
|
|
4
|
-
const require = createRequire(import.meta.url);
|
|
5
|
+
const require = createRequire(moduleSourceUrl(import.meta.url));
|
|
5
6
|
|
|
6
7
|
let cachedIndex: LexiconIndex | null = null;
|
|
7
8
|
|
package/src/plugin.ts
CHANGED
|
@@ -3,7 +3,7 @@ import { createRequire } from "module";
|
|
|
3
3
|
import { awsBehaviourKinds } from "./behaviour-kinds";
|
|
4
4
|
import { detectTemplate } from "./detect";
|
|
5
5
|
import type { LexiconPlugin, IntrinsicDef, ObservationResult, DeepObservationResult, DependencyObservation, DescribeIdentityOptions, DescribeIdentityResult, DisruptionQuery, DisruptionVerdict, ResourceMetadata, ExportedTemplate, ResourceSelector, InitTemplateSet, StackStatusObservation } from "@intentius/chant/lexicon";
|
|
6
|
-
const require = createRequire(import.meta.url);
|
|
6
|
+
const require = createRequire(moduleSourceUrl(import.meta.url));
|
|
7
7
|
import type { LintRule } from "@intentius/chant/lint/rule";
|
|
8
8
|
import type { TemplateParser } from "@intentius/chant/import/parser";
|
|
9
9
|
import type { TypeScriptGenerator } from "@intentius/chant/import/generator";
|
|
@@ -15,6 +15,7 @@ import { createSkillsLoader, createDiffTool, createCatalogResource } from "@inte
|
|
|
15
15
|
import { readFileSync } from "fs";
|
|
16
16
|
import { join, dirname } from "path";
|
|
17
17
|
import { fileURLToPath } from "url";
|
|
18
|
+
import { moduleSourceUrl } from "@intentius/chant/module-source";
|
|
18
19
|
import { awsSerializer } from "./serializer";
|
|
19
20
|
import { FLOCI_EMULATOR } from "./op/activities/floci";
|
|
20
21
|
import { applyAwsEndpointArgv } from "./components/cloud-executor";
|
|
@@ -910,6 +911,14 @@ aws cloudformation wait stack-update-complete --stack-name my-app-prod`,
|
|
|
910
911
|
/** The noise rules the deep pass applies to both the live and declared trees. */
|
|
911
912
|
deepNormalizationHooks: awsDeepNormalizationHooks,
|
|
912
913
|
|
|
914
|
+
/** Runtime health (#4177): Route 53 health checks and ECS services. Implementation in ./health.ts. */
|
|
915
|
+
healthTypes: ["AWS::Route53::HealthCheck", "AWS::ECS::Service"],
|
|
916
|
+
|
|
917
|
+
async observeHealth(options) {
|
|
918
|
+
const { observeHealthAws } = await import("./health");
|
|
919
|
+
return observeHealthAws(options);
|
|
920
|
+
},
|
|
921
|
+
|
|
913
922
|
async describeStackStatus(options: { environment: string; stack: string }): Promise<StackStatusObservation | null> {
|
|
914
923
|
const { getRuntime } = await import("@intentius/chant/runtime-adapter");
|
|
915
924
|
const rt = getRuntime();
|
package/src/receipt-store.ts
CHANGED
|
@@ -35,6 +35,7 @@ import {
|
|
|
35
35
|
AwsReadError,
|
|
36
36
|
requestHeaders,
|
|
37
37
|
serviceUrl,
|
|
38
|
+
withChainCredentials,
|
|
38
39
|
withEndpointOverride,
|
|
39
40
|
type AwsCredentialSource,
|
|
40
41
|
type AwsReadClientOptions,
|
|
@@ -79,7 +80,7 @@ export async function ssmCall(
|
|
|
79
80
|
payload: Record<string, unknown>,
|
|
80
81
|
options: AwsReadClientOptions,
|
|
81
82
|
): Promise<{ status: number; json: Record<string, unknown> }> {
|
|
82
|
-
const settled = withEndpointOverride(SSM_SERVICE, options);
|
|
83
|
+
const settled = await withChainCredentials(withEndpointOverride(SSM_SERVICE, options));
|
|
83
84
|
const url = serviceUrl(SSM_SERVICE, settled.endpoint, settled.region);
|
|
84
85
|
const body = JSON.stringify(payload);
|
|
85
86
|
const base = {
|
package/src/spec/pin.ts
CHANGED
|
@@ -56,9 +56,9 @@ export interface SpecPin {
|
|
|
56
56
|
* want, and paste the printed pin here in its own commit.
|
|
57
57
|
*/
|
|
58
58
|
export const AWS_SPEC_PIN: SpecPin = {
|
|
59
|
-
digest: "sha256:
|
|
60
|
-
resources:
|
|
61
|
-
accepted: "2026-
|
|
59
|
+
digest: "sha256:398259716cca4a83d8ffc719fb214caf3ed6239c6be775e6d21952ce7ad8dae4",
|
|
60
|
+
resources: 1856,
|
|
61
|
+
accepted: "2026-10-19",
|
|
62
62
|
};
|
|
63
63
|
|
|
64
64
|
/** Env var that accepts whatever upstream currently serves, printing the new pin. */
|