@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,28 @@
|
|
|
1
|
+
---
|
|
2
|
+
type: resource-type
|
|
3
|
+
title: Workspace
|
|
4
|
+
description: aws resource type AWS::IoTSiteWise::Workspace
|
|
5
|
+
name: Workspace
|
|
6
|
+
lexicon: aws
|
|
7
|
+
resource_type: AWS::IoTSiteWise::Workspace
|
|
8
|
+
---
|
|
9
|
+
`AWS::IoTSiteWise::Workspace`, a resource type of the aws lexicon.
|
|
10
|
+
|
|
11
|
+
## Properties
|
|
12
|
+
|
|
13
|
+
- `EncryptionConfiguration` (`Workspace_EncryptionConfiguration`, required)
|
|
14
|
+
- `WorkspaceName` (`string`, required): The name of the workspace.
|
|
15
|
+
- `CreatedAt` (`string`, optional): The time the workspace was created.
|
|
16
|
+
- `KmsKeyId` (`string`, optional): The ARN of the AWS KMS key used for KMS_BASED_ENCRYPTION. Required when EncryptionConfiguration.EncryptionType is KMS_BASED_ENCRYPTION.
|
|
17
|
+
- `Status` (`"ACTIVE" | "CREATING" | "DELETING" | "FAILED" | "UPDATING"`, optional): The current state of the workspace.
|
|
18
|
+
- `Tags` (`Workspace_Tag[]`, optional): An array of key-value pairs to apply to this resource.
|
|
19
|
+
- `UpdatedAt` (`string`, optional): The time the workspace was last updated.
|
|
20
|
+
- `WorkspaceArn` (`string`, optional): The ARN of the workspace.
|
|
21
|
+
- `WorkspaceDescription` (`string`, optional): A description of the workspace.
|
|
22
|
+
|
|
23
|
+
## Attributes
|
|
24
|
+
|
|
25
|
+
- `CreatedAt`
|
|
26
|
+
- `Status`
|
|
27
|
+
- `UpdatedAt`
|
|
28
|
+
- `WorkspaceArn`
|
|
@@ -10,14 +10,14 @@ resource_type: AWS::SageMaker::Workteam
|
|
|
10
10
|
|
|
11
11
|
## Properties
|
|
12
12
|
|
|
13
|
-
- `Description` (`string`,
|
|
14
|
-
- `
|
|
15
|
-
- `
|
|
16
|
-
- `
|
|
17
|
-
- `
|
|
18
|
-
- `
|
|
19
|
-
- `WorkteamName` (`string`, optional)
|
|
13
|
+
- `Description` (`string`, required): A description of the work team.
|
|
14
|
+
- `MemberDefinitions` (`Workteam_MemberDefinition[]`, required): A list of MemberDefinition objects that contains objects that identify the workers that make up the work team.
|
|
15
|
+
- `NotificationConfiguration` (`Workteam_NotificationConfiguration`, optional): Configures SNS notifications of available or expiring work items for work teams.
|
|
16
|
+
- `Tags` (`Workteam_Tag[]`, optional): An array of key-value pairs.
|
|
17
|
+
- `WorkforceName` (`string`, optional): The name of the Workforce
|
|
18
|
+
- `WorkteamArn` (`string`, optional): The Amazon Resource Name (ARN) that identifies the work team.
|
|
19
|
+
- `WorkteamName` (`string`, optional): The name of the work team.
|
|
20
20
|
|
|
21
21
|
## Attributes
|
|
22
22
|
|
|
23
|
-
- `
|
|
23
|
+
- `WorkteamArn`
|
|
@@ -0,0 +1,214 @@
|
|
|
1
|
+
import { readFileSync } from "node:fs";
|
|
2
|
+
import { sleep } from "@intentius/chant/op";
|
|
3
|
+
import { awsDeployCapabilitiesForBody } from "../../components/cloud-executor.js";
|
|
4
|
+
import { resolveEndpointOverride } from "../../api/read-client.js";
|
|
5
|
+
import { ownershipStackTagsForBody } from "../../ownership.js";
|
|
6
|
+
const DEFAULT_REGION = "us-east-1";
|
|
7
|
+
const CFN_API_VERSION = "2010-05-15";
|
|
8
|
+
const defaultHttp = async (url, form, signal) => {
|
|
9
|
+
const res = await fetch(url, {
|
|
10
|
+
method: "POST",
|
|
11
|
+
headers: { "content-type": "application/x-www-form-urlencoded" },
|
|
12
|
+
body: new URLSearchParams(form).toString(),
|
|
13
|
+
signal,
|
|
14
|
+
});
|
|
15
|
+
return { status: res.status, text: await res.text() };
|
|
16
|
+
};
|
|
17
|
+
// ── Pure helpers (CFN Query protocol) ─────────────────────────────────────────
|
|
18
|
+
/**
|
|
19
|
+
* The CloudFormation endpoint URL — the override, or the real regional host.
|
|
20
|
+
* `env` is what the ambient-variable fallback reads; injectable for tests.
|
|
21
|
+
*/
|
|
22
|
+
export function cfnUrl(endpoint, region = DEFAULT_REGION, env = process.env) {
|
|
23
|
+
const override = resolveEndpointOverride("cloudformation", endpoint, env);
|
|
24
|
+
return `${(override ?? `https://cloudformation.${region}.amazonaws.com`).replace(/\/$/, "")}/`;
|
|
25
|
+
}
|
|
26
|
+
/** A CFN Query-protocol form body: `Action` + `Version` + params. */
|
|
27
|
+
export function cfnForm(action, params) {
|
|
28
|
+
return { Action: action, Version: CFN_API_VERSION, ...params };
|
|
29
|
+
}
|
|
30
|
+
/** Capabilities as the CFN `Capabilities.member.N` list params. */
|
|
31
|
+
export function capabilityParams(capabilities) {
|
|
32
|
+
const out = {};
|
|
33
|
+
capabilities.forEach((c, i) => (out[`Capabilities.member.${i + 1}`] = c));
|
|
34
|
+
return out;
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* Stack tags as the CFN `Tags.member.N.Key/Value` list params (#1222). Sorted
|
|
38
|
+
* so the request is deterministic. Empty in, empty out — a template without an
|
|
39
|
+
* ownership marker adds no `Tags` parameter at all.
|
|
40
|
+
*/
|
|
41
|
+
export function tagParams(tags) {
|
|
42
|
+
const out = {};
|
|
43
|
+
Object.keys(tags)
|
|
44
|
+
.sort()
|
|
45
|
+
.forEach((key, i) => {
|
|
46
|
+
out[`Tags.member.${i + 1}.Key`] = key;
|
|
47
|
+
out[`Tags.member.${i + 1}.Value`] = tags[key];
|
|
48
|
+
});
|
|
49
|
+
return out;
|
|
50
|
+
}
|
|
51
|
+
/**
|
|
52
|
+
* First `<tag>…</tag>` text in a CFN XML response.
|
|
53
|
+
*
|
|
54
|
+
* Assumes flat scalar fields — the CloudFormation Query API returns simple
|
|
55
|
+
* `<StackStatus>…</StackStatus>` style leaves, so `[^<]*` is sufficient. It does
|
|
56
|
+
* NOT handle nested tags or XML entities in the value; if a field ever carries
|
|
57
|
+
* either, replace this with a real XML parser.
|
|
58
|
+
*/
|
|
59
|
+
export function xmlField(xml, tag) {
|
|
60
|
+
return xml.match(new RegExp(`<${tag}>([^<]*)</${tag}>`))?.[1];
|
|
61
|
+
}
|
|
62
|
+
export const stackStatus = (xml) => xmlField(xml, "StackStatus");
|
|
63
|
+
export const stackId = (xml) => xmlField(xml, "StackId");
|
|
64
|
+
export const cfnErrorMessage = (xml) => xmlField(xml, "Message");
|
|
65
|
+
/** A DescribeStacks error for an absent stack (drives create-vs-update). */
|
|
66
|
+
export const isStackMissing = (xml) => /does not exist/i.test(xml);
|
|
67
|
+
/** The real-AWS UpdateStack no-op error (Floci returns 200 instead). */
|
|
68
|
+
export const isNoUpdates = (xml) => /No updates are to be performed/i.test(xml);
|
|
69
|
+
const SUCCESS_STATUS = new Set(["CREATE_COMPLETE", "UPDATE_COMPLETE", "IMPORT_COMPLETE"]);
|
|
70
|
+
export const isSuccessStatus = (status) => SUCCESS_STATUS.has(status);
|
|
71
|
+
export const isFailureStatus = (status) => /FAILED|ROLLBACK/.test(status);
|
|
72
|
+
/** A settled stack state — success, failure, or deleted. Transient `*_IN_PROGRESS` states aren't. */
|
|
73
|
+
export const isTerminalStatus = (status) => isSuccessStatus(status) || isFailureStatus(status) || status === "DELETE_COMPLETE";
|
|
74
|
+
// ── Poll ──────────────────────────────────────────────────────────────────────
|
|
75
|
+
/** Poll DescribeStacks until the stack reaches a terminal state; returns that status. */
|
|
76
|
+
export async function waitForStackSettled(url, stackName, http, opts, signal) {
|
|
77
|
+
const deadline = Date.now() + opts.timeoutMs;
|
|
78
|
+
while (Date.now() < deadline) {
|
|
79
|
+
if (signal?.aborted)
|
|
80
|
+
throw new Error("awsApply aborted");
|
|
81
|
+
const res = await http(url, cfnForm("DescribeStacks", { StackName: stackName }), signal);
|
|
82
|
+
const status = stackStatus(res.text);
|
|
83
|
+
if (status && isTerminalStatus(status))
|
|
84
|
+
return status;
|
|
85
|
+
await sleep(opts.intervalMs, signal);
|
|
86
|
+
}
|
|
87
|
+
throw new Error(`CloudFormation stack ${stackName} did not settle within ${opts.timeoutMs}ms`);
|
|
88
|
+
}
|
|
89
|
+
// ── Apply / delete ──────────────────────────────────────────────────────────
|
|
90
|
+
/**
|
|
91
|
+
* The native AWS applier — deploy a built CloudFormation template by calling the
|
|
92
|
+
* CloudFormation API directly (create-or-update + poll to a settled stack),
|
|
93
|
+
* targeting a local Floci emulator or real AWS by endpoint override. The direct
|
|
94
|
+
* twin of `azApply`/`gcpApply`: it speaks the CloudFormation Query API over HTTP
|
|
95
|
+
* rather than shelling `aws cloudformation deploy` — and since chant #1449 it is
|
|
96
|
+
* also what `nativeApply({ target: "cloudformation" })` runs, so no CLI path
|
|
97
|
+
* remains. The stack is the ownership boundary, so deletes ride CloudFormation
|
|
98
|
+
* itself — no separate prune. `http` is injectable for tests.
|
|
99
|
+
*/
|
|
100
|
+
export async function awsApply(args, signal, http = defaultHttp) {
|
|
101
|
+
const url = cfnUrl(args.endpoint, args.region);
|
|
102
|
+
const templateBody = readFileSync(args.templatePath, "utf8");
|
|
103
|
+
const capabilities = args.capabilities ?? awsDeployCapabilitiesForBody(templateBody);
|
|
104
|
+
const timeoutMs = args.timeoutMs ?? 300000;
|
|
105
|
+
const intervalMs = args.intervalMs ?? 3000;
|
|
106
|
+
const desc = await http(url, cfnForm("DescribeStacks", { StackName: args.stackName }), signal);
|
|
107
|
+
if (desc.status >= 300 && !isStackMissing(desc.text)) {
|
|
108
|
+
throw new Error(`CloudFormation DescribeStacks failed (${desc.status}): ${cfnErrorMessage(desc.text) ?? desc.text}`);
|
|
109
|
+
}
|
|
110
|
+
const exists = desc.status < 300;
|
|
111
|
+
// Stamp the template's ownership marker as the STACK's own tags (#1222):
|
|
112
|
+
// stack-level teardown verifies ownership on DescribeStacks tags, and this
|
|
113
|
+
// is the write that makes every future stack teardown-eligible. A template
|
|
114
|
+
// carrying no marker adds nothing.
|
|
115
|
+
const stackTags = ownershipStackTagsForBody(templateBody);
|
|
116
|
+
const params = {
|
|
117
|
+
StackName: args.stackName,
|
|
118
|
+
TemplateBody: templateBody,
|
|
119
|
+
...capabilityParams(capabilities),
|
|
120
|
+
...tagParams(stackTags),
|
|
121
|
+
};
|
|
122
|
+
let action;
|
|
123
|
+
if (!exists) {
|
|
124
|
+
const res = await http(url, cfnForm("CreateStack", params), signal);
|
|
125
|
+
if (res.status >= 300) {
|
|
126
|
+
throw new Error(`CloudFormation CreateStack failed (${res.status}): ${cfnErrorMessage(res.text) ?? res.text}`);
|
|
127
|
+
}
|
|
128
|
+
action = "created";
|
|
129
|
+
}
|
|
130
|
+
else {
|
|
131
|
+
const res = await http(url, cfnForm("UpdateStack", params), signal);
|
|
132
|
+
if (res.status >= 300) {
|
|
133
|
+
if (isNoUpdates(res.text)) {
|
|
134
|
+
console.log(`unchanged: ${args.stackName} (no updates)`);
|
|
135
|
+
return { stackName: args.stackName, status: "UPDATE_COMPLETE", action: "unchanged" };
|
|
136
|
+
}
|
|
137
|
+
throw new Error(`CloudFormation UpdateStack failed (${res.status}): ${cfnErrorMessage(res.text) ?? res.text}`);
|
|
138
|
+
}
|
|
139
|
+
action = "updated";
|
|
140
|
+
}
|
|
141
|
+
const status = await waitForStackSettled(url, args.stackName, http, { timeoutMs, intervalMs }, signal);
|
|
142
|
+
if (isFailureStatus(status)) {
|
|
143
|
+
throw new Error(`CloudFormation stack ${args.stackName} ${action} → ${status}`);
|
|
144
|
+
}
|
|
145
|
+
console.log(`${action}: ${args.stackName} (${status}) [${url}]`);
|
|
146
|
+
return { stackName: args.stackName, status, action };
|
|
147
|
+
}
|
|
148
|
+
/**
|
|
149
|
+
* The inverse of {@link awsApply} — DeleteStack, then poll until the stack is
|
|
150
|
+
* gone. Idempotent: an already-absent stack is a no-op. `http` is injectable.
|
|
151
|
+
*/
|
|
152
|
+
export async function awsDelete(args, signal, http = defaultHttp) {
|
|
153
|
+
const url = cfnUrl(args.endpoint, args.region);
|
|
154
|
+
const timeoutMs = args.timeoutMs ?? 300000;
|
|
155
|
+
const intervalMs = args.intervalMs ?? 3000;
|
|
156
|
+
const res = await http(url, cfnForm("DeleteStack", { StackName: args.stackName }), signal);
|
|
157
|
+
if (res.status >= 300 && !isStackMissing(res.text)) {
|
|
158
|
+
throw new Error(`CloudFormation DeleteStack failed (${res.status}): ${cfnErrorMessage(res.text) ?? res.text}`);
|
|
159
|
+
}
|
|
160
|
+
const deadline = Date.now() + timeoutMs;
|
|
161
|
+
while (Date.now() < deadline) {
|
|
162
|
+
if (signal?.aborted)
|
|
163
|
+
throw new Error("awsDelete aborted");
|
|
164
|
+
const d = await http(url, cfnForm("DescribeStacks", { StackName: args.stackName }), signal);
|
|
165
|
+
if (d.status >= 300 && isStackMissing(d.text))
|
|
166
|
+
return { stackName: args.stackName, deleted: true };
|
|
167
|
+
const status = stackStatus(d.text);
|
|
168
|
+
if (status === "DELETE_COMPLETE")
|
|
169
|
+
return { stackName: args.stackName, deleted: true };
|
|
170
|
+
if (status === "DELETE_FAILED")
|
|
171
|
+
throw new Error(`CloudFormation stack ${args.stackName} delete → DELETE_FAILED`);
|
|
172
|
+
await sleep(intervalMs, signal);
|
|
173
|
+
}
|
|
174
|
+
throw new Error(`CloudFormation stack ${args.stackName} delete did not complete within ${timeoutMs}ms`);
|
|
175
|
+
}
|
|
176
|
+
/**
|
|
177
|
+
* The saga compensation for {@link awsApply} — CloudFormation `RollbackStack`
|
|
178
|
+
* via the same Query-API client, then poll until the stack settles. Returns the
|
|
179
|
+
* stack to its last known stable state after a failed update (#1449 — this
|
|
180
|
+
* replaces the Temporal lexicon exec-ing `aws cloudformation rollback-stack`).
|
|
181
|
+
*
|
|
182
|
+
* Degrades rather than crashes in two cases where there is nothing to do:
|
|
183
|
+
* an absent stack (nothing applied, nothing to revert) and a target that does
|
|
184
|
+
* not implement the action — Floci answers `UnknownAction` (#947). Both return
|
|
185
|
+
* `rolledBack: false` with a logged warning; every other API error throws,
|
|
186
|
+
* because a compensation that silently fails leaves partial state looking
|
|
187
|
+
* reverted when it isn't. `http` is injectable for tests.
|
|
188
|
+
*/
|
|
189
|
+
export async function rollbackStack(args, signal, http = defaultHttp) {
|
|
190
|
+
const url = cfnUrl(args.endpoint, args.region);
|
|
191
|
+
const timeoutMs = args.timeoutMs ?? 300000;
|
|
192
|
+
const intervalMs = args.intervalMs ?? 3000;
|
|
193
|
+
const res = await http(url, cfnForm("RollbackStack", { StackName: args.stackName }), signal);
|
|
194
|
+
if (res.status >= 300) {
|
|
195
|
+
if (isStackMissing(res.text)) {
|
|
196
|
+
console.warn(`rollbackStack: stack ${args.stackName} does not exist — nothing to roll back`);
|
|
197
|
+
return { stackName: args.stackName, rolledBack: false };
|
|
198
|
+
}
|
|
199
|
+
// Local emulators (Floci) don't implement RollbackStack → `UnknownAction` (#947).
|
|
200
|
+
if (/UnknownAction|not supported/i.test(res.text)) {
|
|
201
|
+
console.warn(`rollbackStack: the target doesn't support RollbackStack (a local emulator such as Floci) — skipping automated rollback of ${args.stackName}`);
|
|
202
|
+
return { stackName: args.stackName, rolledBack: false };
|
|
203
|
+
}
|
|
204
|
+
throw new Error(`CloudFormation RollbackStack failed (${res.status}): ${cfnErrorMessage(res.text) ?? res.text}`);
|
|
205
|
+
}
|
|
206
|
+
const status = await waitForStackSettled(url, args.stackName, http, { timeoutMs, intervalMs }, signal);
|
|
207
|
+
// A settled rollback ends in `ROLLBACK_COMPLETE`/`UPDATE_ROLLBACK_COMPLETE` —
|
|
208
|
+
// classified a failure by the deploy-path matcher, but the success state here.
|
|
209
|
+
if (!/ROLLBACK_COMPLETE$/.test(status)) {
|
|
210
|
+
throw new Error(`CloudFormation stack ${args.stackName} rollback → ${status}`);
|
|
211
|
+
}
|
|
212
|
+
console.log(`rolled back: ${args.stackName} (${status}) [${url}]`);
|
|
213
|
+
return { stackName: args.stackName, rolledBack: true, status };
|
|
214
|
+
}
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
import { emulatorLifecycle } from "@intentius/chant/op";
|
|
2
|
+
const DEFAULT_NAME = "chant-floci";
|
|
3
|
+
const DEFAULT_PORT = 4566;
|
|
4
|
+
// Pinned, not `:latest` (#1345). An image that moves underneath a passing
|
|
5
|
+
// local suite is the drift a pin exists to stop, and the freshness check in
|
|
6
|
+
// core reports how far behind this is rather than bumping it — the tag moves
|
|
7
|
+
// when a consuming test needs the newer emulator (#808).
|
|
8
|
+
const DEFAULT_IMAGE = "floci/floci:1.5.34";
|
|
9
|
+
const DEFAULT_REGION = "us-east-1";
|
|
10
|
+
const DEFAULT_READY_SERVICE = "cloudformation";
|
|
11
|
+
const DOCKER_SOCK = ["-v", "/var/run/docker.sock:/var/run/docker.sock"];
|
|
12
|
+
/** True once the health body reports the required service (e.g. `"cloudformation"`). */
|
|
13
|
+
export function isFlociReady(healthBody, service) {
|
|
14
|
+
return healthBody.includes(`"${service}"`);
|
|
15
|
+
}
|
|
16
|
+
/** The AWS env vars that point the `aws` CLI / SDK at a local Floci endpoint. */
|
|
17
|
+
export function flociEnv(port, region) {
|
|
18
|
+
return {
|
|
19
|
+
AWS_ENDPOINT_URL: `http://localhost:${port}`,
|
|
20
|
+
AWS_ACCESS_KEY_ID: "test",
|
|
21
|
+
AWS_SECRET_ACCESS_KEY: "test",
|
|
22
|
+
AWS_REGION: region,
|
|
23
|
+
};
|
|
24
|
+
}
|
|
25
|
+
// AWS runs the LocalStack-compatible floci/floci image, so readiness is gated on
|
|
26
|
+
// a service (`cloudformation`) appearing in `/_localstack/health` — unlike the
|
|
27
|
+
// bespoke az/gcp fakes. Shared lifecycle: emulatorLifecycle (#746).
|
|
28
|
+
const flociSpecFor = (readyService) => ({
|
|
29
|
+
name: DEFAULT_NAME,
|
|
30
|
+
image: DEFAULT_IMAGE,
|
|
31
|
+
containerPort: DEFAULT_PORT,
|
|
32
|
+
healthPath: "/_localstack/health",
|
|
33
|
+
ready: (body) => isFlociReady(body, readyService),
|
|
34
|
+
upstream: { repo: "floci-io/floci" },
|
|
35
|
+
settingsPrefix: "FLOCI_",
|
|
36
|
+
});
|
|
37
|
+
/** The Floci emulator spec — the aws plugin's `emulator` capability (#920). */
|
|
38
|
+
export const FLOCI_SPEC = flociSpecFor(DEFAULT_READY_SERVICE);
|
|
39
|
+
/** The aws plugin's emulator capability (#920): Floci + the AWS env that points
|
|
40
|
+
* the SDK / `chant graph --live` / a triggered Op at it. */
|
|
41
|
+
export const FLOCI_EMULATOR = {
|
|
42
|
+
spec: FLOCI_SPEC,
|
|
43
|
+
env: (endpoint) => ({
|
|
44
|
+
AWS_ENDPOINT_URL: endpoint,
|
|
45
|
+
AWS_ACCESS_KEY_ID: "test",
|
|
46
|
+
AWS_SECRET_ACCESS_KEY: "test",
|
|
47
|
+
AWS_REGION: DEFAULT_REGION,
|
|
48
|
+
}),
|
|
49
|
+
};
|
|
50
|
+
const flociFor = (readyService) => emulatorLifecycle(flociSpecFor(readyService));
|
|
51
|
+
const builders = flociFor(DEFAULT_READY_SERVICE);
|
|
52
|
+
export const flociExistsCommand = builders.existsCommand;
|
|
53
|
+
export const flociRmCommand = builders.rmCommand;
|
|
54
|
+
export const flociHealthUrl = builders.healthUrl;
|
|
55
|
+
/** Build the `docker run` command that boots Floci. */
|
|
56
|
+
export function flociRunCommand(args = {}) {
|
|
57
|
+
return builders.runCommand({
|
|
58
|
+
name: args.name,
|
|
59
|
+
port: args.port,
|
|
60
|
+
image: args.image,
|
|
61
|
+
network: args.network,
|
|
62
|
+
settings: args.settings,
|
|
63
|
+
loopback: args.loopback,
|
|
64
|
+
extraArgs: args.dockerSocket ? [...DOCKER_SOCK] : [],
|
|
65
|
+
});
|
|
66
|
+
}
|
|
67
|
+
/**
|
|
68
|
+
* Boot a local Floci AWS emulator in Docker and point subsequent steps at it.
|
|
69
|
+
*
|
|
70
|
+
* Idempotent: reuses a running container of the same name. Waits for the health
|
|
71
|
+
* endpoint to report `readyService`, then sets `AWS_ENDPOINT_URL` + test creds in
|
|
72
|
+
* the process environment so a following `nativeApply`/`cfn-deploy` targets the
|
|
73
|
+
* emulator. Env injection works because the local executor runs every step of a
|
|
74
|
+
* run in this process; a step that runs anywhere else needs the endpoint passed
|
|
75
|
+
* to it explicitly.
|
|
76
|
+
*/
|
|
77
|
+
export async function flociUp(args = {}, signal) {
|
|
78
|
+
const region = args.region ?? DEFAULT_REGION;
|
|
79
|
+
const service = args.readyService ?? DEFAULT_READY_SERVICE;
|
|
80
|
+
const { endpoint } = await flociFor(service).up({
|
|
81
|
+
name: args.name,
|
|
82
|
+
port: args.port,
|
|
83
|
+
image: args.image,
|
|
84
|
+
network: args.network,
|
|
85
|
+
settings: args.settings,
|
|
86
|
+
loopback: args.loopback,
|
|
87
|
+
timeoutMs: args.timeoutMs,
|
|
88
|
+
intervalMs: args.intervalMs,
|
|
89
|
+
extraArgs: args.dockerSocket ? [...DOCKER_SOCK] : [],
|
|
90
|
+
}, signal);
|
|
91
|
+
Object.assign(process.env, flociEnv(args.port ?? DEFAULT_PORT, region));
|
|
92
|
+
return { endpoint };
|
|
93
|
+
}
|
|
94
|
+
/** Stop and remove the local Floci emulator container (no-op if already gone). */
|
|
95
|
+
export async function flociDown(args = {}, signal) {
|
|
96
|
+
return builders.down(args, signal);
|
|
97
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* AWS Op activities — resolved by the core activity registry when a project's
|
|
3
|
+
* `chant.config.ts` lists the `aws` lexicon. Contributes the local Floci AWS
|
|
4
|
+
* emulator lifecycle (`flociUp`/`flociDown`) and the native CloudFormation
|
|
5
|
+
* applier (`awsApply`, with `awsDelete` and the `rollbackStack` compensation),
|
|
6
|
+
* which calls the CloudFormation API directly rather than shelling `aws` — the
|
|
7
|
+
* direct twin of `azApply`/`gcpApply`.
|
|
8
|
+
*
|
|
9
|
+
* The registry keys every exported *function* here by its name, so only the
|
|
10
|
+
* activities themselves belong in this barrel. `awsAgentCoreFetchTrace`'s
|
|
11
|
+
* helpers — the normalizer, the JSON coercion, the `ListEvents` walk — stay
|
|
12
|
+
* importable from `@intentius/chant-lexicon-aws/agentcore/trace-fetch` rather
|
|
13
|
+
* than being registered as activities nobody would ever name in a step, and the
|
|
14
|
+
* pure renderer lives one module further out again, in
|
|
15
|
+
* `@intentius/chant-lexicon-aws/agentcore/trace-render`.
|
|
16
|
+
*/
|
|
17
|
+
export { flociUp, flociDown, flociRunCommand, flociRmCommand, flociExistsCommand, flociHealthUrl, flociEnv, isFlociReady, } from "./floci.js";
|
|
18
|
+
export { awsApply, awsDelete, rollbackStack, waitForStackSettled, cfnUrl, cfnForm, capabilityParams, xmlField, stackStatus, stackId, cfnErrorMessage, isStackMissing, isNoUpdates, isSuccessStatus, isFailureStatus, isTerminalStatus, } from "./aws-apply.js";
|
|
19
|
+
// Effect-receipt activities (#1835) — core's receipt seam (#1834) bound to
|
|
20
|
+
// the SSM store, the way the k8s lexicon binds `ensureSecret` (#1830). The
|
|
21
|
+
// registry keys exported functions by name, so the three bound activities are
|
|
22
|
+
// re-exported individually: `receiptRead`/`receiptWrite` serve the `effect()`
|
|
23
|
+
// step's read-compare-run-write, `receiptStaleness` serves WatchOp's
|
|
24
|
+
// read-only phase. The store resolves its path identity and endpoint lazily
|
|
25
|
+
// at first use, so this module stays cheap to load.
|
|
26
|
+
import { receiptActivities } from "@intentius/chant/op/receipt-store";
|
|
27
|
+
import { awsReceiptStore } from "../../receipt-store.js";
|
|
28
|
+
const boundReceiptActivities = receiptActivities(awsReceiptStore());
|
|
29
|
+
export const receiptRead = boundReceiptActivities.receiptRead;
|
|
30
|
+
export const receiptWrite = boundReceiptActivities.receiptWrite;
|
|
31
|
+
export const receiptStaleness = boundReceiptActivities.receiptStaleness;
|
|
32
|
+
export { awsAgentCoreFetchTrace } from "../../agentcore/trace-fetch.js";
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Typed step-builder wrappers for this lexicon's activities (chant #1288
|
|
3
|
+
* Stage 2). See `lexicons/k8s/src/op/builders.ts`'s module doc for why these
|
|
4
|
+
* live beside their `*Args` interfaces rather than in core: core cannot
|
|
5
|
+
* import a lexicon's types (lexicons depend on core, not the reverse), so a
|
|
6
|
+
* wrapper whose `opts` IS the activity's own `*Args` interface can only sit
|
|
7
|
+
* in the lexicon that declares that interface. `opts`'s type in
|
|
8
|
+
* each wrapper below IS the activity's own `*Args` interface (via
|
|
9
|
+
* `Omit`/`WithStepRefs`) — never restated. `core`'s own
|
|
10
|
+
* `awsApply`/`awsDelete`/`flociUp`/`flociDown` are unchanged and produce
|
|
11
|
+
* byte-identical `ActivityStep` output; these are purely additive.
|
|
12
|
+
*/
|
|
13
|
+
import { activity, takeProfileAndId, } from "@intentius/chant/op";
|
|
14
|
+
/**
|
|
15
|
+
* Deploy a built CloudFormation template directly against the CFN API — the
|
|
16
|
+
* fully typed twin of core's `awsApply`. `opts` is {@link AwsApplyArgs}
|
|
17
|
+
* itself, minus the positional `templatePath`. Defaults to the `longInfra`
|
|
18
|
+
* profile.
|
|
19
|
+
*/
|
|
20
|
+
export const awsApply = (templatePath, opts) => {
|
|
21
|
+
const { args, profile, id } = takeProfileAndId(opts);
|
|
22
|
+
return activity("awsApply", { templatePath, ...args }, { profile: profile ?? "longInfra", ...(id ? { id } : {}) });
|
|
23
|
+
};
|
|
24
|
+
/**
|
|
25
|
+
* Delete a CloudFormation stack — the inverse of {@link awsApply}, fully
|
|
26
|
+
* typed twin of core's `awsDelete`. `opts` is {@link AwsDeleteArgs} itself,
|
|
27
|
+
* minus the positional `templatePath`. Defaults to the `longInfra` profile.
|
|
28
|
+
*/
|
|
29
|
+
export const awsDelete = (templatePath, opts) => {
|
|
30
|
+
const { args, profile, id } = takeProfileAndId(opts);
|
|
31
|
+
return activity("awsDelete", { templatePath, ...args }, { profile: profile ?? "longInfra", ...(id ? { id } : {}) });
|
|
32
|
+
};
|
|
33
|
+
/**
|
|
34
|
+
* Boot the local Floci AWS emulator — the fully typed twin of core's
|
|
35
|
+
* `flociUp`. `opts` is {@link FlociUpArgs} itself. Defaults to the
|
|
36
|
+
* `longInfra` profile.
|
|
37
|
+
*/
|
|
38
|
+
export const flociUp = (opts) => {
|
|
39
|
+
const { args, profile, id } = takeProfileAndId(opts);
|
|
40
|
+
return activity("flociUp", args, { profile: profile ?? "longInfra", ...(id ? { id } : {}) });
|
|
41
|
+
};
|
|
42
|
+
/**
|
|
43
|
+
* Stop and remove the local Floci emulator container — the fully typed twin
|
|
44
|
+
* of core's `flociDown`. `opts` is {@link FlociDownArgs} itself. Defaults to
|
|
45
|
+
* the `fastIdempotent` profile.
|
|
46
|
+
*/
|
|
47
|
+
export const flociDown = (opts) => {
|
|
48
|
+
const { args, profile, id } = takeProfileAndId(opts);
|
|
49
|
+
return activity("flociDown", args, { profile: profile ?? "fastIdempotent", ...(id ? { id } : {}) });
|
|
50
|
+
};
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The aws lexicon's ownership tag convention. AWS tag keys allow `:`, so
|
|
3
|
+
* chant's markers use the `chant:<name>` form (distinct from the label-based
|
|
4
|
+
* convention core keeps for k8s/gcp). Core owns the generic stamp/detect logic
|
|
5
|
+
* (@intentius/chant/ownership); this is the aws-specific key naming it stamps.
|
|
6
|
+
*/
|
|
7
|
+
/** AWS tag keys for chant's ownership markers. */
|
|
8
|
+
export const AWS_TAG_OWNERSHIP_KEYS = {
|
|
9
|
+
managedBy: "chant:managed-by",
|
|
10
|
+
stack: "chant:stack",
|
|
11
|
+
env: "chant:env",
|
|
12
|
+
};
|
|
13
|
+
/**
|
|
14
|
+
* Template-level `Metadata` key the serializer stamps the ownership marker
|
|
15
|
+
* under (#1222). Stack-level teardown verifies ownership on the *stack's own*
|
|
16
|
+
* tags, and CloudFormation stack tags are an API parameter, not a template
|
|
17
|
+
* section — so the template carries the marker here and the apply paths
|
|
18
|
+
* (`awsApply`, the `cfn-deploy` change set) turn it into stack tags on
|
|
19
|
+
* create/update. One source: the same build that stamps resource tags decides
|
|
20
|
+
* the stack tags.
|
|
21
|
+
*/
|
|
22
|
+
export const OWNERSHIP_METADATA_KEY = "chant:ownership";
|
|
23
|
+
/**
|
|
24
|
+
* The stack tags a template body asks for: the flat tag map under
|
|
25
|
+
* `Metadata["chant:ownership"]`, or nothing. Total on bad input — a body that
|
|
26
|
+
* is not JSON (a YAML template, a handwritten one) or carries no marker
|
|
27
|
+
* returns `{}`, and the stack simply stays untagged, which teardown reports
|
|
28
|
+
* as unverified rather than deleting.
|
|
29
|
+
*/
|
|
30
|
+
export function ownershipStackTagsForBody(body) {
|
|
31
|
+
let template;
|
|
32
|
+
try {
|
|
33
|
+
template = JSON.parse(body);
|
|
34
|
+
}
|
|
35
|
+
catch {
|
|
36
|
+
return {};
|
|
37
|
+
}
|
|
38
|
+
if (typeof template !== "object" || template === null)
|
|
39
|
+
return {};
|
|
40
|
+
const metadata = template.Metadata;
|
|
41
|
+
if (typeof metadata !== "object" || metadata === null)
|
|
42
|
+
return {};
|
|
43
|
+
const marker = metadata[OWNERSHIP_METADATA_KEY];
|
|
44
|
+
if (typeof marker !== "object" || marker === null)
|
|
45
|
+
return {};
|
|
46
|
+
const tags = {};
|
|
47
|
+
for (const [key, value] of Object.entries(marker)) {
|
|
48
|
+
if (typeof value === "string")
|
|
49
|
+
tags[key] = value;
|
|
50
|
+
}
|
|
51
|
+
return tags;
|
|
52
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
#!/usr/bin/env tsx
|
|
2
|
+
/**
|
|
3
|
+
* Thin entry point for `npm run bundle` in lexicon-aws.
|
|
4
|
+
* Generates src/generated/ files and writes dist/ bundle.
|
|
5
|
+
*
|
|
6
|
+
* NOTE: Does NOT call plugin.package() because that internally spawns
|
|
7
|
+
* `npm pack`, which would cause infinite recursion when invoked
|
|
8
|
+
* from a prepack lifecycle script.
|
|
9
|
+
*/
|
|
10
|
+
import { generate, writeGeneratedFiles } from "./codegen/generate.js";
|
|
11
|
+
import { packageLexicon } from "./codegen/package.js";
|
|
12
|
+
import { writeBundleSpec } from "@intentius/chant/codegen/package";
|
|
13
|
+
import { join, dirname } from "path";
|
|
14
|
+
import { fileURLToPath } from "url";
|
|
15
|
+
const pkgDir = dirname(dirname(fileURLToPath(import.meta.url)));
|
|
16
|
+
// 1. Generate src/generated/ files
|
|
17
|
+
const genResult = await generate({ verbose: true });
|
|
18
|
+
writeGeneratedFiles(genResult, pkgDir);
|
|
19
|
+
console.error(`Generated ${genResult.resources} resources, ${genResult.properties} property types, ${genResult.enums} enums`);
|
|
20
|
+
// 2. Run package pipeline and write dist/
|
|
21
|
+
const { spec, stats } = await packageLexicon({ verbose: true });
|
|
22
|
+
const distDir = join(pkgDir, "dist");
|
|
23
|
+
writeBundleSpec(spec, distDir);
|
|
24
|
+
console.error(`Packaged ${stats.resources} resources, ${stats.ruleCount} rules, ${stats.skillCount} skills`);
|
|
25
|
+
console.error(`dist/ written to ${distDir}`);
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
var _a;
|
|
2
|
+
import { DECLARABLE_MARKER } from "@intentius/chant/declarable";
|
|
3
|
+
export class Parameter {
|
|
4
|
+
constructor(type, options) {
|
|
5
|
+
this[_a] = true;
|
|
6
|
+
this.lexicon = "aws";
|
|
7
|
+
this.entityType = "AWS::CloudFormation::Parameter";
|
|
8
|
+
this.parameterType = type;
|
|
9
|
+
this.description = options?.description;
|
|
10
|
+
this.defaultValue = options?.defaultValue;
|
|
11
|
+
if (options) {
|
|
12
|
+
const { description: _d, defaultValue: _v, ...constraints } = options;
|
|
13
|
+
const set = Object.entries(constraints).filter(([, v]) => v !== undefined);
|
|
14
|
+
if (set.length > 0)
|
|
15
|
+
this.constraints = Object.fromEntries(set);
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
_a = DECLARABLE_MARKER;
|
package/dist/plugin.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugin.d.ts","sourceRoot":"","sources":["../src/plugin.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,aAAa,EAAqQ,MAAM,0BAA0B,CAAC;
|
|
1
|
+
{"version":3,"file":"plugin.d.ts","sourceRoot":"","sources":["../src/plugin.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,aAAa,EAAqQ,MAAM,0BAA0B,CAAC;AAwCjU;yEACyE;AACzE,OAAO,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AAiBnD,eAAO,MAAM,SAAS,EAAE,aA+jCvB,CAAC"}
|