@go-to-k/cdkd 0.241.0 → 0.243.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/cli.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { a as getLiveRenderer, c as PATTERN_B_RESOURCE_TYPES, d as generateResourceNameWithFallback, f as withSkipPrefix, i as runStackBuffered, n as getLogger, o as PATTERN_B_NAME_OPTIONS, p as withStackName, s as PATTERN_B_NAME_PROPERTIES, u as generateResourceName } from "./logger-BzO-joNR.js";
|
|
3
3
|
import { A as withErrorHandling, C as StackHasActiveImportsError, S as ResourceUpdateNotSupportedError, _ as MissingCdkCliError, a as normalizeAwsTagsToCfn, b as ProvisioningError, f as LocalInvokeBuildError$1, i as matchesCdkPath, k as normalizeAwsError, l as CdkdError, m as LocalStartServiceError, n as isTerminationProtectionPropagationError, o as resolveExplicitPhysicalId, p as LocalMigrateError, r as CDK_PATH_TAG, s as assertRegionMatch, t as disableInstanceApiTermination, v as NestedStackChildDirectDestroyError, w as StackTerminationProtectionError, x as ResourceTimeoutError, y as PartialFailureError } from "./ec2-termination-protection-q-WGWgxa.js";
|
|
4
4
|
import { a as setAwsClients, i as resetAwsClients, r as getAwsClients, t as AwsClients } from "./aws-clients-B15NAPbL.js";
|
|
5
|
-
import { $ as getDockerCmd, A as DiffCalculator, B as buildAssetRedirectMap, C as findActionableSilentDrops, Ct as resolveBucketRegion, D as refStateLookupFromResource, E as cfnRefValueFromPhysicalId, F as rebuildClientForBucketRegion, G as BOOTSTRAP_MARKER_PREFIX, H as loadPublishableAssetManifest, I as shouldRetainResource, J as parseBootstrapMarker, K as ensureAssetStorage, L as AssetPublisher, M as TemplateParser, N as LockManager, O as WAFv2WebACLProvider, P as S3StateBackend, Q as formatDockerLoginError, R as stringifyValue, S as ProviderRegistry, T as IntrinsicFunctionResolver, U as rewriteTemplateAssetReferences, V as createAssetRedirectResolver, W as AssetModeResolver, X as validateContainerRepoName, Y as validateAssetBucketName, Z as buildDockerImage, _ as green, _t as CFN_TEMPLATE_URL_LIMIT, a as withRetry, at as synthesisStatusMessage, b as IAMRoleProvider, bt as uploadCfnTemplate, c as computeImplicitDeleteEdges, ct as resolveApp, d as isStatefulRecreateTargetSync, dt as resolveSkipPrefix, et as runDockerForeground, f as renderStatefulReason, ft as resolveStateBucketWithDefault, g as gray, gt as CFN_TEMPLATE_BODY_LIMIT, h as cyan, ht as warnDeprecatedNoPrefixCliFlag, i as withResourceDeadline, it as Synthesizer, j as DagBuilder, k as applyRoleArnIfSet, l as extractDeploymentEventError, lt as resolveAutoAssetStorage, m as bold, mt as resolveUseCdkBootstrapAssets, n as DEFAULT_RESOURCE_WARN_AFTER_MS, nt as AssetManifestLoader, o as isRetryableTransientError, ot as getDefaultStateBucketName, p as formatResourceLine, pt as resolveStateBucketWithDefaultAndSource, q as getBootstrapMarkerKey, r as DeployEngine, rt as getDockerImageBySourceHash, s as IMPLICIT_DELETE_DEPENDENCIES, st as getLegacyStateBucketName, t as DEFAULT_RESOURCE_TIMEOUT_MS, tt as runDockerStreaming, u as MULTI_REGION_RECREATE_BLOCKED_TYPES, ut as resolveCaptureObservedState, v as red, vt as MIGRATE_TMP_PREFIX, w as CloudControlProvider, x as collectInlinePolicyNamesManagedBySiblings, xt as AssemblyReader, y as yellow, yt as findLargeInlineResources, z as WorkGraph } from "./deploy-engine-
|
|
5
|
+
import { $ as getDockerCmd, A as DiffCalculator, B as buildAssetRedirectMap, C as findActionableSilentDrops, Ct as resolveBucketRegion, D as refStateLookupFromResource, E as cfnRefValueFromPhysicalId, F as rebuildClientForBucketRegion, G as BOOTSTRAP_MARKER_PREFIX, H as loadPublishableAssetManifest, I as shouldRetainResource, J as parseBootstrapMarker, K as ensureAssetStorage, L as AssetPublisher, M as TemplateParser, N as LockManager, O as WAFv2WebACLProvider, P as S3StateBackend, Q as formatDockerLoginError, R as stringifyValue, S as ProviderRegistry, T as IntrinsicFunctionResolver, U as rewriteTemplateAssetReferences, V as createAssetRedirectResolver, W as AssetModeResolver, X as validateContainerRepoName, Y as validateAssetBucketName, Z as buildDockerImage, _ as green, _t as CFN_TEMPLATE_URL_LIMIT, a as withRetry, at as synthesisStatusMessage, b as IAMRoleProvider, bt as uploadCfnTemplate, c as computeImplicitDeleteEdges, ct as resolveApp, d as isStatefulRecreateTargetSync, dt as resolveSkipPrefix, et as runDockerForeground, f as renderStatefulReason, ft as resolveStateBucketWithDefault, g as gray, gt as CFN_TEMPLATE_BODY_LIMIT, h as cyan, ht as warnDeprecatedNoPrefixCliFlag, i as withResourceDeadline, it as Synthesizer, j as DagBuilder, k as applyRoleArnIfSet, l as extractDeploymentEventError, lt as resolveAutoAssetStorage, m as bold, mt as resolveUseCdkBootstrapAssets, n as DEFAULT_RESOURCE_WARN_AFTER_MS, nt as AssetManifestLoader, o as isRetryableTransientError, ot as getDefaultStateBucketName, p as formatResourceLine, pt as resolveStateBucketWithDefaultAndSource, q as getBootstrapMarkerKey, r as DeployEngine, rt as getDockerImageBySourceHash, s as IMPLICIT_DELETE_DEPENDENCIES, st as getLegacyStateBucketName, t as DEFAULT_RESOURCE_TIMEOUT_MS, tt as runDockerStreaming, u as MULTI_REGION_RECREATE_BLOCKED_TYPES, ut as resolveCaptureObservedState, v as red, vt as MIGRATE_TMP_PREFIX, w as CloudControlProvider, x as collectInlinePolicyNamesManagedBySiblings, xt as AssemblyReader, y as yellow, yt as findLargeInlineResources, z as WorkGraph } from "./deploy-engine-DNqZHDA5.js";
|
|
6
6
|
import { t as expectedOwnerParam } from "./expected-bucket-owner-BjEfUnkA.js";
|
|
7
7
|
import { t as ASGProvider } from "./asg-provider-Dbl1_mwT.js";
|
|
8
8
|
import { AsyncLocalStorage } from "node:async_hooks";
|
|
@@ -23,7 +23,7 @@ import { AddTagsToResourceCommand, DeleteParameterCommand, DescribeParametersCom
|
|
|
23
23
|
import { CloudFrontClient, CreateCloudFrontOriginAccessIdentityCommand, CreateDistributionCommand, CreateDistributionWithTagsCommand, DeleteCloudFrontOriginAccessIdentityCommand, DeleteDistributionCommand, GetCloudFrontOriginAccessIdentityCommand, GetDistributionCommand, GetDistributionConfigCommand, ListDistributionsCommand, ListTagsForResourceCommand as ListTagsForResourceCommand$3, NoSuchCloudFrontOriginAccessIdentity, NoSuchDistribution, TagResourceCommand as TagResourceCommand$6, UntagResourceCommand as UntagResourceCommand$6, UpdateCloudFrontOriginAccessIdentityCommand, UpdateDistributionCommand } from "@aws-sdk/client-cloudfront";
|
|
24
24
|
import { CloudWatchClient, DeleteAlarmsCommand, DescribeAlarmsCommand, ListTagsForResourceCommand as ListTagsForResourceCommand$4, PutMetricAlarmCommand, TagResourceCommand as TagResourceCommand$7, UntagResourceCommand as UntagResourceCommand$7 } from "@aws-sdk/client-cloudwatch";
|
|
25
25
|
import { AssociateKmsKeyCommand, CloudWatchLogsClient, CreateLogGroupCommand, DeleteDataProtectionPolicyCommand, DeleteIndexPolicyCommand, DeleteLogGroupCommand, DeleteRetentionPolicyCommand, DescribeIndexPoliciesCommand, DescribeLogGroupsCommand, DisassociateKmsKeyCommand, GetDataProtectionPolicyCommand, ListTagsForResourceCommand as ListTagsForResourceCommand$5, PutBearerTokenAuthenticationCommand, PutDataProtectionPolicyCommand, PutIndexPolicyCommand, PutLogGroupDeletionProtectionCommand, PutRetentionPolicyCommand, ResourceAlreadyExistsException, ResourceNotFoundException as ResourceNotFoundException$4, TagResourceCommand as TagResourceCommand$8, UntagResourceCommand as UntagResourceCommand$8 } from "@aws-sdk/client-cloudwatch-logs";
|
|
26
|
-
import { BedrockAgentCoreControlClient, CreateAgentRuntimeCommand, DeleteAgentRuntimeCommand, GetAgentRuntimeCommand, ResourceNotFoundException as ResourceNotFoundException$5, UpdateAgentRuntimeCommand } from "@aws-sdk/client-bedrock-agentcore-control";
|
|
26
|
+
import { BedrockAgentCoreControlClient, CreateAgentRuntimeCommand, CreateEvaluatorCommand, DeleteAgentRuntimeCommand, DeleteEvaluatorCommand, GetAgentRuntimeCommand, GetBrowserCommand, GetCodeInterpreterCommand, GetEvaluatorCommand, ListTagsForResourceCommand as ListTagsForResourceCommand$6, ResourceNotFoundException as ResourceNotFoundException$5, TagResourceCommand as TagResourceCommand$9, UntagResourceCommand as UntagResourceCommand$9, UpdateAgentRuntimeCommand, UpdateEvaluatorCommand } from "@aws-sdk/client-bedrock-agentcore-control";
|
|
27
27
|
import { ACMClient, AddTagsToCertificateCommand, DeleteCertificateCommand, DescribeCertificateCommand, ListCertificatesCommand, ListTagsForCertificateCommand, RemoveTagsFromCertificateCommand, RequestCertificateCommand, ResourceNotFoundException as ResourceNotFoundException$6, UpdateCertificateOptionsCommand } from "@aws-sdk/client-acm";
|
|
28
28
|
import * as fs from "node:fs";
|
|
29
29
|
import { cpSync, existsSync, mkdirSync, mkdtempSync, readFileSync, readdirSync, rmSync, statSync, writeFileSync } from "node:fs";
|
|
@@ -31,14 +31,14 @@ import * as path from "node:path";
|
|
|
31
31
|
import { basename, dirname, isAbsolute, join, resolve } from "node:path";
|
|
32
32
|
import { execFile, spawn } from "node:child_process";
|
|
33
33
|
import { tmpdir } from "node:os";
|
|
34
|
-
import { AssociateVPCWithHostedZoneCommand, ChangeResourceRecordSetsCommand, ChangeTagsForResourceCommand, CreateHostedZoneCommand, CreateQueryLoggingConfigCommand, DeleteHostedZoneCommand, DeleteQueryLoggingConfigCommand, DisassociateVPCFromHostedZoneCommand, GetHostedZoneCommand, ListHostedZonesByNameCommand, ListHostedZonesCommand, ListQueryLoggingConfigsCommand, ListResourceRecordSetsCommand, ListTagsForResourceCommand as ListTagsForResourceCommand$
|
|
34
|
+
import { AssociateVPCWithHostedZoneCommand, ChangeResourceRecordSetsCommand, ChangeTagsForResourceCommand, CreateHostedZoneCommand, CreateQueryLoggingConfigCommand, DeleteHostedZoneCommand, DeleteQueryLoggingConfigCommand, DisassociateVPCFromHostedZoneCommand, GetHostedZoneCommand, ListHostedZonesByNameCommand, ListHostedZonesCommand, ListQueryLoggingConfigsCommand, ListResourceRecordSetsCommand, ListTagsForResourceCommand as ListTagsForResourceCommand$7, Route53Client, UpdateHostedZoneCommentCommand, UpdateHostedZoneFeaturesCommand } from "@aws-sdk/client-route-53";
|
|
35
35
|
import { AddTagsCommand, CreateListenerCommand, CreateLoadBalancerCommand, CreateTargetGroupCommand, DeleteListenerCommand, DeleteLoadBalancerCommand, DeleteTargetGroupCommand, DescribeListenerAttributesCommand, DescribeListenersCommand, DescribeLoadBalancerAttributesCommand, DescribeLoadBalancersCommand, DescribeTagsCommand, DescribeTargetGroupsCommand, ElasticLoadBalancingV2Client, ModifyListenerAttributesCommand, ModifyListenerCommand, ModifyLoadBalancerAttributesCommand, ModifyTargetGroupCommand, RemoveTagsCommand, SetIpAddressTypeCommand, SetSecurityGroupsCommand, SetSubnetsCommand } from "@aws-sdk/client-elastic-load-balancing-v2";
|
|
36
|
-
import { CreateAliasCommand, CreateKeyCommand, DeleteAliasCommand, DescribeKeyCommand, DisableKeyCommand, DisableKeyRotationCommand, EnableKeyCommand, EnableKeyRotationCommand, GetKeyPolicyCommand, GetKeyRotationStatusCommand, KMSClient, ListAliasesCommand, ListKeysCommand, ListResourceTagsCommand, NotFoundException as NotFoundException$2, PutKeyPolicyCommand, ScheduleKeyDeletionCommand, TagResourceCommand as TagResourceCommand$
|
|
36
|
+
import { CreateAliasCommand, CreateKeyCommand, DeleteAliasCommand, DescribeKeyCommand, DisableKeyCommand, DisableKeyRotationCommand, EnableKeyCommand, EnableKeyRotationCommand, GetKeyPolicyCommand, GetKeyRotationStatusCommand, KMSClient, ListAliasesCommand, ListKeysCommand, ListResourceTagsCommand, NotFoundException as NotFoundException$2, PutKeyPolicyCommand, ScheduleKeyDeletionCommand, TagResourceCommand as TagResourceCommand$10, UntagResourceCommand as UntagResourceCommand$10, UpdateAliasCommand, UpdateKeyDescriptionCommand } from "@aws-sdk/client-kms";
|
|
37
37
|
import { join as join$1 } from "path";
|
|
38
|
-
import { BatchDeleteImageCommand, CreateRepositoryCommand, DeleteLifecyclePolicyCommand, DeleteRepositoryCommand, DeleteRepositoryPolicyCommand, DescribeImagesCommand as DescribeImagesCommand$1, DescribeRepositoriesCommand, ECRClient, GetAuthorizationTokenCommand, GetLifecyclePolicyCommand, LifecyclePolicyNotFoundException, ListTagsForResourceCommand as ListTagsForResourceCommand$
|
|
38
|
+
import { BatchDeleteImageCommand, CreateRepositoryCommand, DeleteLifecyclePolicyCommand, DeleteRepositoryCommand, DeleteRepositoryPolicyCommand, DescribeImagesCommand as DescribeImagesCommand$1, DescribeRepositoriesCommand, ECRClient, GetAuthorizationTokenCommand, GetLifecyclePolicyCommand, LifecyclePolicyNotFoundException, ListTagsForResourceCommand as ListTagsForResourceCommand$8, PutImageScanningConfigurationCommand, PutImageTagMutabilityCommand, PutLifecyclePolicyCommand, RepositoryNotFoundException, SetRepositoryPolicyCommand, TagResourceCommand as TagResourceCommand$11, UntagResourceCommand as UntagResourceCommand$11 } from "@aws-sdk/client-ecr";
|
|
39
39
|
import graphlib from "graphlib";
|
|
40
|
-
import { AddTagsToResourceCommand as AddTagsToResourceCommand$1, CreateDBClusterCommand, CreateDBInstanceCommand, CreateDBProxyCommand, CreateDBProxyEndpointCommand, CreateDBSubnetGroupCommand, DBProxyEndpointNotFoundFault, DBProxyNotFoundFault, DBProxyTargetGroupNotFoundFault, DBProxyTargetNotFoundFault, DeleteDBClusterCommand, DeleteDBInstanceCommand, DeleteDBProxyCommand, DeleteDBProxyEndpointCommand, DeleteDBSubnetGroupCommand, DeregisterDBProxyTargetsCommand, DescribeDBClustersCommand, DescribeDBInstancesCommand, DescribeDBProxiesCommand, DescribeDBProxyEndpointsCommand, DescribeDBProxyTargetGroupsCommand, DescribeDBProxyTargetsCommand, DescribeDBSubnetGroupsCommand, ListTagsForResourceCommand as ListTagsForResourceCommand$
|
|
41
|
-
import { AddTagsToResourceCommand as AddTagsToResourceCommand$2, CreateCacheClusterCommand, CreateCacheSubnetGroupCommand, DeleteCacheClusterCommand, DeleteCacheSubnetGroupCommand, DescribeCacheClustersCommand, DescribeCacheSubnetGroupsCommand, ElastiCacheClient, ListTagsForResourceCommand as ListTagsForResourceCommand$
|
|
40
|
+
import { AddTagsToResourceCommand as AddTagsToResourceCommand$1, CreateDBClusterCommand, CreateDBInstanceCommand, CreateDBProxyCommand, CreateDBProxyEndpointCommand, CreateDBSubnetGroupCommand, DBProxyEndpointNotFoundFault, DBProxyNotFoundFault, DBProxyTargetGroupNotFoundFault, DBProxyTargetNotFoundFault, DeleteDBClusterCommand, DeleteDBInstanceCommand, DeleteDBProxyCommand, DeleteDBProxyEndpointCommand, DeleteDBSubnetGroupCommand, DeregisterDBProxyTargetsCommand, DescribeDBClustersCommand, DescribeDBInstancesCommand, DescribeDBProxiesCommand, DescribeDBProxyEndpointsCommand, DescribeDBProxyTargetGroupsCommand, DescribeDBProxyTargetsCommand, DescribeDBSubnetGroupsCommand, ListTagsForResourceCommand as ListTagsForResourceCommand$9, ModifyDBClusterCommand, ModifyDBInstanceCommand, ModifyDBProxyCommand, ModifyDBProxyEndpointCommand, ModifyDBProxyTargetGroupCommand, ModifyDBSubnetGroupCommand, RDSClient, RegisterDBProxyTargetsCommand, RemoveTagsFromResourceCommand as RemoveTagsFromResourceCommand$1 } from "@aws-sdk/client-rds";
|
|
41
|
+
import { AddTagsToResourceCommand as AddTagsToResourceCommand$2, CreateCacheClusterCommand, CreateCacheSubnetGroupCommand, DeleteCacheClusterCommand, DeleteCacheSubnetGroupCommand, DescribeCacheClustersCommand, DescribeCacheSubnetGroupsCommand, ElastiCacheClient, ListTagsForResourceCommand as ListTagsForResourceCommand$10, ModifyCacheClusterCommand, ModifyCacheSubnetGroupCommand, RemoveTagsFromResourceCommand as RemoveTagsFromResourceCommand$2 } from "@aws-sdk/client-elasticache";
|
|
42
42
|
import { Command, Option } from "commander";
|
|
43
43
|
import * as readline$1 from "node:readline/promises";
|
|
44
44
|
import readline from "node:readline/promises";
|
|
@@ -46,26 +46,26 @@ import { writeFileSync as writeFileSync$1 } from "fs";
|
|
|
46
46
|
import * as zlib from "node:zlib";
|
|
47
47
|
import { ApplicationAutoScalingClient, DeleteScalingPolicyCommand, DeregisterScalableTargetCommand, DescribeScalableTargetsCommand, DescribeScalingPoliciesCommand, PutScalingPolicyCommand, RegisterScalableTargetCommand } from "@aws-sdk/client-application-auto-scaling";
|
|
48
48
|
import { ApiGatewayV2Client, CreateApiCommand, CreateAuthorizerCommand as CreateAuthorizerCommand$1, CreateIntegrationCommand, CreateRouteCommand as CreateRouteCommand$1, CreateStageCommand as CreateStageCommand$1, DeleteApiCommand, DeleteAuthorizerCommand as DeleteAuthorizerCommand$1, DeleteIntegrationCommand, DeleteRouteCommand as DeleteRouteCommand$1, DeleteStageCommand as DeleteStageCommand$1, GetApiCommand, GetApisCommand, GetAuthorizerCommand as GetAuthorizerCommand$1, GetIntegrationCommand, GetRouteCommand, GetStageCommand as GetStageCommand$1, NotFoundException as NotFoundException$3, UpdateApiCommand, UpdateAuthorizerCommand as UpdateAuthorizerCommand$1, UpdateIntegrationCommand, UpdateRouteCommand, UpdateStageCommand as UpdateStageCommand$1 } from "@aws-sdk/client-apigatewayv2";
|
|
49
|
-
import { CreateStateMachineCommand, DeleteStateMachineCommand, DescribeStateMachineCommand, ListStateMachinesCommand, ListTagsForResourceCommand as ListTagsForResourceCommand$
|
|
50
|
-
import { CreateClusterCommand, CreateServiceCommand, DeleteClusterCommand, DeleteServiceCommand, DeregisterTaskDefinitionCommand, DescribeClustersCommand, DescribeServicesCommand, DescribeTaskDefinitionCommand, ECSClient, ListClustersCommand, ListServicesCommand, ListTagsForResourceCommand as ListTagsForResourceCommand$
|
|
51
|
-
import { AddTagsToResourceCommand as AddTagsToResourceCommand$3, CreateDBClusterCommand as CreateDBClusterCommand$1, CreateDBInstanceCommand as CreateDBInstanceCommand$1, CreateDBSubnetGroupCommand as CreateDBSubnetGroupCommand$1, DeleteDBClusterCommand as DeleteDBClusterCommand$1, DeleteDBInstanceCommand as DeleteDBInstanceCommand$1, DeleteDBSubnetGroupCommand as DeleteDBSubnetGroupCommand$1, DescribeDBClustersCommand as DescribeDBClustersCommand$1, DescribeDBInstancesCommand as DescribeDBInstancesCommand$1, DescribeDBSubnetGroupsCommand as DescribeDBSubnetGroupsCommand$1, DocDBClient, ListTagsForResourceCommand as ListTagsForResourceCommand$
|
|
52
|
-
import { AddTagsToResourceCommand as AddTagsToResourceCommand$4, CreateDBClusterCommand as CreateDBClusterCommand$2, CreateDBInstanceCommand as CreateDBInstanceCommand$2, CreateDBSubnetGroupCommand as CreateDBSubnetGroupCommand$2, DeleteDBClusterCommand as DeleteDBClusterCommand$2, DeleteDBInstanceCommand as DeleteDBInstanceCommand$2, DeleteDBSubnetGroupCommand as DeleteDBSubnetGroupCommand$2, DescribeDBClustersCommand as DescribeDBClustersCommand$2, DescribeDBInstancesCommand as DescribeDBInstancesCommand$2, DescribeDBSubnetGroupsCommand as DescribeDBSubnetGroupsCommand$2, ListTagsForResourceCommand as ListTagsForResourceCommand$
|
|
53
|
-
import { AddCustomAttributesCommand, CognitoIdentityProviderClient, CreateUserPoolCommand, DeleteUserPoolCommand, DescribeUserPoolCommand, GetUserPoolMfaConfigCommand, ListTagsForResourceCommand as ListTagsForResourceCommand$
|
|
54
|
-
import { CreatePrivateDnsNamespaceCommand, CreateServiceCommand as CreateServiceCommand$1, DeleteNamespaceCommand, DeleteServiceAttributesCommand, DeleteServiceCommand as DeleteServiceCommand$1, GetNamespaceCommand, GetOperationCommand, GetServiceAttributesCommand, GetServiceCommand, ListNamespacesCommand, ListServicesCommand as ListServicesCommand$1, ListTagsForResourceCommand as ListTagsForResourceCommand$
|
|
55
|
-
import { AppSyncClient, CreateApiKeyCommand, CreateDataSourceCommand, CreateGraphqlApiCommand, CreateResolverCommand, DeleteApiKeyCommand, DeleteDataSourceCommand, DeleteGraphqlApiCommand, DeleteResolverCommand, GetDataSourceCommand, GetGraphqlApiCommand, GetIntrospectionSchemaCommand, GetResolverCommand, ListApiKeysCommand, ListGraphqlApisCommand, NotFoundException as NotFoundException$4, StartSchemaCreationCommand, TagResourceCommand as TagResourceCommand$
|
|
49
|
+
import { CreateStateMachineCommand, DeleteStateMachineCommand, DescribeStateMachineCommand, ListStateMachinesCommand, ListTagsForResourceCommand as ListTagsForResourceCommand$11, SFNClient, StateMachineDoesNotExist, TagResourceCommand as TagResourceCommand$12, UntagResourceCommand as UntagResourceCommand$12, UpdateStateMachineCommand } from "@aws-sdk/client-sfn";
|
|
50
|
+
import { CreateClusterCommand, CreateServiceCommand, DeleteClusterCommand, DeleteServiceCommand, DeregisterTaskDefinitionCommand, DescribeClustersCommand, DescribeServicesCommand, DescribeTaskDefinitionCommand, ECSClient, ListClustersCommand, ListServicesCommand, ListTagsForResourceCommand as ListTagsForResourceCommand$12, PutClusterCapacityProvidersCommand, RegisterTaskDefinitionCommand, TagResourceCommand as TagResourceCommand$13, UntagResourceCommand as UntagResourceCommand$13, UpdateClusterCommand, UpdateServiceCommand } from "@aws-sdk/client-ecs";
|
|
51
|
+
import { AddTagsToResourceCommand as AddTagsToResourceCommand$3, CreateDBClusterCommand as CreateDBClusterCommand$1, CreateDBInstanceCommand as CreateDBInstanceCommand$1, CreateDBSubnetGroupCommand as CreateDBSubnetGroupCommand$1, DeleteDBClusterCommand as DeleteDBClusterCommand$1, DeleteDBInstanceCommand as DeleteDBInstanceCommand$1, DeleteDBSubnetGroupCommand as DeleteDBSubnetGroupCommand$1, DescribeDBClustersCommand as DescribeDBClustersCommand$1, DescribeDBInstancesCommand as DescribeDBInstancesCommand$1, DescribeDBSubnetGroupsCommand as DescribeDBSubnetGroupsCommand$1, DocDBClient, ListTagsForResourceCommand as ListTagsForResourceCommand$13, ModifyDBClusterCommand as ModifyDBClusterCommand$1, ModifyDBInstanceCommand as ModifyDBInstanceCommand$1, ModifyDBSubnetGroupCommand as ModifyDBSubnetGroupCommand$1, RemoveTagsFromResourceCommand as RemoveTagsFromResourceCommand$3 } from "@aws-sdk/client-docdb";
|
|
52
|
+
import { AddTagsToResourceCommand as AddTagsToResourceCommand$4, CreateDBClusterCommand as CreateDBClusterCommand$2, CreateDBInstanceCommand as CreateDBInstanceCommand$2, CreateDBSubnetGroupCommand as CreateDBSubnetGroupCommand$2, DeleteDBClusterCommand as DeleteDBClusterCommand$2, DeleteDBInstanceCommand as DeleteDBInstanceCommand$2, DeleteDBSubnetGroupCommand as DeleteDBSubnetGroupCommand$2, DescribeDBClustersCommand as DescribeDBClustersCommand$2, DescribeDBInstancesCommand as DescribeDBInstancesCommand$2, DescribeDBSubnetGroupsCommand as DescribeDBSubnetGroupsCommand$2, ListTagsForResourceCommand as ListTagsForResourceCommand$14, ModifyDBClusterCommand as ModifyDBClusterCommand$2, ModifyDBInstanceCommand as ModifyDBInstanceCommand$2, ModifyDBSubnetGroupCommand as ModifyDBSubnetGroupCommand$2, NeptuneClient, RemoveTagsFromResourceCommand as RemoveTagsFromResourceCommand$4 } from "@aws-sdk/client-neptune";
|
|
53
|
+
import { AddCustomAttributesCommand, CognitoIdentityProviderClient, CreateUserPoolCommand, DeleteUserPoolCommand, DescribeUserPoolCommand, GetUserPoolMfaConfigCommand, ListTagsForResourceCommand as ListTagsForResourceCommand$15, ListUserPoolsCommand, ResourceNotFoundException as ResourceNotFoundException$7, SetUserPoolMfaConfigCommand, UpdateUserPoolCommand } from "@aws-sdk/client-cognito-identity-provider";
|
|
54
|
+
import { CreateHttpNamespaceCommand, CreatePrivateDnsNamespaceCommand, CreatePublicDnsNamespaceCommand, CreateServiceCommand as CreateServiceCommand$1, DeleteNamespaceCommand, DeleteServiceAttributesCommand, DeleteServiceCommand as DeleteServiceCommand$1, GetNamespaceCommand, GetOperationCommand, GetServiceAttributesCommand, GetServiceCommand, ListNamespacesCommand, ListServicesCommand as ListServicesCommand$1, ListTagsForResourceCommand as ListTagsForResourceCommand$16, NamespaceNotFound, ServiceDiscoveryClient, ServiceNotFound, TagResourceCommand as TagResourceCommand$14, UntagResourceCommand as UntagResourceCommand$14, UpdateHttpNamespaceCommand, UpdatePrivateDnsNamespaceCommand, UpdatePublicDnsNamespaceCommand, UpdateServiceAttributesCommand, UpdateServiceCommand as UpdateServiceCommand$1 } from "@aws-sdk/client-servicediscovery";
|
|
55
|
+
import { AppSyncClient, CreateApiKeyCommand, CreateDataSourceCommand, CreateGraphqlApiCommand, CreateResolverCommand, DeleteApiKeyCommand, DeleteDataSourceCommand, DeleteGraphqlApiCommand, DeleteResolverCommand, GetDataSourceCommand, GetGraphqlApiCommand, GetIntrospectionSchemaCommand, GetResolverCommand, ListApiKeysCommand, ListGraphqlApisCommand, NotFoundException as NotFoundException$4, StartSchemaCreationCommand, TagResourceCommand as TagResourceCommand$15, UntagResourceCommand as UntagResourceCommand$15, UpdateApiKeyCommand, UpdateDataSourceCommand, UpdateGraphqlApiCommand, UpdateResolverCommand } from "@aws-sdk/client-appsync";
|
|
56
56
|
import { parse, print } from "graphql";
|
|
57
57
|
import { CrawlerRunningException, CreateConnectionCommand, CreateCrawlerCommand, CreateDatabaseCommand, CreateJobCommand, CreateSecurityConfigurationCommand, CreateTableCommand as CreateTableCommand$1, CreateTriggerCommand, CreateWorkflowCommand, DeleteConnectionCommand, DeleteCrawlerCommand, DeleteDatabaseCommand, DeleteJobCommand, DeleteSecurityConfigurationCommand, DeleteTableCommand as DeleteTableCommand$1, DeleteTriggerCommand, DeleteWorkflowCommand, EntityNotFoundException, GetConnectionCommand, GetCrawlerCommand, GetDatabaseCommand, GetDatabasesCommand, GetJobCommand, GetSecurityConfigurationCommand, GetSecurityConfigurationsCommand, GetTableCommand, GetTablesCommand, GetTagsCommand, GetTriggerCommand, GetWorkflowCommand, GlueClient, ListWorkflowsCommand, StartCrawlerScheduleCommand, StartTriggerCommand, StopCrawlerCommand, StopCrawlerScheduleCommand, StopTriggerCommand, UpdateConnectionCommand, UpdateCrawlerCommand, UpdateDatabaseCommand, UpdateJobCommand, UpdateTableCommand as UpdateTableCommand$1, UpdateTriggerCommand, UpdateWorkflowCommand } from "@aws-sdk/client-glue";
|
|
58
|
-
import { BudgetsClient, CreateBudgetCommand, CreateNotificationCommand, CreateSubscriberCommand, DeleteBudgetCommand, DeleteNotificationCommand, DeleteSubscriberCommand, DescribeBudgetCommand, DescribeBudgetsCommand, DuplicateRecordException, ListTagsForResourceCommand as ListTagsForResourceCommand$
|
|
59
|
-
import { AddTagsToStreamCommand, CreateStreamCommand, DecreaseStreamRetentionPeriodCommand, DeleteStreamCommand, DeregisterStreamConsumerCommand, DescribeStreamCommand, DescribeStreamConsumerCommand, DescribeStreamSummaryCommand, IncreaseStreamRetentionPeriodCommand, KinesisClient, ListStreamsCommand, ListTagsForResourceCommand as ListTagsForResourceCommand$
|
|
58
|
+
import { BudgetsClient, CreateBudgetCommand, CreateNotificationCommand, CreateSubscriberCommand, DeleteBudgetCommand, DeleteNotificationCommand, DeleteSubscriberCommand, DescribeBudgetCommand, DescribeBudgetsCommand, DuplicateRecordException, ListTagsForResourceCommand as ListTagsForResourceCommand$17, NotFoundException as NotFoundException$5, TagResourceCommand as TagResourceCommand$16, UntagResourceCommand as UntagResourceCommand$16, UpdateBudgetCommand } from "@aws-sdk/client-budgets";
|
|
59
|
+
import { AddTagsToStreamCommand, CreateStreamCommand, DecreaseStreamRetentionPeriodCommand, DeleteStreamCommand, DeregisterStreamConsumerCommand, DescribeStreamCommand, DescribeStreamConsumerCommand, DescribeStreamSummaryCommand, IncreaseStreamRetentionPeriodCommand, KinesisClient, ListStreamsCommand, ListTagsForResourceCommand as ListTagsForResourceCommand$18, ListTagsForStreamCommand, RegisterStreamConsumerCommand, RemoveTagsFromStreamCommand, ResourceNotFoundException as ResourceNotFoundException$8, StartStreamEncryptionCommand, StopStreamEncryptionCommand, TagResourceCommand as TagResourceCommand$17, UntagResourceCommand as UntagResourceCommand$17, UpdateShardCountCommand, UpdateStreamModeCommand } from "@aws-sdk/client-kinesis";
|
|
60
60
|
import { CreateScheduleCommand, DeleteScheduleCommand, GetScheduleCommand, ResourceNotFoundException as ResourceNotFoundException$9, SchedulerClient, UpdateScheduleCommand } from "@aws-sdk/client-scheduler";
|
|
61
61
|
import { AccessPointNotFound, CreateAccessPointCommand, CreateFileSystemCommand, CreateMountTargetCommand, DeleteAccessPointCommand, DeleteFileSystemCommand, DeleteMountTargetCommand, DescribeAccessPointsCommand, DescribeBackupPolicyCommand, DescribeFileSystemPolicyCommand, DescribeFileSystemsCommand, DescribeLifecycleConfigurationCommand, DescribeMountTargetSecurityGroupsCommand, DescribeMountTargetsCommand, EFSClient, FileSystemNotFound, ModifyMountTargetSecurityGroupsCommand, MountTargetNotFound, PutBackupPolicyCommand, PutFileSystemPolicyCommand, PutLifecycleConfigurationCommand, UpdateFileSystemCommand, UpdateFileSystemProtectionCommand } from "@aws-sdk/client-efs";
|
|
62
62
|
import { CreateDeliveryStreamCommand, DeleteDeliveryStreamCommand, DescribeDeliveryStreamCommand, FirehoseClient, ListDeliveryStreamsCommand, ListTagsForDeliveryStreamCommand, ResourceNotFoundException as ResourceNotFoundException$10, TagDeliveryStreamCommand, UntagDeliveryStreamCommand, UpdateDestinationCommand } from "@aws-sdk/client-firehose";
|
|
63
63
|
import { AddTagsCommand as AddTagsCommand$1, CloudTrailClient, CreateTrailCommand, DeleteTrailCommand, GetEventSelectorsCommand, GetInsightSelectorsCommand, GetTrailCommand, GetTrailStatusCommand, ListTagsCommand as ListTagsCommand$1, ListTrailsCommand, PutEventSelectorsCommand, PutInsightSelectorsCommand, RemoveTagsCommand as RemoveTagsCommand$1, StartLoggingCommand, StopLoggingCommand, TrailNotFoundException, UpdateTrailCommand } from "@aws-sdk/client-cloudtrail";
|
|
64
64
|
import { BatchGetProjectsCommand, CodeBuildClient, CreateProjectCommand, DeleteProjectCommand, ListProjectsCommand, ResourceNotFoundException as ResourceNotFoundException$11, UpdateProjectCommand } from "@aws-sdk/client-codebuild";
|
|
65
|
-
import { CodeCommitClient, CreateRepositoryCommand as CreateRepositoryCommand$1, DeleteRepositoryCommand as DeleteRepositoryCommand$1, GetRepositoryCommand, ListRepositoriesCommand, ListTagsForResourceCommand as ListTagsForResourceCommand$
|
|
66
|
-
import { CreateLifecyclePolicyCommand, DLMClient, DeleteLifecyclePolicyCommand as DeleteLifecyclePolicyCommand$1, GetLifecyclePoliciesCommand, GetLifecyclePolicyCommand as GetLifecyclePolicyCommand$1, ResourceNotFoundException as ResourceNotFoundException$12, TagResourceCommand as TagResourceCommand$
|
|
67
|
-
import { CreateVectorBucketCommand, DeleteIndexCommand, DeleteVectorBucketCommand, GetVectorBucketCommand, ListIndexesCommand, ListTagsForResourceCommand as ListTagsForResourceCommand$
|
|
68
|
-
import { CreateNamespaceCommand, CreateTableBucketCommand, CreateTableCommand as CreateTableCommand$2, DeleteNamespaceCommand as DeleteNamespaceCommand$1, DeleteTableBucketCommand, DeleteTableCommand as DeleteTableCommand$2, GetTableBucketCommand, GetTableCommand as GetTableCommand$1, ListNamespacesCommand as ListNamespacesCommand$1, ListTableBucketsCommand, ListTablesCommand as ListTablesCommand$1, ListTagsForResourceCommand as ListTagsForResourceCommand$
|
|
65
|
+
import { CodeCommitClient, CreateRepositoryCommand as CreateRepositoryCommand$1, DeleteRepositoryCommand as DeleteRepositoryCommand$1, GetRepositoryCommand, ListRepositoriesCommand, ListTagsForResourceCommand as ListTagsForResourceCommand$19, RepositoryDoesNotExistException, TagResourceCommand as TagResourceCommand$18, UntagResourceCommand as UntagResourceCommand$18, UpdateRepositoryDescriptionCommand, UpdateRepositoryEncryptionKeyCommand, UpdateRepositoryNameCommand } from "@aws-sdk/client-codecommit";
|
|
66
|
+
import { CreateLifecyclePolicyCommand, DLMClient, DeleteLifecyclePolicyCommand as DeleteLifecyclePolicyCommand$1, GetLifecyclePoliciesCommand, GetLifecyclePolicyCommand as GetLifecyclePolicyCommand$1, ResourceNotFoundException as ResourceNotFoundException$12, TagResourceCommand as TagResourceCommand$19, UntagResourceCommand as UntagResourceCommand$19, UpdateLifecyclePolicyCommand } from "@aws-sdk/client-dlm";
|
|
67
|
+
import { CreateVectorBucketCommand, DeleteIndexCommand, DeleteVectorBucketCommand, GetVectorBucketCommand, ListIndexesCommand, ListTagsForResourceCommand as ListTagsForResourceCommand$20, ListVectorBucketsCommand, S3VectorsClient, TagResourceCommand as TagResourceCommand$20, UntagResourceCommand as UntagResourceCommand$20 } from "@aws-sdk/client-s3vectors";
|
|
68
|
+
import { CreateNamespaceCommand, CreateTableBucketCommand, CreateTableCommand as CreateTableCommand$2, DeleteNamespaceCommand as DeleteNamespaceCommand$1, DeleteTableBucketCommand, DeleteTableCommand as DeleteTableCommand$2, GetTableBucketCommand, GetTableCommand as GetTableCommand$1, ListNamespacesCommand as ListNamespacesCommand$1, ListTableBucketsCommand, ListTablesCommand as ListTablesCommand$1, ListTagsForResourceCommand as ListTagsForResourceCommand$21, NotFoundException as NotFoundException$6, S3TablesClient, TagResourceCommand as TagResourceCommand$21, UntagResourceCommand as UntagResourceCommand$21 } from "@aws-sdk/client-s3tables";
|
|
69
69
|
import { Document, Pair, Scalar, YAMLMap, YAMLSeq, parse as parse$1, stringify } from "yaml";
|
|
70
70
|
import { createLocalStartAgentCoreCommand, createLocalStartCloudFrontCommand, createLocalStateProvider, getEmbedConfig, isCfnFlagPresent, listTargets, rejectExplicitCfnStackWithMultipleStacks, resolveCfnFallbackRegion, setEmbedConfig, substituteAgainstState, substituteAgainstStateAsync, substituteEnvVarsFromState, substituteEnvVarsFromStateAsync } from "cdk-local";
|
|
71
71
|
import { A2A_CONTAINER_PORT, A2A_PATH, AGENTCORE_A2A_PROTOCOL, AGENTCORE_AGUI_PROTOCOL, AGENTCORE_MCP_PROTOCOL, ConnectionRegistry, EcsTaskResolutionError, HOST_GATEWAY_MIN_VERSION, LocalInvokeBuildError, MCP_CONTAINER_PORT, MCP_PATH, a2aInvokeOnce, addAlbSpecificOptions, addCommonEcsServiceOptions, addStartServiceSpecificOptions, albStrategy, architectureToPlatform, attachAuthorizers, attachStageContext, availableApiIdentifiers, bufferToBody, buildAgentCoreCodeImage, buildCognitoJwksUrl, buildConnectEvent, buildContainerImage, buildCorsConfigByApiId, buildCorsConfigFromCloudFrontChain, buildDisconnectEvent, buildJwksUrlFromIssuer, buildMessageEvent, buildMgmtEndpointEnvUrl, buildStageMap, classifySourceChange, createAuthorizerCache, createFileWatcher, createFileWatcher as createFileWatcher$1, createJwksCache, createWatchPredicates, defaultCredentialsLoader, derivePseudoParametersFromRegion, discoverRoutes, discoverWebSocketApis, downloadAndExtractS3Bundle, filterRoutesByApiIdentifier, groupRoutesByServer, handleConnectionsRequest, invokeAgentCore, invokeAgentCoreWs, materializeLayerFromArn, mcpInvokeOnce, parseConnectionsPath, parseSelectionExpressionPath, pickAgentCoreCandidateStack, pickAgentCoreCandidateStack as pickAgentCoreCandidateStack$1, probeHostGatewaySupport, readMtlsMaterialsFromDisk, resolveAgentCoreTarget, resolveEnvVars, resolveHostGatewayExtraHosts, resolveRuntimeCodeMountPath, resolveRuntimeFileExtension, resolveRuntimeImage, resolveSingleTarget, resolveWatchConfig, runEcsServiceEmulator, signAgentCoreInvocation, startApiServer, substituteImagePlaceholders, tryResolveImageFnJoin, verifyJwtViaDiscovery, waitForAgentCorePing } from "cdk-local/internal";
|
|
@@ -1888,7 +1888,7 @@ const FLUSH_INTERVAL_MS = 2e3;
|
|
|
1888
1888
|
const FLUSH_EVENT_THRESHOLD = 50;
|
|
1889
1889
|
/** Build-time cdkd version, with a dev fallback for non-built contexts. */
|
|
1890
1890
|
function getCdkdVersion() {
|
|
1891
|
-
return "0.
|
|
1891
|
+
return "0.243.0";
|
|
1892
1892
|
}
|
|
1893
1893
|
/**
|
|
1894
1894
|
* Generate a time-sortable unique run id, e.g.
|
|
@@ -20364,37 +20364,43 @@ var CloudFrontDistributionProvider = class {
|
|
|
20364
20364
|
};
|
|
20365
20365
|
|
|
20366
20366
|
//#endregion
|
|
20367
|
-
//#region src/provisioning/providers/agentcore-
|
|
20367
|
+
//#region src/provisioning/providers/agentcore-case-convert.ts
|
|
20368
20368
|
/**
|
|
20369
|
-
*
|
|
20369
|
+
* PascalCase <-> camelCase key conversion helpers shared by the
|
|
20370
|
+
* BedrockAgentCore SDK Providers (`agentcore-runtime-provider.ts`,
|
|
20371
|
+
* `agentcore-browser-provider.ts`, `agentcore-code-interpreter-provider.ts`,
|
|
20372
|
+
* `agentcore-evaluator-provider.ts`).
|
|
20370
20373
|
*
|
|
20371
|
-
*
|
|
20372
|
-
*
|
|
20373
|
-
*
|
|
20374
|
-
*
|
|
20375
|
-
*
|
|
20376
|
-
*
|
|
20377
|
-
* 6. CC API ClientToken caches the failure result, making it worse
|
|
20374
|
+
* CloudFormation templates carry PascalCase property keys while the
|
|
20375
|
+
* `bedrock-agentcore-control` SDK expects camelCase input shapes (and
|
|
20376
|
+
* returns camelCase output shapes). The BedrockAgentCore CFn schemas mirror
|
|
20377
|
+
* the SDK shapes 1:1 modulo casing, so a mechanical first-letter case flip
|
|
20378
|
+
* round-trips cleanly — including union members (`LlmAsAJudge` <->
|
|
20379
|
+
* `llmAsAJudge`, `CodeBased` <-> `codeBased`).
|
|
20378
20380
|
*
|
|
20379
|
-
*
|
|
20380
|
-
* -
|
|
20381
|
-
* -
|
|
20382
|
-
*
|
|
20383
|
-
* -
|
|
20381
|
+
* `preserveKeys` opts specific keys out of DEEP conversion: the key itself
|
|
20382
|
+
* is still case-flipped, but its VALUE subtree is copied verbatim. Needed
|
|
20383
|
+
* for free-form JSON document properties whose inner keys are user-defined
|
|
20384
|
+
* model/request fields, NOT CFn property names — e.g. the Evaluator's
|
|
20385
|
+
* `AdditionalModelRequestFields` (model-specific request fields like
|
|
20386
|
+
* `top_k` that must reach the service byte-identical).
|
|
20384
20387
|
*/
|
|
20385
20388
|
/**
|
|
20386
20389
|
* Recursively convert PascalCase object keys to camelCase.
|
|
20387
20390
|
* Only converts keys of plain objects; string values, arrays of strings,
|
|
20388
20391
|
* and other primitives are left untouched.
|
|
20392
|
+
*
|
|
20393
|
+
* @param preserveKeys - PascalCase key names whose value subtree is copied
|
|
20394
|
+
* verbatim (the key itself is still converted to camelCase).
|
|
20389
20395
|
*/
|
|
20390
|
-
function pascalToCamelCaseKeys(value) {
|
|
20396
|
+
function pascalToCamelCaseKeys(value, preserveKeys) {
|
|
20391
20397
|
if (value === null || value === void 0) return value;
|
|
20392
|
-
if (Array.isArray(value)) return value.map(pascalToCamelCaseKeys);
|
|
20398
|
+
if (Array.isArray(value)) return value.map((item) => pascalToCamelCaseKeys(item, preserveKeys));
|
|
20393
20399
|
if (typeof value === "object") {
|
|
20394
20400
|
const result = {};
|
|
20395
20401
|
for (const [key, val] of Object.entries(value)) {
|
|
20396
20402
|
const camelKey = key.charAt(0).toLowerCase() + key.slice(1);
|
|
20397
|
-
result[camelKey] = pascalToCamelCaseKeys(val);
|
|
20403
|
+
result[camelKey] = preserveKeys?.has(key) ? val : pascalToCamelCaseKeys(val, preserveKeys);
|
|
20398
20404
|
}
|
|
20399
20405
|
return result;
|
|
20400
20406
|
}
|
|
@@ -20402,22 +20408,46 @@ function pascalToCamelCaseKeys(value) {
|
|
|
20402
20408
|
}
|
|
20403
20409
|
/**
|
|
20404
20410
|
* Recursively convert camelCase object keys to PascalCase. Inverse of
|
|
20405
|
-
* `pascalToCamelCaseKeys`. Used by `readCurrentState` to
|
|
20406
|
-
* SDK responses back into the CFn property names cdkd state
|
|
20411
|
+
* `pascalToCamelCaseKeys`. Used by `readCurrentState` implementations to
|
|
20412
|
+
* re-shape AWS SDK responses back into the CFn property names cdkd state
|
|
20413
|
+
* stores.
|
|
20414
|
+
*
|
|
20415
|
+
* @param preserveKeys - camelCase key names whose value subtree is copied
|
|
20416
|
+
* verbatim (the key itself is still converted to PascalCase).
|
|
20407
20417
|
*/
|
|
20408
|
-
function camelToPascalCaseKeys(value) {
|
|
20418
|
+
function camelToPascalCaseKeys(value, preserveKeys) {
|
|
20409
20419
|
if (value === null || value === void 0) return value;
|
|
20410
|
-
if (Array.isArray(value)) return value.map(camelToPascalCaseKeys);
|
|
20420
|
+
if (Array.isArray(value)) return value.map((item) => camelToPascalCaseKeys(item, preserveKeys));
|
|
20411
20421
|
if (typeof value === "object") {
|
|
20412
20422
|
const result = {};
|
|
20413
20423
|
for (const [key, val] of Object.entries(value)) {
|
|
20414
20424
|
const pascalKey = key.charAt(0).toUpperCase() + key.slice(1);
|
|
20415
|
-
result[pascalKey] = camelToPascalCaseKeys(val);
|
|
20425
|
+
result[pascalKey] = preserveKeys?.has(key) ? val : camelToPascalCaseKeys(val, preserveKeys);
|
|
20416
20426
|
}
|
|
20417
20427
|
return result;
|
|
20418
20428
|
}
|
|
20419
20429
|
return value;
|
|
20420
20430
|
}
|
|
20431
|
+
|
|
20432
|
+
//#endregion
|
|
20433
|
+
//#region src/provisioning/providers/agentcore-runtime-provider.ts
|
|
20434
|
+
/**
|
|
20435
|
+
* SDK Provider for AWS::BedrockAgentCore::Runtime
|
|
20436
|
+
*
|
|
20437
|
+
* Uses direct SDK calls instead of Cloud Control API because:
|
|
20438
|
+
* 1. CC API CREATE is async - it returns IN_PROGRESS, then polls for completion
|
|
20439
|
+
* 2. IAM role propagation to BedrockAgentCore is very slow (30-60+ seconds)
|
|
20440
|
+
* 3. When CC API polling returns FAILED (role validation), cdkd retries CREATE
|
|
20441
|
+
* 4. But the first CREATE actually succeeded asynchronously in the background
|
|
20442
|
+
* 5. The retry then fails with "already exists"
|
|
20443
|
+
* 6. CC API ClientToken caches the failure result, making it worse
|
|
20444
|
+
*
|
|
20445
|
+
* With direct SDK calls, we can:
|
|
20446
|
+
* - Call CreateAgentRuntime synchronously
|
|
20447
|
+
* - Get immediate error responses for IAM propagation issues
|
|
20448
|
+
* - Retry with proper exponential backoff
|
|
20449
|
+
* - Avoid the async CREATE + polling + retry conflict
|
|
20450
|
+
*/
|
|
20421
20451
|
/**
|
|
20422
20452
|
* AWS BedrockAgentCore Runtime Provider
|
|
20423
20453
|
*
|
|
@@ -20627,6 +20657,502 @@ var AgentCoreRuntimeProvider = class {
|
|
|
20627
20657
|
}
|
|
20628
20658
|
};
|
|
20629
20659
|
|
|
20660
|
+
//#endregion
|
|
20661
|
+
//#region src/provisioning/providers/agentcore-browser-provider.ts
|
|
20662
|
+
/**
|
|
20663
|
+
* SDK Provider for AWS::BedrockAgentCore::Browser (adopt-only singleton).
|
|
20664
|
+
*
|
|
20665
|
+
* The CloudFormation registry schema declares this type as a READ-ONLY
|
|
20666
|
+
* resource "representing the default service-managed browser"
|
|
20667
|
+
* (`aws.browser.v1`): every schema property (`BrowserArn` / `BrowserId` /
|
|
20668
|
+
* `Name` / `Status`) is read-only, the only handlers are read/list, and the
|
|
20669
|
+
* `BrowserId` pattern is hard-locked to `^aws\.browser\.v1$`. The registry
|
|
20670
|
+
* marks it `NON_PROVISIONABLE`, so Cloud Control cannot deploy it and cdkd's
|
|
20671
|
+
* pre-flight used to reject it (issue #1038).
|
|
20672
|
+
*
|
|
20673
|
+
* cdkd therefore provisions it as an ADOPT operation, not a create:
|
|
20674
|
+
* - `create` verifies the AWS-managed default browser exists in the deploy
|
|
20675
|
+
* region via `GetBrowser` and records its ARN as the physical id (the
|
|
20676
|
+
* type's primaryIdentifier, matching CFn `Ref` semantics).
|
|
20677
|
+
* - `update` is a no-op (no writable properties exist).
|
|
20678
|
+
* - `delete` is a no-op — the default browser is AWS-owned and must never
|
|
20679
|
+
* be deleted when a stack is destroyed.
|
|
20680
|
+
* - `getAttribute` serves the read-only attributes live from `GetBrowser`.
|
|
20681
|
+
*
|
|
20682
|
+
* Custom, user-created browsers are a DIFFERENT CFn type
|
|
20683
|
+
* (`AWS::BedrockAgentCore::BrowserCustom`, FULLY_MUTABLE) which Cloud
|
|
20684
|
+
* Control handles; the `CreateBrowser` / `DeleteBrowser` control-plane ops
|
|
20685
|
+
* belong to that type's lifecycle, not this one's.
|
|
20686
|
+
*/
|
|
20687
|
+
/** The only valid browser id for this type per the CFn schema pattern. */
|
|
20688
|
+
const DEFAULT_BROWSER_ID = "aws.browser.v1";
|
|
20689
|
+
/**
|
|
20690
|
+
* AWS BedrockAgentCore default-Browser Provider (adopt-only).
|
|
20691
|
+
*/
|
|
20692
|
+
var AgentCoreBrowserProvider = class {
|
|
20693
|
+
client;
|
|
20694
|
+
logger = getLogger().child("AgentCoreBrowserProvider");
|
|
20695
|
+
handledProperties = new Map([["AWS::BedrockAgentCore::Browser", /* @__PURE__ */ new Set([])]]);
|
|
20696
|
+
constructor() {
|
|
20697
|
+
const awsClients = getAwsClients();
|
|
20698
|
+
this.client = awsClients.bedrockAgentCoreControl;
|
|
20699
|
+
}
|
|
20700
|
+
/**
|
|
20701
|
+
* "Create" = adopt the AWS-managed default browser: verify it exists in
|
|
20702
|
+
* the deploy region and record its ARN (the CFn primaryIdentifier) as the
|
|
20703
|
+
* physical id. Nothing is created in AWS.
|
|
20704
|
+
*/
|
|
20705
|
+
async create(logicalId, resourceType, _properties) {
|
|
20706
|
+
this.logger.debug(`Adopting AWS-managed default browser for ${logicalId}`);
|
|
20707
|
+
try {
|
|
20708
|
+
const response = await this.client.send(new GetBrowserCommand({ browserId: DEFAULT_BROWSER_ID }));
|
|
20709
|
+
const browserArn = response.browserArn;
|
|
20710
|
+
this.logger.debug(`Adopted default browser ${DEFAULT_BROWSER_ID} (${browserArn})`);
|
|
20711
|
+
return {
|
|
20712
|
+
physicalId: browserArn,
|
|
20713
|
+
attributes: {
|
|
20714
|
+
BrowserArn: browserArn,
|
|
20715
|
+
BrowserId: response.browserId ?? "aws.browser.v1",
|
|
20716
|
+
Name: response.name ?? "",
|
|
20717
|
+
Status: response.status ?? ""
|
|
20718
|
+
}
|
|
20719
|
+
};
|
|
20720
|
+
} catch (error) {
|
|
20721
|
+
const cause = error instanceof Error ? error : void 0;
|
|
20722
|
+
throw new ProvisioningError(`Failed to adopt the AWS-managed default browser for ${logicalId}: ${error instanceof Error ? error.message : String(error)}. Bedrock AgentCore may not be available in this region.`, resourceType, logicalId, void 0, cause);
|
|
20723
|
+
}
|
|
20724
|
+
}
|
|
20725
|
+
/**
|
|
20726
|
+
* Every property on this type is read-only, so there is nothing to
|
|
20727
|
+
* update — keep the existing physical id.
|
|
20728
|
+
*/
|
|
20729
|
+
async update(logicalId, physicalId, _resourceType, _properties, _previousProperties) {
|
|
20730
|
+
this.logger.debug(`No-op update for default browser ${logicalId}`);
|
|
20731
|
+
return {
|
|
20732
|
+
physicalId,
|
|
20733
|
+
wasReplaced: false,
|
|
20734
|
+
attributes: {}
|
|
20735
|
+
};
|
|
20736
|
+
}
|
|
20737
|
+
/**
|
|
20738
|
+
* The default browser is AWS-owned; destroying a stack must never delete
|
|
20739
|
+
* it. Pure no-op.
|
|
20740
|
+
*/
|
|
20741
|
+
async delete(logicalId, _physicalId, _resourceType) {
|
|
20742
|
+
this.logger.debug(`No-op delete for AWS-managed default browser ${logicalId}`);
|
|
20743
|
+
}
|
|
20744
|
+
/**
|
|
20745
|
+
* Get resource attribute (for Fn::GetAtt resolution). The CFn read-only
|
|
20746
|
+
* attribute set is BrowserArn / BrowserId / Name / Status.
|
|
20747
|
+
*/
|
|
20748
|
+
async getAttribute(physicalId, _resourceType, attributeName) {
|
|
20749
|
+
if (attributeName === "BrowserArn") return physicalId;
|
|
20750
|
+
if (attributeName === "BrowserId") return DEFAULT_BROWSER_ID;
|
|
20751
|
+
if (attributeName === "Name" || attributeName === "Status") {
|
|
20752
|
+
const response = await this.client.send(new GetBrowserCommand({ browserId: DEFAULT_BROWSER_ID }));
|
|
20753
|
+
return attributeName === "Name" ? response.name : response.status;
|
|
20754
|
+
}
|
|
20755
|
+
throw new Error(`Unsupported attribute: ${attributeName} for AWS::BedrockAgentCore::Browser`);
|
|
20756
|
+
}
|
|
20757
|
+
/** No managed properties → nothing can drift. */
|
|
20758
|
+
async readCurrentState() {
|
|
20759
|
+
return {};
|
|
20760
|
+
}
|
|
20761
|
+
/**
|
|
20762
|
+
* Import: the type is a singleton pointing at the AWS-managed default
|
|
20763
|
+
* browser, so auto-lookup is trivial — resolve it live via `GetBrowser`
|
|
20764
|
+
* (no `--resource` override needed; a supplied override is ignored in
|
|
20765
|
+
* favor of the live ARN, which is the only valid physical id).
|
|
20766
|
+
*/
|
|
20767
|
+
async import(_input) {
|
|
20768
|
+
const response = await this.client.send(new GetBrowserCommand({ browserId: DEFAULT_BROWSER_ID }));
|
|
20769
|
+
return {
|
|
20770
|
+
physicalId: response.browserArn,
|
|
20771
|
+
attributes: {
|
|
20772
|
+
BrowserArn: response.browserArn,
|
|
20773
|
+
BrowserId: response.browserId ?? "aws.browser.v1",
|
|
20774
|
+
Name: response.name ?? "",
|
|
20775
|
+
Status: response.status ?? ""
|
|
20776
|
+
}
|
|
20777
|
+
};
|
|
20778
|
+
}
|
|
20779
|
+
};
|
|
20780
|
+
|
|
20781
|
+
//#endregion
|
|
20782
|
+
//#region src/provisioning/providers/agentcore-code-interpreter-provider.ts
|
|
20783
|
+
/**
|
|
20784
|
+
* SDK Provider for AWS::BedrockAgentCore::CodeInterpreter (adopt-only
|
|
20785
|
+
* singleton).
|
|
20786
|
+
*
|
|
20787
|
+
* The CloudFormation registry schema declares this type as a READ-ONLY
|
|
20788
|
+
* resource "representing the AWS-managed default code interpreter
|
|
20789
|
+
* (aws.codeinterpreter.v1)": every schema property (`CodeInterpreterArn` /
|
|
20790
|
+
* `CodeInterpreterId` / `Status`) is read-only, the only handlers are
|
|
20791
|
+
* read/list, and the `CodeInterpreterId` pattern is hard-locked to
|
|
20792
|
+
* `^aws\.codeinterpreter\.v1$`. The registry marks it `NON_PROVISIONABLE`,
|
|
20793
|
+
* so Cloud Control cannot deploy it and cdkd's pre-flight used to reject it
|
|
20794
|
+
* (issue #1039).
|
|
20795
|
+
*
|
|
20796
|
+
* cdkd therefore provisions it as an ADOPT operation, not a create — see
|
|
20797
|
+
* `agentcore-browser-provider.ts` (the exactly-parallel sibling) for the
|
|
20798
|
+
* full rationale. Custom, user-created code interpreters are a DIFFERENT
|
|
20799
|
+
* CFn type (`AWS::BedrockAgentCore::CodeInterpreterCustom`, FULLY_MUTABLE)
|
|
20800
|
+
* which Cloud Control handles.
|
|
20801
|
+
*/
|
|
20802
|
+
/** The only valid code interpreter id for this type per the CFn schema pattern. */
|
|
20803
|
+
const DEFAULT_CODE_INTERPRETER_ID = "aws.codeinterpreter.v1";
|
|
20804
|
+
/**
|
|
20805
|
+
* AWS BedrockAgentCore default-CodeInterpreter Provider (adopt-only).
|
|
20806
|
+
*/
|
|
20807
|
+
var AgentCoreCodeInterpreterProvider = class {
|
|
20808
|
+
client;
|
|
20809
|
+
logger = getLogger().child("AgentCoreCodeInterpreterProvider");
|
|
20810
|
+
handledProperties = new Map([["AWS::BedrockAgentCore::CodeInterpreter", /* @__PURE__ */ new Set([])]]);
|
|
20811
|
+
constructor() {
|
|
20812
|
+
const awsClients = getAwsClients();
|
|
20813
|
+
this.client = awsClients.bedrockAgentCoreControl;
|
|
20814
|
+
}
|
|
20815
|
+
/**
|
|
20816
|
+
* "Create" = adopt the AWS-managed default code interpreter: verify it
|
|
20817
|
+
* exists in the deploy region and record its ARN (the CFn
|
|
20818
|
+
* primaryIdentifier) as the physical id. Nothing is created in AWS.
|
|
20819
|
+
*/
|
|
20820
|
+
async create(logicalId, resourceType, _properties) {
|
|
20821
|
+
this.logger.debug(`Adopting AWS-managed default code interpreter for ${logicalId}`);
|
|
20822
|
+
try {
|
|
20823
|
+
const response = await this.client.send(new GetCodeInterpreterCommand({ codeInterpreterId: DEFAULT_CODE_INTERPRETER_ID }));
|
|
20824
|
+
const codeInterpreterArn = response.codeInterpreterArn;
|
|
20825
|
+
this.logger.debug(`Adopted default code interpreter ${DEFAULT_CODE_INTERPRETER_ID} (${codeInterpreterArn})`);
|
|
20826
|
+
return {
|
|
20827
|
+
physicalId: codeInterpreterArn,
|
|
20828
|
+
attributes: {
|
|
20829
|
+
CodeInterpreterArn: codeInterpreterArn,
|
|
20830
|
+
CodeInterpreterId: response.codeInterpreterId ?? "aws.codeinterpreter.v1",
|
|
20831
|
+
Status: response.status ?? ""
|
|
20832
|
+
}
|
|
20833
|
+
};
|
|
20834
|
+
} catch (error) {
|
|
20835
|
+
const cause = error instanceof Error ? error : void 0;
|
|
20836
|
+
throw new ProvisioningError(`Failed to adopt the AWS-managed default code interpreter for ${logicalId}: ${error instanceof Error ? error.message : String(error)}. Bedrock AgentCore may not be available in this region.`, resourceType, logicalId, void 0, cause);
|
|
20837
|
+
}
|
|
20838
|
+
}
|
|
20839
|
+
/**
|
|
20840
|
+
* Every property on this type is read-only, so there is nothing to
|
|
20841
|
+
* update — keep the existing physical id.
|
|
20842
|
+
*/
|
|
20843
|
+
async update(logicalId, physicalId, _resourceType, _properties, _previousProperties) {
|
|
20844
|
+
this.logger.debug(`No-op update for default code interpreter ${logicalId}`);
|
|
20845
|
+
return {
|
|
20846
|
+
physicalId,
|
|
20847
|
+
wasReplaced: false,
|
|
20848
|
+
attributes: {}
|
|
20849
|
+
};
|
|
20850
|
+
}
|
|
20851
|
+
/**
|
|
20852
|
+
* The default code interpreter is AWS-owned; destroying a stack must
|
|
20853
|
+
* never delete it. Pure no-op.
|
|
20854
|
+
*/
|
|
20855
|
+
async delete(logicalId, _physicalId, _resourceType) {
|
|
20856
|
+
this.logger.debug(`No-op delete for AWS-managed default code interpreter ${logicalId}`);
|
|
20857
|
+
}
|
|
20858
|
+
/**
|
|
20859
|
+
* Get resource attribute (for Fn::GetAtt resolution). The CFn read-only
|
|
20860
|
+
* attribute set is CodeInterpreterArn / CodeInterpreterId / Status.
|
|
20861
|
+
*/
|
|
20862
|
+
async getAttribute(physicalId, _resourceType, attributeName) {
|
|
20863
|
+
if (attributeName === "CodeInterpreterArn") return physicalId;
|
|
20864
|
+
if (attributeName === "CodeInterpreterId") return DEFAULT_CODE_INTERPRETER_ID;
|
|
20865
|
+
if (attributeName === "Status") return (await this.client.send(new GetCodeInterpreterCommand({ codeInterpreterId: DEFAULT_CODE_INTERPRETER_ID }))).status;
|
|
20866
|
+
throw new Error(`Unsupported attribute: ${attributeName} for AWS::BedrockAgentCore::CodeInterpreter`);
|
|
20867
|
+
}
|
|
20868
|
+
/** No managed properties → nothing can drift. */
|
|
20869
|
+
async readCurrentState() {
|
|
20870
|
+
return {};
|
|
20871
|
+
}
|
|
20872
|
+
/**
|
|
20873
|
+
* Import: the type is a singleton pointing at the AWS-managed default
|
|
20874
|
+
* code interpreter, so auto-lookup is trivial — resolve it live via
|
|
20875
|
+
* `GetCodeInterpreter` (no `--resource` override needed; a supplied
|
|
20876
|
+
* override is ignored in favor of the live ARN, which is the only valid
|
|
20877
|
+
* physical id).
|
|
20878
|
+
*/
|
|
20879
|
+
async import(_input) {
|
|
20880
|
+
const response = await this.client.send(new GetCodeInterpreterCommand({ codeInterpreterId: DEFAULT_CODE_INTERPRETER_ID }));
|
|
20881
|
+
return {
|
|
20882
|
+
physicalId: response.codeInterpreterArn,
|
|
20883
|
+
attributes: {
|
|
20884
|
+
CodeInterpreterArn: response.codeInterpreterArn,
|
|
20885
|
+
CodeInterpreterId: response.codeInterpreterId ?? "aws.codeinterpreter.v1",
|
|
20886
|
+
Status: response.status ?? ""
|
|
20887
|
+
}
|
|
20888
|
+
};
|
|
20889
|
+
}
|
|
20890
|
+
};
|
|
20891
|
+
|
|
20892
|
+
//#endregion
|
|
20893
|
+
//#region src/provisioning/providers/agentcore-evaluator-provider.ts
|
|
20894
|
+
/**
|
|
20895
|
+
* SDK Provider for AWS::BedrockAgentCore::Evaluator
|
|
20896
|
+
*
|
|
20897
|
+
* Provisions custom evaluators (LLM-as-a-Judge or code-based Lambda
|
|
20898
|
+
* configs) for AgentCore quality evaluations via the
|
|
20899
|
+
* `bedrock-agentcore-control` control plane (issue #1058).
|
|
20900
|
+
*
|
|
20901
|
+
* Uses direct SDK calls (`CreateEvaluator` / `UpdateEvaluator` /
|
|
20902
|
+
* `DeleteEvaluator` / `GetEvaluator`) instead of Cloud Control for the same
|
|
20903
|
+
* reasons as the sibling `agentcore-runtime-provider.ts`: synchronous
|
|
20904
|
+
* responses, immediate error surfaces, and no CC-API polling overhead.
|
|
20905
|
+
*
|
|
20906
|
+
* CFn <-> SDK mapping notes (verified against the registry schema and
|
|
20907
|
+
* `@aws-sdk/client-bedrock-agentcore-control` typings):
|
|
20908
|
+
* - The physical id is the Evaluator ARN (the type's primaryIdentifier, so
|
|
20909
|
+
* `Ref` matches CloudFormation); the SDK ops take the evaluator ID, which
|
|
20910
|
+
* is the ARN's final `evaluator/<id>` path segment.
|
|
20911
|
+
* - `EvaluatorConfig` is a union (`LlmAsAJudge` | `CodeBased`) whose member
|
|
20912
|
+
* and field names map 1:1 to the SDK's camelCase shapes — EXCEPT the
|
|
20913
|
+
* free-form `AdditionalModelRequestFields` document, whose inner keys are
|
|
20914
|
+
* model-specific request fields (e.g. `top_k`) and must be passed
|
|
20915
|
+
* verbatim (see `agentcore-case-convert.ts`).
|
|
20916
|
+
* - CFn `Tags` is a `[{Key, Value}]` list; the SDK's create/tag ops take a
|
|
20917
|
+
* `Record<string, string>` map. `UpdateEvaluator` does not accept tags,
|
|
20918
|
+
* so tag changes go through `TagResource` / `UntagResource`.
|
|
20919
|
+
* - `EvaluatorName` is the type's only createOnly property; a name change
|
|
20920
|
+
* is classified as replacement by the deploy engine's registry-schema
|
|
20921
|
+
* createOnly fallback (`create-only-properties.ts`) — no per-provider
|
|
20922
|
+
* replacement logic needed.
|
|
20923
|
+
*/
|
|
20924
|
+
/**
|
|
20925
|
+
* The `EvaluatorConfig` subtree keys whose values are free-form JSON
|
|
20926
|
+
* documents (user/model-defined keys) that must NOT be case-converted.
|
|
20927
|
+
*/
|
|
20928
|
+
const CFN_PRESERVE_KEYS = new Set(["AdditionalModelRequestFields"]);
|
|
20929
|
+
const SDK_PRESERVE_KEYS = new Set(["additionalModelRequestFields"]);
|
|
20930
|
+
/**
|
|
20931
|
+
* Extract the evaluator ID from an evaluator ARN
|
|
20932
|
+
* (`arn:...:evaluator/<id>` → `<id>`). Falls back to the input verbatim
|
|
20933
|
+
* when it does not look like an ARN (already an ID).
|
|
20934
|
+
*/
|
|
20935
|
+
function evaluatorIdFromArn(arnOrId) {
|
|
20936
|
+
const idx = arnOrId.indexOf(":evaluator/");
|
|
20937
|
+
return idx >= 0 ? arnOrId.slice(idx + 11) : arnOrId;
|
|
20938
|
+
}
|
|
20939
|
+
/** CFn `[{Key, Value}]` tag list → SDK `Record<string, string>` map. */
|
|
20940
|
+
function cfnTagListToMap(tags) {
|
|
20941
|
+
const map = {};
|
|
20942
|
+
if (Array.isArray(tags)) {
|
|
20943
|
+
for (const tag of tags) if (tag !== null && typeof tag === "object" && typeof tag["Key"] === "string") map[tag["Key"]] = String(tag["Value"] ?? "");
|
|
20944
|
+
}
|
|
20945
|
+
return map;
|
|
20946
|
+
}
|
|
20947
|
+
/** SDK `Record<string, string>` tag map → CFn `[{Key, Value}]` list. */
|
|
20948
|
+
function tagMapToCfnList(tags) {
|
|
20949
|
+
return Object.entries(tags).map(([Key, Value]) => ({
|
|
20950
|
+
Key,
|
|
20951
|
+
Value
|
|
20952
|
+
}));
|
|
20953
|
+
}
|
|
20954
|
+
/**
|
|
20955
|
+
* AWS BedrockAgentCore Evaluator Provider
|
|
20956
|
+
*/
|
|
20957
|
+
var AgentCoreEvaluatorProvider = class {
|
|
20958
|
+
client;
|
|
20959
|
+
logger = getLogger().child("AgentCoreEvaluatorProvider");
|
|
20960
|
+
handledProperties = new Map([["AWS::BedrockAgentCore::Evaluator", new Set([
|
|
20961
|
+
"EvaluatorName",
|
|
20962
|
+
"Description",
|
|
20963
|
+
"EvaluatorConfig",
|
|
20964
|
+
"Level",
|
|
20965
|
+
"KmsKeyArn",
|
|
20966
|
+
"Tags"
|
|
20967
|
+
])]]);
|
|
20968
|
+
constructor() {
|
|
20969
|
+
const awsClients = getAwsClients();
|
|
20970
|
+
this.client = awsClients.bedrockAgentCoreControl;
|
|
20971
|
+
}
|
|
20972
|
+
/**
|
|
20973
|
+
* Create a BedrockAgentCore Evaluator
|
|
20974
|
+
*/
|
|
20975
|
+
async create(logicalId, resourceType, properties) {
|
|
20976
|
+
this.logger.debug(`Creating BedrockAgentCore Evaluator ${logicalId}`);
|
|
20977
|
+
const evaluatorName = properties["EvaluatorName"];
|
|
20978
|
+
if (!evaluatorName) throw new ProvisioningError(`EvaluatorName is required for ${logicalId}`, resourceType, logicalId);
|
|
20979
|
+
if (properties["EvaluatorConfig"] === void 0) throw new ProvisioningError(`EvaluatorConfig is required for ${logicalId}`, resourceType, logicalId);
|
|
20980
|
+
if (properties["Level"] === void 0) throw new ProvisioningError(`Level is required for ${logicalId}`, resourceType, logicalId);
|
|
20981
|
+
try {
|
|
20982
|
+
const input = {
|
|
20983
|
+
evaluatorName,
|
|
20984
|
+
evaluatorConfig: pascalToCamelCaseKeys(properties["EvaluatorConfig"], CFN_PRESERVE_KEYS),
|
|
20985
|
+
level: properties["Level"]
|
|
20986
|
+
};
|
|
20987
|
+
if (properties["Description"] !== void 0) input["description"] = properties["Description"];
|
|
20988
|
+
if (properties["KmsKeyArn"] !== void 0) input["kmsKeyArn"] = properties["KmsKeyArn"];
|
|
20989
|
+
if (properties["Tags"] !== void 0) {
|
|
20990
|
+
const tags = cfnTagListToMap(properties["Tags"]);
|
|
20991
|
+
if (Object.keys(tags).length > 0) input["tags"] = tags;
|
|
20992
|
+
}
|
|
20993
|
+
const response = await this.client.send(new CreateEvaluatorCommand(input));
|
|
20994
|
+
const evaluatorArn = response.evaluatorArn;
|
|
20995
|
+
const evaluatorId = response.evaluatorId;
|
|
20996
|
+
this.logger.debug(`Created BedrockAgentCore Evaluator: ${evaluatorId} (${evaluatorArn})`);
|
|
20997
|
+
return {
|
|
20998
|
+
physicalId: evaluatorArn,
|
|
20999
|
+
attributes: {
|
|
21000
|
+
EvaluatorArn: evaluatorArn,
|
|
21001
|
+
EvaluatorId: evaluatorId,
|
|
21002
|
+
Status: response.status ?? "",
|
|
21003
|
+
CreatedAt: response.createdAt?.toISOString() ?? ""
|
|
21004
|
+
}
|
|
21005
|
+
};
|
|
21006
|
+
} catch (error) {
|
|
21007
|
+
const cause = error instanceof Error ? error : void 0;
|
|
21008
|
+
throw new ProvisioningError(`Failed to create BedrockAgentCore Evaluator ${logicalId}: ${error instanceof Error ? error.message : String(error)}`, resourceType, logicalId, void 0, cause);
|
|
21009
|
+
}
|
|
21010
|
+
}
|
|
21011
|
+
/**
|
|
21012
|
+
* Update a BedrockAgentCore Evaluator.
|
|
21013
|
+
*
|
|
21014
|
+
* `UpdateEvaluator` covers Description / EvaluatorConfig / Level /
|
|
21015
|
+
* KmsKeyArn; tag changes are applied via TagResource / UntagResource
|
|
21016
|
+
* (the update op does not accept tags). `EvaluatorName` is createOnly —
|
|
21017
|
+
* the deploy engine replaces the resource instead of calling this.
|
|
21018
|
+
*/
|
|
21019
|
+
async update(logicalId, physicalId, resourceType, properties, previousProperties) {
|
|
21020
|
+
this.logger.debug(`Updating BedrockAgentCore Evaluator ${logicalId}: ${physicalId}`);
|
|
21021
|
+
try {
|
|
21022
|
+
const input = { evaluatorId: evaluatorIdFromArn(physicalId) };
|
|
21023
|
+
if (properties["Description"] !== void 0) input["description"] = properties["Description"];
|
|
21024
|
+
if (properties["EvaluatorConfig"] !== void 0) input["evaluatorConfig"] = pascalToCamelCaseKeys(properties["EvaluatorConfig"], CFN_PRESERVE_KEYS);
|
|
21025
|
+
if (properties["Level"] !== void 0) input["level"] = properties["Level"];
|
|
21026
|
+
if (properties["KmsKeyArn"] !== void 0) input["kmsKeyArn"] = properties["KmsKeyArn"];
|
|
21027
|
+
const response = await this.client.send(new UpdateEvaluatorCommand(input));
|
|
21028
|
+
await this.syncTags(physicalId, properties["Tags"], previousProperties["Tags"]);
|
|
21029
|
+
const evaluatorArn = response.evaluatorArn ?? physicalId;
|
|
21030
|
+
this.logger.debug(`Successfully updated BedrockAgentCore Evaluator ${logicalId}`);
|
|
21031
|
+
return {
|
|
21032
|
+
physicalId: evaluatorArn,
|
|
21033
|
+
wasReplaced: false,
|
|
21034
|
+
attributes: {
|
|
21035
|
+
EvaluatorArn: evaluatorArn,
|
|
21036
|
+
EvaluatorId: response.evaluatorId ?? evaluatorIdFromArn(evaluatorArn),
|
|
21037
|
+
Status: response.status ?? "",
|
|
21038
|
+
UpdatedAt: response.updatedAt?.toISOString() ?? ""
|
|
21039
|
+
}
|
|
21040
|
+
};
|
|
21041
|
+
} catch (error) {
|
|
21042
|
+
const cause = error instanceof Error ? error : void 0;
|
|
21043
|
+
throw new ProvisioningError(`Failed to update BedrockAgentCore Evaluator ${logicalId}: ${error instanceof Error ? error.message : String(error)}`, resourceType, logicalId, physicalId, cause);
|
|
21044
|
+
}
|
|
21045
|
+
}
|
|
21046
|
+
/**
|
|
21047
|
+
* Apply CFn tag-list changes via TagResource / UntagResource.
|
|
21048
|
+
*/
|
|
21049
|
+
async syncTags(evaluatorArn, nextTagsRaw, previousTagsRaw) {
|
|
21050
|
+
const nextTags = cfnTagListToMap(nextTagsRaw);
|
|
21051
|
+
const previousTags = cfnTagListToMap(previousTagsRaw);
|
|
21052
|
+
const removedKeys = Object.keys(previousTags).filter((key) => !(key in nextTags));
|
|
21053
|
+
const upserts = {};
|
|
21054
|
+
for (const [key, value] of Object.entries(nextTags)) if (previousTags[key] !== value) upserts[key] = value;
|
|
21055
|
+
if (removedKeys.length > 0) await this.client.send(new UntagResourceCommand$9({
|
|
21056
|
+
resourceArn: evaluatorArn,
|
|
21057
|
+
tagKeys: removedKeys
|
|
21058
|
+
}));
|
|
21059
|
+
if (Object.keys(upserts).length > 0) await this.client.send(new TagResourceCommand$9({
|
|
21060
|
+
resourceArn: evaluatorArn,
|
|
21061
|
+
tags: upserts
|
|
21062
|
+
}));
|
|
21063
|
+
}
|
|
21064
|
+
/**
|
|
21065
|
+
* Delete a BedrockAgentCore Evaluator
|
|
21066
|
+
*/
|
|
21067
|
+
async delete(logicalId, physicalId, resourceType, _properties, context) {
|
|
21068
|
+
this.logger.debug(`Deleting BedrockAgentCore Evaluator ${logicalId}: ${physicalId}`);
|
|
21069
|
+
try {
|
|
21070
|
+
await this.client.send(new DeleteEvaluatorCommand({ evaluatorId: evaluatorIdFromArn(physicalId) }));
|
|
21071
|
+
this.logger.debug(`Successfully deleted BedrockAgentCore Evaluator ${logicalId}`);
|
|
21072
|
+
} catch (error) {
|
|
21073
|
+
if (error instanceof ResourceNotFoundException$5) {
|
|
21074
|
+
assertRegionMatch(await this.client.config.region(), context?.expectedRegion, resourceType, logicalId, physicalId);
|
|
21075
|
+
this.logger.debug(`Evaluator ${physicalId} does not exist, skipping deletion`);
|
|
21076
|
+
return;
|
|
21077
|
+
}
|
|
21078
|
+
const cause = error instanceof Error ? error : void 0;
|
|
21079
|
+
throw new ProvisioningError(`Failed to delete BedrockAgentCore Evaluator ${logicalId}: ${error instanceof Error ? error.message : String(error)}`, resourceType, logicalId, physicalId, cause);
|
|
21080
|
+
}
|
|
21081
|
+
}
|
|
21082
|
+
/**
|
|
21083
|
+
* Get resource attribute (for Fn::GetAtt resolution). The CFn read-only
|
|
21084
|
+
* attribute set is EvaluatorArn / EvaluatorId / Status / CreatedAt /
|
|
21085
|
+
* UpdatedAt.
|
|
21086
|
+
*/
|
|
21087
|
+
async getAttribute(physicalId, _resourceType, attributeName) {
|
|
21088
|
+
if (attributeName === "EvaluatorArn") return physicalId;
|
|
21089
|
+
if (attributeName === "EvaluatorId") return evaluatorIdFromArn(physicalId);
|
|
21090
|
+
if (attributeName === "Status" || attributeName === "CreatedAt" || attributeName === "UpdatedAt") {
|
|
21091
|
+
const response = await this.client.send(new GetEvaluatorCommand({ evaluatorId: evaluatorIdFromArn(physicalId) }));
|
|
21092
|
+
if (attributeName === "Status") return response.status;
|
|
21093
|
+
if (attributeName === "CreatedAt") return response.createdAt?.toISOString();
|
|
21094
|
+
return response.updatedAt?.toISOString();
|
|
21095
|
+
}
|
|
21096
|
+
throw new Error(`Unsupported attribute: ${attributeName} for AWS::BedrockAgentCore::Evaluator`);
|
|
21097
|
+
}
|
|
21098
|
+
/**
|
|
21099
|
+
* Read the AWS-current Evaluator configuration in CFn-property shape.
|
|
21100
|
+
*
|
|
21101
|
+
* Issues `GetEvaluator` + `ListTagsForResource` and surfaces the keys
|
|
21102
|
+
* `create()` accepts, re-shaped to PascalCase (the free-form
|
|
21103
|
+
* `additionalModelRequestFields` document is passed through verbatim).
|
|
21104
|
+
* Returns `undefined` when the evaluator is gone
|
|
21105
|
+
* (`ResourceNotFoundException`).
|
|
21106
|
+
*/
|
|
21107
|
+
async readCurrentState(physicalId, _logicalId, _resourceType) {
|
|
21108
|
+
let resp;
|
|
21109
|
+
try {
|
|
21110
|
+
resp = await this.client.send(new GetEvaluatorCommand({ evaluatorId: evaluatorIdFromArn(physicalId) }));
|
|
21111
|
+
} catch (err) {
|
|
21112
|
+
if (err instanceof ResourceNotFoundException$5) return void 0;
|
|
21113
|
+
throw err;
|
|
21114
|
+
}
|
|
21115
|
+
const result = {};
|
|
21116
|
+
if (resp.evaluatorName !== void 0) result["EvaluatorName"] = resp.evaluatorName;
|
|
21117
|
+
result["Description"] = resp.description ?? "";
|
|
21118
|
+
if (resp.evaluatorConfig !== void 0) result["EvaluatorConfig"] = camelToPascalCaseKeys(resp.evaluatorConfig, SDK_PRESERVE_KEYS);
|
|
21119
|
+
if (resp.level !== void 0) result["Level"] = resp.level;
|
|
21120
|
+
if (resp.kmsKeyArn !== void 0) result["KmsKeyArn"] = resp.kmsKeyArn;
|
|
21121
|
+
try {
|
|
21122
|
+
result["Tags"] = tagMapToCfnList((await this.client.send(new ListTagsForResourceCommand$6({ resourceArn: physicalId }))).tags ?? {});
|
|
21123
|
+
} catch (err) {
|
|
21124
|
+
this.logger.debug(`Failed to read tags for evaluator ${physicalId}: ${err instanceof Error ? err.message : String(err)}`);
|
|
21125
|
+
}
|
|
21126
|
+
return result;
|
|
21127
|
+
}
|
|
21128
|
+
/**
|
|
21129
|
+
* Adopt an existing BedrockAgentCore Evaluator into cdkd state.
|
|
21130
|
+
*
|
|
21131
|
+
* **Explicit override only.** Pass `--resource <logicalId>=<value>` where
|
|
21132
|
+
* `<value>` is the evaluator ARN or the bare evaluator ID; an ID is
|
|
21133
|
+
* resolved to the canonical ARN (the physical id shape `create()`
|
|
21134
|
+
* records) via `GetEvaluator`.
|
|
21135
|
+
*/
|
|
21136
|
+
async import(input) {
|
|
21137
|
+
if (!input.knownPhysicalId) return null;
|
|
21138
|
+
if (input.knownPhysicalId.includes(":evaluator/")) return {
|
|
21139
|
+
physicalId: input.knownPhysicalId,
|
|
21140
|
+
attributes: {
|
|
21141
|
+
EvaluatorArn: input.knownPhysicalId,
|
|
21142
|
+
EvaluatorId: evaluatorIdFromArn(input.knownPhysicalId)
|
|
21143
|
+
}
|
|
21144
|
+
};
|
|
21145
|
+
const response = await this.client.send(new GetEvaluatorCommand({ evaluatorId: input.knownPhysicalId }));
|
|
21146
|
+
return {
|
|
21147
|
+
physicalId: response.evaluatorArn,
|
|
21148
|
+
attributes: {
|
|
21149
|
+
EvaluatorArn: response.evaluatorArn,
|
|
21150
|
+
EvaluatorId: response.evaluatorId ?? input.knownPhysicalId
|
|
21151
|
+
}
|
|
21152
|
+
};
|
|
21153
|
+
}
|
|
21154
|
+
};
|
|
21155
|
+
|
|
20630
21156
|
//#endregion
|
|
20631
21157
|
//#region src/provisioning/providers/stepfunctions-provider.ts
|
|
20632
21158
|
/**
|
|
@@ -20823,7 +21349,7 @@ var StepFunctionsProvider = class {
|
|
|
20823
21349
|
result["EncryptionConfiguration"] = ec;
|
|
20824
21350
|
}
|
|
20825
21351
|
try {
|
|
20826
|
-
result["Tags"] = normalizeAwsTagsToCfn((await this.getClient().send(new ListTagsForResourceCommand$
|
|
21352
|
+
result["Tags"] = normalizeAwsTagsToCfn((await this.getClient().send(new ListTagsForResourceCommand$11({ resourceArn: physicalId }))).tags);
|
|
20827
21353
|
} catch (err) {
|
|
20828
21354
|
if (!(err instanceof StateMachineDoesNotExist)) throw err;
|
|
20829
21355
|
}
|
|
@@ -20861,7 +21387,7 @@ var StepFunctionsProvider = class {
|
|
|
20861
21387
|
const list = await this.getClient().send(new ListStateMachinesCommand({ ...nextToken && { nextToken } }));
|
|
20862
21388
|
for (const sm of list.stateMachines ?? []) {
|
|
20863
21389
|
if (!sm.stateMachineArn) continue;
|
|
20864
|
-
const tagsResp = await this.getClient().send(new ListTagsForResourceCommand$
|
|
21390
|
+
const tagsResp = await this.getClient().send(new ListTagsForResourceCommand$11({ resourceArn: sm.stateMachineArn }));
|
|
20865
21391
|
if (this.tagsMatchCdkPath(tagsResp.tags, input.cdkPath)) return {
|
|
20866
21392
|
physicalId: sm.stateMachineArn,
|
|
20867
21393
|
attributes: {}
|
|
@@ -20892,14 +21418,14 @@ var StepFunctionsProvider = class {
|
|
|
20892
21418
|
const tagsToRemove = [];
|
|
20893
21419
|
for (const k of oldMap.keys()) if (!newMap.has(k)) tagsToRemove.push(k);
|
|
20894
21420
|
if (tagsToRemove.length > 0) {
|
|
20895
|
-
await this.getClient().send(new UntagResourceCommand$
|
|
21421
|
+
await this.getClient().send(new UntagResourceCommand$12({
|
|
20896
21422
|
resourceArn: stateMachineArn,
|
|
20897
21423
|
tagKeys: tagsToRemove
|
|
20898
21424
|
}));
|
|
20899
21425
|
this.logger.debug(`Removed ${tagsToRemove.length} tag(s) from SFN state machine ${stateMachineArn}`);
|
|
20900
21426
|
}
|
|
20901
21427
|
if (tagsToAdd.length > 0) {
|
|
20902
|
-
await this.getClient().send(new TagResourceCommand$
|
|
21428
|
+
await this.getClient().send(new TagResourceCommand$12({
|
|
20903
21429
|
resourceArn: stateMachineArn,
|
|
20904
21430
|
tags: tagsToAdd
|
|
20905
21431
|
}));
|
|
@@ -21519,14 +22045,14 @@ var ECSProvider = class {
|
|
|
21519
22045
|
const tagsToRemove = [];
|
|
21520
22046
|
for (const k of oldMap.keys()) if (!newMap.has(k)) tagsToRemove.push(k);
|
|
21521
22047
|
if (tagsToRemove.length > 0) {
|
|
21522
|
-
await this.getClient().send(new UntagResourceCommand$
|
|
22048
|
+
await this.getClient().send(new UntagResourceCommand$13({
|
|
21523
22049
|
resourceArn,
|
|
21524
22050
|
tagKeys: tagsToRemove
|
|
21525
22051
|
}));
|
|
21526
22052
|
this.logger.debug(`Removed ${tagsToRemove.length} tag(s) from ECS resource ${resourceArn}`);
|
|
21527
22053
|
}
|
|
21528
22054
|
if (tagsToAdd.length > 0) {
|
|
21529
|
-
await this.getClient().send(new TagResourceCommand$
|
|
22055
|
+
await this.getClient().send(new TagResourceCommand$13({
|
|
21530
22056
|
resourceArn,
|
|
21531
22057
|
tags: tagsToAdd
|
|
21532
22058
|
}));
|
|
@@ -22097,7 +22623,7 @@ var ECSProvider = class {
|
|
|
22097
22623
|
do {
|
|
22098
22624
|
const list = await this.getClient().send(new ListClustersCommand({ ...nextToken && { nextToken } }));
|
|
22099
22625
|
for (const arn of list.clusterArns ?? []) {
|
|
22100
|
-
const tagsResp = await this.getClient().send(new ListTagsForResourceCommand$
|
|
22626
|
+
const tagsResp = await this.getClient().send(new ListTagsForResourceCommand$12({ resourceArn: arn }));
|
|
22101
22627
|
if (this.tagsMatchCdkPath(tagsResp.tags, input.cdkPath)) return {
|
|
22102
22628
|
physicalId: arn.substring(arn.lastIndexOf("/") + 1),
|
|
22103
22629
|
attributes: {}
|
|
@@ -22124,7 +22650,7 @@ var ECSProvider = class {
|
|
|
22124
22650
|
...svcToken && { nextToken: svcToken }
|
|
22125
22651
|
}));
|
|
22126
22652
|
for (const svcArn of svcList.serviceArns ?? []) {
|
|
22127
|
-
const tagsResp = await this.getClient().send(new ListTagsForResourceCommand$
|
|
22653
|
+
const tagsResp = await this.getClient().send(new ListTagsForResourceCommand$12({ resourceArn: svcArn }));
|
|
22128
22654
|
if (this.tagsMatchCdkPath(tagsResp.tags, input.cdkPath)) return {
|
|
22129
22655
|
physicalId: `${clusterArn}|${svcArn.substring(svcArn.lastIndexOf("/") + 1)}`,
|
|
22130
22656
|
attributes: {}
|
|
@@ -23622,7 +24148,7 @@ var RDSProvider = class {
|
|
|
23622
24148
|
*/
|
|
23623
24149
|
async attachTags(result, arn) {
|
|
23624
24150
|
try {
|
|
23625
|
-
result["Tags"] = normalizeAwsTagsToCfn((await this.getClient().send(new ListTagsForResourceCommand$
|
|
24151
|
+
result["Tags"] = normalizeAwsTagsToCfn((await this.getClient().send(new ListTagsForResourceCommand$9({ ResourceName: arn }))).TagList);
|
|
23626
24152
|
} catch (err) {
|
|
23627
24153
|
this.logger.debug(`RDS ListTagsForResource(${arn}) failed: ${err instanceof Error ? err.message : String(err)}`);
|
|
23628
24154
|
}
|
|
@@ -23645,7 +24171,7 @@ var RDSProvider = class {
|
|
|
23645
24171
|
const list = await this.getClient().send(new DescribeDBInstancesCommand({ ...marker && { Marker: marker } }));
|
|
23646
24172
|
for (const inst of list.DBInstances ?? []) {
|
|
23647
24173
|
if (!inst.DBInstanceIdentifier || !inst.DBInstanceArn) continue;
|
|
23648
|
-
if (matchesCdkPath((await this.getClient().send(new ListTagsForResourceCommand$
|
|
24174
|
+
if (matchesCdkPath((await this.getClient().send(new ListTagsForResourceCommand$9({ ResourceName: inst.DBInstanceArn }))).TagList, input.cdkPath)) return {
|
|
23649
24175
|
physicalId: inst.DBInstanceIdentifier,
|
|
23650
24176
|
attributes: {}
|
|
23651
24177
|
};
|
|
@@ -23672,7 +24198,7 @@ var RDSProvider = class {
|
|
|
23672
24198
|
const list = await this.getClient().send(new DescribeDBClustersCommand({ ...marker && { Marker: marker } }));
|
|
23673
24199
|
for (const c of list.DBClusters ?? []) {
|
|
23674
24200
|
if (!c.DBClusterIdentifier || !c.DBClusterArn) continue;
|
|
23675
|
-
if (matchesCdkPath((await this.getClient().send(new ListTagsForResourceCommand$
|
|
24201
|
+
if (matchesCdkPath((await this.getClient().send(new ListTagsForResourceCommand$9({ ResourceName: c.DBClusterArn }))).TagList, input.cdkPath)) return {
|
|
23676
24202
|
physicalId: c.DBClusterIdentifier,
|
|
23677
24203
|
attributes: {}
|
|
23678
24204
|
};
|
|
@@ -23699,7 +24225,7 @@ var RDSProvider = class {
|
|
|
23699
24225
|
const list = await this.getClient().send(new DescribeDBSubnetGroupsCommand({ ...marker && { Marker: marker } }));
|
|
23700
24226
|
for (const sg of list.DBSubnetGroups ?? []) {
|
|
23701
24227
|
if (!sg.DBSubnetGroupName || !sg.DBSubnetGroupArn) continue;
|
|
23702
|
-
if (matchesCdkPath((await this.getClient().send(new ListTagsForResourceCommand$
|
|
24228
|
+
if (matchesCdkPath((await this.getClient().send(new ListTagsForResourceCommand$9({ ResourceName: sg.DBSubnetGroupArn }))).TagList, input.cdkPath)) return {
|
|
23703
24229
|
physicalId: sg.DBSubnetGroupName,
|
|
23704
24230
|
attributes: {}
|
|
23705
24231
|
};
|
|
@@ -23929,7 +24455,7 @@ var RDSDBProxyProvider = class {
|
|
|
23929
24455
|
for (const proxy of describe.DBProxies ?? []) {
|
|
23930
24456
|
if (!proxy.DBProxyArn) continue;
|
|
23931
24457
|
try {
|
|
23932
|
-
if (matchesCdkPath((await client.send(new ListTagsForResourceCommand$
|
|
24458
|
+
if (matchesCdkPath((await client.send(new ListTagsForResourceCommand$9({ ResourceName: proxy.DBProxyArn }))).TagList ?? [], input.cdkPath)) return this.buildImportResult(proxy.DBProxyName ?? "");
|
|
23933
24459
|
} catch (error) {
|
|
23934
24460
|
this.logger.debug(`ListTagsForResource failed for ${proxy.DBProxyName}: ${error instanceof Error ? error.message : String(error)}`);
|
|
23935
24461
|
}
|
|
@@ -23972,7 +24498,7 @@ var RDSDBProxyProvider = class {
|
|
|
23972
24498
|
}))
|
|
23973
24499
|
};
|
|
23974
24500
|
if (p.DBProxyArn) try {
|
|
23975
|
-
result["Tags"] = normalizeAwsTagsToCfn((await client.send(new ListTagsForResourceCommand$
|
|
24501
|
+
result["Tags"] = normalizeAwsTagsToCfn((await client.send(new ListTagsForResourceCommand$9({ ResourceName: p.DBProxyArn }))).TagList ?? []);
|
|
23976
24502
|
} catch (error) {
|
|
23977
24503
|
this.logger.debug(`ListTagsForResource failed for ${physicalId}: ${error instanceof Error ? error.message : String(error)}`);
|
|
23978
24504
|
result["Tags"] = [];
|
|
@@ -24271,7 +24797,7 @@ var RDSDBProxyEndpointProvider = class {
|
|
|
24271
24797
|
for (const ep of describe.DBProxyEndpoints ?? []) {
|
|
24272
24798
|
if (!ep.DBProxyEndpointArn) continue;
|
|
24273
24799
|
try {
|
|
24274
|
-
if (matchesCdkPath((await client.send(new ListTagsForResourceCommand$
|
|
24800
|
+
if (matchesCdkPath((await client.send(new ListTagsForResourceCommand$9({ ResourceName: ep.DBProxyEndpointArn }))).TagList ?? [], input.cdkPath)) return this.buildImportResult(ep.DBProxyEndpointName ?? "");
|
|
24275
24801
|
} catch (error) {
|
|
24276
24802
|
this.logger.debug(`ListTagsForResource failed for ${ep.DBProxyEndpointName}: ${error instanceof Error ? error.message : String(error)}`);
|
|
24277
24803
|
}
|
|
@@ -24299,7 +24825,7 @@ var RDSDBProxyEndpointProvider = class {
|
|
|
24299
24825
|
TargetRole: e.TargetRole ?? "READ_WRITE"
|
|
24300
24826
|
};
|
|
24301
24827
|
if (e.DBProxyEndpointArn) try {
|
|
24302
|
-
result["Tags"] = normalizeAwsTagsToCfn((await client.send(new ListTagsForResourceCommand$
|
|
24828
|
+
result["Tags"] = normalizeAwsTagsToCfn((await client.send(new ListTagsForResourceCommand$9({ ResourceName: e.DBProxyEndpointArn }))).TagList ?? []);
|
|
24303
24829
|
} catch (error) {
|
|
24304
24830
|
this.logger.debug(`ListTagsForResource failed for ${physicalId}: ${error instanceof Error ? error.message : String(error)}`);
|
|
24305
24831
|
result["Tags"] = [];
|
|
@@ -25268,7 +25794,7 @@ var DocDBProvider = class {
|
|
|
25268
25794
|
*/
|
|
25269
25795
|
async attachTags(result, arn) {
|
|
25270
25796
|
try {
|
|
25271
|
-
result["Tags"] = normalizeAwsTagsToCfn((await this.getClient().send(new ListTagsForResourceCommand$
|
|
25797
|
+
result["Tags"] = normalizeAwsTagsToCfn((await this.getClient().send(new ListTagsForResourceCommand$13({ ResourceName: arn }))).TagList);
|
|
25272
25798
|
} catch (err) {
|
|
25273
25799
|
this.logger.debug(`DocDB ListTagsForResource(${arn}) failed: ${err instanceof Error ? err.message : String(err)}`);
|
|
25274
25800
|
}
|
|
@@ -25291,7 +25817,7 @@ var DocDBProvider = class {
|
|
|
25291
25817
|
const list = await this.getClient().send(new DescribeDBInstancesCommand$1({ ...marker && { Marker: marker } }));
|
|
25292
25818
|
for (const inst of list.DBInstances ?? []) {
|
|
25293
25819
|
if (!inst.DBInstanceIdentifier || !inst.DBInstanceArn) continue;
|
|
25294
|
-
if (matchesCdkPath((await this.getClient().send(new ListTagsForResourceCommand$
|
|
25820
|
+
if (matchesCdkPath((await this.getClient().send(new ListTagsForResourceCommand$13({ ResourceName: inst.DBInstanceArn }))).TagList, input.cdkPath)) return {
|
|
25295
25821
|
physicalId: inst.DBInstanceIdentifier,
|
|
25296
25822
|
attributes: {}
|
|
25297
25823
|
};
|
|
@@ -25318,7 +25844,7 @@ var DocDBProvider = class {
|
|
|
25318
25844
|
const list = await this.getClient().send(new DescribeDBClustersCommand$1({ ...marker && { Marker: marker } }));
|
|
25319
25845
|
for (const c of list.DBClusters ?? []) {
|
|
25320
25846
|
if (!c.DBClusterIdentifier || !c.DBClusterArn) continue;
|
|
25321
|
-
if (matchesCdkPath((await this.getClient().send(new ListTagsForResourceCommand$
|
|
25847
|
+
if (matchesCdkPath((await this.getClient().send(new ListTagsForResourceCommand$13({ ResourceName: c.DBClusterArn }))).TagList, input.cdkPath)) return {
|
|
25322
25848
|
physicalId: c.DBClusterIdentifier,
|
|
25323
25849
|
attributes: {}
|
|
25324
25850
|
};
|
|
@@ -25345,7 +25871,7 @@ var DocDBProvider = class {
|
|
|
25345
25871
|
const list = await this.getClient().send(new DescribeDBSubnetGroupsCommand$1({ ...marker && { Marker: marker } }));
|
|
25346
25872
|
for (const sg of list.DBSubnetGroups ?? []) {
|
|
25347
25873
|
if (!sg.DBSubnetGroupName || !sg.DBSubnetGroupArn) continue;
|
|
25348
|
-
if (matchesCdkPath((await this.getClient().send(new ListTagsForResourceCommand$
|
|
25874
|
+
if (matchesCdkPath((await this.getClient().send(new ListTagsForResourceCommand$13({ ResourceName: sg.DBSubnetGroupArn }))).TagList, input.cdkPath)) return {
|
|
25349
25875
|
physicalId: sg.DBSubnetGroupName,
|
|
25350
25876
|
attributes: {}
|
|
25351
25877
|
};
|
|
@@ -25938,7 +26464,7 @@ var NeptuneProvider = class {
|
|
|
25938
26464
|
*/
|
|
25939
26465
|
async attachTags(result, arn) {
|
|
25940
26466
|
try {
|
|
25941
|
-
result["Tags"] = normalizeAwsTagsToCfn((await this.getClient().send(new ListTagsForResourceCommand$
|
|
26467
|
+
result["Tags"] = normalizeAwsTagsToCfn((await this.getClient().send(new ListTagsForResourceCommand$14({ ResourceName: arn }))).TagList);
|
|
25942
26468
|
} catch (err) {
|
|
25943
26469
|
this.logger.debug(`Neptune ListTagsForResource(${arn}) failed: ${err instanceof Error ? err.message : String(err)}`);
|
|
25944
26470
|
}
|
|
@@ -25961,7 +26487,7 @@ var NeptuneProvider = class {
|
|
|
25961
26487
|
const list = await this.getClient().send(new DescribeDBInstancesCommand$2({ ...marker && { Marker: marker } }));
|
|
25962
26488
|
for (const inst of list.DBInstances ?? []) {
|
|
25963
26489
|
if (!inst.DBInstanceIdentifier || !inst.DBInstanceArn) continue;
|
|
25964
|
-
if (matchesCdkPath((await this.getClient().send(new ListTagsForResourceCommand$
|
|
26490
|
+
if (matchesCdkPath((await this.getClient().send(new ListTagsForResourceCommand$14({ ResourceName: inst.DBInstanceArn }))).TagList, input.cdkPath)) return {
|
|
25965
26491
|
physicalId: inst.DBInstanceIdentifier,
|
|
25966
26492
|
attributes: {}
|
|
25967
26493
|
};
|
|
@@ -25988,7 +26514,7 @@ var NeptuneProvider = class {
|
|
|
25988
26514
|
const list = await this.getClient().send(new DescribeDBClustersCommand$2({ ...marker && { Marker: marker } }));
|
|
25989
26515
|
for (const c of list.DBClusters ?? []) {
|
|
25990
26516
|
if (!c.DBClusterIdentifier || !c.DBClusterArn) continue;
|
|
25991
|
-
if (matchesCdkPath((await this.getClient().send(new ListTagsForResourceCommand$
|
|
26517
|
+
if (matchesCdkPath((await this.getClient().send(new ListTagsForResourceCommand$14({ ResourceName: c.DBClusterArn }))).TagList, input.cdkPath)) return {
|
|
25992
26518
|
physicalId: c.DBClusterIdentifier,
|
|
25993
26519
|
attributes: {}
|
|
25994
26520
|
};
|
|
@@ -26015,7 +26541,7 @@ var NeptuneProvider = class {
|
|
|
26015
26541
|
const list = await this.getClient().send(new DescribeDBSubnetGroupsCommand$2({ ...marker && { Marker: marker } }));
|
|
26016
26542
|
for (const sg of list.DBSubnetGroups ?? []) {
|
|
26017
26543
|
if (!sg.DBSubnetGroupName || !sg.DBSubnetGroupArn) continue;
|
|
26018
|
-
if (matchesCdkPath((await this.getClient().send(new ListTagsForResourceCommand$
|
|
26544
|
+
if (matchesCdkPath((await this.getClient().send(new ListTagsForResourceCommand$14({ ResourceName: sg.DBSubnetGroupArn }))).TagList, input.cdkPath)) return {
|
|
26019
26545
|
physicalId: sg.DBSubnetGroupName,
|
|
26020
26546
|
attributes: {}
|
|
26021
26547
|
};
|
|
@@ -26641,7 +27167,7 @@ var Route53Provider = class {
|
|
|
26641
27167
|
});
|
|
26642
27168
|
const idTail = physicalId.replace(/^\/hostedzone\//, "");
|
|
26643
27169
|
try {
|
|
26644
|
-
result["HostedZoneTags"] = normalizeAwsTagsToCfn((await this.getClient().send(new ListTagsForResourceCommand$
|
|
27170
|
+
result["HostedZoneTags"] = normalizeAwsTagsToCfn((await this.getClient().send(new ListTagsForResourceCommand$7({
|
|
26645
27171
|
ResourceType: "hostedzone",
|
|
26646
27172
|
ResourceId: idTail
|
|
26647
27173
|
}))).ResourceTagSet?.Tags);
|
|
@@ -26766,7 +27292,7 @@ var Route53Provider = class {
|
|
|
26766
27292
|
if (!zone.Id) continue;
|
|
26767
27293
|
const zoneId = zone.Id.replace("/hostedzone/", "");
|
|
26768
27294
|
try {
|
|
26769
|
-
if (matchesCdkPath((await this.getClient().send(new ListTagsForResourceCommand$
|
|
27295
|
+
if (matchesCdkPath((await this.getClient().send(new ListTagsForResourceCommand$7({
|
|
26770
27296
|
ResourceType: "hostedzone",
|
|
26771
27297
|
ResourceId: zoneId
|
|
26772
27298
|
}))).ResourceTagSet?.Tags, input.cdkPath)) return {
|
|
@@ -27338,7 +27864,7 @@ var CognitoUserPoolProvider = class {
|
|
|
27338
27864
|
if (input.cdkPath) try {
|
|
27339
27865
|
const arn = (await this.getClient().send(new DescribeUserPoolCommand({ UserPoolId: pool.Id }))).UserPool?.Arn;
|
|
27340
27866
|
if (!arn) continue;
|
|
27341
|
-
if ((await this.getClient().send(new ListTagsForResourceCommand$
|
|
27867
|
+
if ((await this.getClient().send(new ListTagsForResourceCommand$15({ ResourceArn: arn }))).Tags?.["aws:cdk:path"] === input.cdkPath) return {
|
|
27342
27868
|
physicalId: pool.Id,
|
|
27343
27869
|
attributes: {}
|
|
27344
27870
|
};
|
|
@@ -27776,7 +28302,7 @@ var ElastiCacheProvider = class {
|
|
|
27776
28302
|
/** Best-effort tag fetch — failures omit the key without breaking the read. */
|
|
27777
28303
|
async attachTags(result, arn) {
|
|
27778
28304
|
try {
|
|
27779
|
-
result["Tags"] = normalizeAwsTagsToCfn((await this.getClient().send(new ListTagsForResourceCommand$
|
|
28305
|
+
result["Tags"] = normalizeAwsTagsToCfn((await this.getClient().send(new ListTagsForResourceCommand$10({ ResourceName: arn }))).TagList);
|
|
27780
28306
|
} catch (err) {
|
|
27781
28307
|
this.logger.debug(`ElastiCache ListTagsForResource(${arn}) failed: ${err instanceof Error ? err.message : String(err)}`);
|
|
27782
28308
|
}
|
|
@@ -27822,7 +28348,7 @@ var ElastiCacheProvider = class {
|
|
|
27822
28348
|
for (const c of list.CacheClusters ?? []) {
|
|
27823
28349
|
if (!c.CacheClusterId) continue;
|
|
27824
28350
|
const arn = c.ARN ?? await this.buildClusterArn(c.CacheClusterId);
|
|
27825
|
-
if (matchesCdkPath((await this.getClient().send(new ListTagsForResourceCommand$
|
|
28351
|
+
if (matchesCdkPath((await this.getClient().send(new ListTagsForResourceCommand$10({ ResourceName: arn }))).TagList, input.cdkPath)) return {
|
|
27826
28352
|
physicalId: c.CacheClusterId,
|
|
27827
28353
|
attributes: {}
|
|
27828
28354
|
};
|
|
@@ -27850,7 +28376,7 @@ var ElastiCacheProvider = class {
|
|
|
27850
28376
|
for (const g of list.CacheSubnetGroups ?? []) {
|
|
27851
28377
|
if (!g.CacheSubnetGroupName) continue;
|
|
27852
28378
|
const arn = g.ARN ?? await this.buildSubnetGroupArn(g.CacheSubnetGroupName);
|
|
27853
|
-
if (matchesCdkPath((await this.getClient().send(new ListTagsForResourceCommand$
|
|
28379
|
+
if (matchesCdkPath((await this.getClient().send(new ListTagsForResourceCommand$10({ ResourceName: arn }))).TagList, input.cdkPath)) return {
|
|
27854
28380
|
physicalId: g.CacheSubnetGroupName,
|
|
27855
28381
|
attributes: {}
|
|
27856
28382
|
};
|
|
@@ -27885,34 +28411,53 @@ var ElastiCacheProvider = class {
|
|
|
27885
28411
|
*
|
|
27886
28412
|
* Implements resource provisioning for:
|
|
27887
28413
|
* - AWS::ServiceDiscovery::PrivateDnsNamespace
|
|
28414
|
+
* - AWS::ServiceDiscovery::HttpNamespace
|
|
28415
|
+
* - AWS::ServiceDiscovery::PublicDnsNamespace
|
|
27888
28416
|
* - AWS::ServiceDiscovery::Service
|
|
27889
28417
|
*
|
|
27890
|
-
* WHY:
|
|
27891
|
-
* the polling ourselves, avoiding the CC API's generic polling overhead
|
|
27892
|
-
* giving us direct control over the operation lifecycle.
|
|
28418
|
+
* WHY: the Create*Namespace APIs are async (they return an OperationId) but we
|
|
28419
|
+
* handle the polling ourselves, avoiding the CC API's generic polling overhead
|
|
28420
|
+
* and giving us direct control over the operation lifecycle. HttpNamespace and
|
|
28421
|
+
* PublicDnsNamespace are `ProvisioningType: NON_PROVISIONABLE`, so Cloud
|
|
28422
|
+
* Control cannot handle them at all — this SDK provider is the only route
|
|
28423
|
+
* (issue #1044).
|
|
27893
28424
|
*/
|
|
27894
|
-
var ServiceDiscoveryProvider = class {
|
|
28425
|
+
var ServiceDiscoveryProvider = class ServiceDiscoveryProvider {
|
|
27895
28426
|
client;
|
|
27896
28427
|
stsClient;
|
|
27897
28428
|
providerRegion = process.env["AWS_REGION"];
|
|
27898
28429
|
logger = getLogger().child("ServiceDiscoveryProvider");
|
|
27899
|
-
handledProperties = new Map([
|
|
27900
|
-
"
|
|
27901
|
-
|
|
27902
|
-
|
|
27903
|
-
|
|
27904
|
-
|
|
27905
|
-
|
|
27906
|
-
|
|
27907
|
-
"
|
|
27908
|
-
|
|
27909
|
-
|
|
27910
|
-
|
|
27911
|
-
|
|
27912
|
-
"
|
|
27913
|
-
|
|
27914
|
-
|
|
27915
|
-
|
|
28430
|
+
handledProperties = new Map([
|
|
28431
|
+
["AWS::ServiceDiscovery::PrivateDnsNamespace", new Set([
|
|
28432
|
+
"Name",
|
|
28433
|
+
"Vpc",
|
|
28434
|
+
"Description",
|
|
28435
|
+
"Tags",
|
|
28436
|
+
"Properties"
|
|
28437
|
+
])],
|
|
28438
|
+
["AWS::ServiceDiscovery::HttpNamespace", new Set([
|
|
28439
|
+
"Name",
|
|
28440
|
+
"Description",
|
|
28441
|
+
"Tags"
|
|
28442
|
+
])],
|
|
28443
|
+
["AWS::ServiceDiscovery::PublicDnsNamespace", new Set([
|
|
28444
|
+
"Name",
|
|
28445
|
+
"Description",
|
|
28446
|
+
"Tags",
|
|
28447
|
+
"Properties"
|
|
28448
|
+
])],
|
|
28449
|
+
["AWS::ServiceDiscovery::Service", new Set([
|
|
28450
|
+
"Name",
|
|
28451
|
+
"NamespaceId",
|
|
28452
|
+
"DnsConfig",
|
|
28453
|
+
"HealthCheckCustomConfig",
|
|
28454
|
+
"Description",
|
|
28455
|
+
"HealthCheckConfig",
|
|
28456
|
+
"Tags",
|
|
28457
|
+
"Type",
|
|
28458
|
+
"ServiceAttributes"
|
|
28459
|
+
])]
|
|
28460
|
+
]);
|
|
27916
28461
|
getClient() {
|
|
27917
28462
|
if (!this.client) this.client = new ServiceDiscoveryClient(this.providerRegion ? { region: this.providerRegion } : {});
|
|
27918
28463
|
return this.client;
|
|
@@ -27924,20 +28469,26 @@ var ServiceDiscoveryProvider = class {
|
|
|
27924
28469
|
async create(logicalId, resourceType, properties) {
|
|
27925
28470
|
switch (resourceType) {
|
|
27926
28471
|
case "AWS::ServiceDiscovery::PrivateDnsNamespace": return this.createNamespace(logicalId, resourceType, properties);
|
|
28472
|
+
case "AWS::ServiceDiscovery::HttpNamespace": return this.createHttpNamespace(logicalId, resourceType, properties);
|
|
28473
|
+
case "AWS::ServiceDiscovery::PublicDnsNamespace": return this.createPublicDnsNamespace(logicalId, resourceType, properties);
|
|
27927
28474
|
case "AWS::ServiceDiscovery::Service": return this.createService(logicalId, resourceType, properties);
|
|
27928
28475
|
default: throw new ProvisioningError(`Unsupported resource type: ${resourceType}`, resourceType, logicalId);
|
|
27929
28476
|
}
|
|
27930
28477
|
}
|
|
27931
28478
|
update(logicalId, physicalId, resourceType, properties, previousProperties) {
|
|
27932
28479
|
switch (resourceType) {
|
|
27933
|
-
case "AWS::ServiceDiscovery::PrivateDnsNamespace": return this.updateNamespace(logicalId, physicalId, resourceType, properties);
|
|
28480
|
+
case "AWS::ServiceDiscovery::PrivateDnsNamespace": return this.updateNamespace(logicalId, physicalId, resourceType, properties, previousProperties);
|
|
28481
|
+
case "AWS::ServiceDiscovery::HttpNamespace": return this.updateHttpNamespace(logicalId, physicalId, resourceType, properties, previousProperties);
|
|
28482
|
+
case "AWS::ServiceDiscovery::PublicDnsNamespace": return this.updatePublicDnsNamespace(logicalId, physicalId, resourceType, properties, previousProperties);
|
|
27934
28483
|
case "AWS::ServiceDiscovery::Service": return this.updateService(logicalId, physicalId, resourceType, properties, previousProperties);
|
|
27935
28484
|
default: throw new ProvisioningError(`Unsupported resource type: ${resourceType}`, resourceType, logicalId, physicalId);
|
|
27936
28485
|
}
|
|
27937
28486
|
}
|
|
27938
28487
|
async delete(logicalId, physicalId, resourceType, _properties, context) {
|
|
27939
28488
|
switch (resourceType) {
|
|
27940
|
-
case "AWS::ServiceDiscovery::PrivateDnsNamespace":
|
|
28489
|
+
case "AWS::ServiceDiscovery::PrivateDnsNamespace":
|
|
28490
|
+
case "AWS::ServiceDiscovery::HttpNamespace":
|
|
28491
|
+
case "AWS::ServiceDiscovery::PublicDnsNamespace": return this.deleteNamespace(logicalId, physicalId, resourceType, context);
|
|
27941
28492
|
case "AWS::ServiceDiscovery::Service": return this.deleteService(logicalId, physicalId, resourceType, context);
|
|
27942
28493
|
default: throw new ProvisioningError(`Unsupported resource type: ${resourceType}`, resourceType, logicalId, physicalId);
|
|
27943
28494
|
}
|
|
@@ -27951,8 +28502,7 @@ var ServiceDiscoveryProvider = class {
|
|
|
27951
28502
|
const tags = properties["Tags"];
|
|
27952
28503
|
if (!name) throw new ProvisioningError(`Name is required for PrivateDnsNamespace ${logicalId}`, resourceType, logicalId);
|
|
27953
28504
|
if (!vpc) throw new ProvisioningError(`Vpc is required for PrivateDnsNamespace ${logicalId}`, resourceType, logicalId);
|
|
27954
|
-
const
|
|
27955
|
-
const inputProperties = soa?.TTL !== void 0 ? { DnsProperties: { SOA: { TTL: Number(soa.TTL) } } } : void 0;
|
|
28505
|
+
const inputProperties = this.extractSoaTtlProperties(properties);
|
|
27956
28506
|
try {
|
|
27957
28507
|
const operationId = (await client.send(new CreatePrivateDnsNamespaceCommand({
|
|
27958
28508
|
Name: name,
|
|
@@ -27988,30 +28538,29 @@ var ServiceDiscoveryProvider = class {
|
|
|
27988
28538
|
* `Name` and `Vpc` are immutable; the deploy engine's
|
|
27989
28539
|
* replacement-detection layer routes those through DELETE+CREATE
|
|
27990
28540
|
* before this method is ever called, so we do not validate them here.
|
|
28541
|
+
* Tags ride on the separate `TagResource` / `UntagResource` APIs
|
|
28542
|
+
* (see {@link syncNamespaceTags} — wired in with issue #1044 so a
|
|
28543
|
+
* Tags-only change is no longer silently dropped, the ECR #981 class).
|
|
27991
28544
|
*
|
|
27992
28545
|
* Empty-string Description is intentionally allowed through (`!== undefined`
|
|
27993
28546
|
* gate, not truthy) so `cdkd drift --revert` can clear a console-side ADD.
|
|
27994
28547
|
*/
|
|
27995
|
-
async updateNamespace(logicalId, physicalId, resourceType, properties) {
|
|
28548
|
+
async updateNamespace(logicalId, physicalId, resourceType, properties, previousProperties) {
|
|
27996
28549
|
this.logger.debug(`Updating private DNS namespace ${logicalId}: ${physicalId}`);
|
|
27997
28550
|
const client = this.getClient();
|
|
27998
28551
|
const namespaceChange = {};
|
|
27999
28552
|
if (properties["Description"] !== void 0) namespaceChange.Description = properties["Description"];
|
|
28000
|
-
const
|
|
28001
|
-
if (
|
|
28002
|
-
if (Object.keys(namespaceChange).length === 0) {
|
|
28003
|
-
this.logger.debug(`No mutable diff for PrivateDnsNamespace ${logicalId}, skipping update`);
|
|
28004
|
-
return {
|
|
28005
|
-
physicalId,
|
|
28006
|
-
wasReplaced: false
|
|
28007
|
-
};
|
|
28008
|
-
}
|
|
28553
|
+
const soaProperties = this.extractSoaTtlProperties(properties);
|
|
28554
|
+
if (soaProperties) namespaceChange.Properties = soaProperties;
|
|
28009
28555
|
try {
|
|
28010
|
-
|
|
28011
|
-
|
|
28012
|
-
|
|
28013
|
-
|
|
28014
|
-
|
|
28556
|
+
if (Object.keys(namespaceChange).length > 0) {
|
|
28557
|
+
const operationId = (await client.send(new UpdatePrivateDnsNamespaceCommand({
|
|
28558
|
+
Id: physicalId,
|
|
28559
|
+
Namespace: namespaceChange
|
|
28560
|
+
}))).OperationId;
|
|
28561
|
+
if (operationId) await this.pollOperation(operationId, logicalId, resourceType);
|
|
28562
|
+
} else this.logger.debug(`No mutable namespace-body diff for PrivateDnsNamespace ${logicalId}`);
|
|
28563
|
+
await this.syncNamespaceTags(logicalId, physicalId, properties, previousProperties);
|
|
28015
28564
|
this.logger.debug(`Successfully updated private DNS namespace ${logicalId}`);
|
|
28016
28565
|
return {
|
|
28017
28566
|
physicalId,
|
|
@@ -28023,21 +28572,172 @@ var ServiceDiscoveryProvider = class {
|
|
|
28023
28572
|
throw new ProvisioningError(`Failed to update private DNS namespace ${logicalId}: ${error instanceof Error ? error.message : String(error)}`, resourceType, logicalId, physicalId, cause);
|
|
28024
28573
|
}
|
|
28025
28574
|
}
|
|
28575
|
+
/**
|
|
28576
|
+
* Delete a Cloud Map namespace (shared by PrivateDnsNamespace,
|
|
28577
|
+
* HttpNamespace, and PublicDnsNamespace — `DeleteNamespace` is
|
|
28578
|
+
* kind-agnostic and operation-based for all three).
|
|
28579
|
+
*/
|
|
28026
28580
|
async deleteNamespace(logicalId, physicalId, resourceType, context) {
|
|
28027
|
-
this.logger.debug(`Deleting
|
|
28581
|
+
this.logger.debug(`Deleting Cloud Map namespace ${logicalId}: ${physicalId}`);
|
|
28028
28582
|
const client = this.getClient();
|
|
28029
28583
|
try {
|
|
28030
28584
|
const operationId = (await client.send(new DeleteNamespaceCommand({ Id: physicalId }))).OperationId;
|
|
28031
28585
|
if (operationId) await this.pollOperation(operationId, logicalId, resourceType);
|
|
28032
|
-
this.logger.debug(`Successfully deleted
|
|
28586
|
+
this.logger.debug(`Successfully deleted Cloud Map namespace ${logicalId}`);
|
|
28033
28587
|
} catch (error) {
|
|
28034
28588
|
if (error instanceof NamespaceNotFound) {
|
|
28035
28589
|
assertRegionMatch(await this.getClient().config.region(), context?.expectedRegion, resourceType, logicalId, physicalId);
|
|
28036
28590
|
this.logger.debug(`Namespace ${physicalId} does not exist, skipping deletion`);
|
|
28037
28591
|
return;
|
|
28038
28592
|
}
|
|
28593
|
+
if (error instanceof ProvisioningError) throw error;
|
|
28594
|
+
const cause = error instanceof Error ? error : void 0;
|
|
28595
|
+
throw new ProvisioningError(`Failed to delete Cloud Map namespace ${logicalId}: ${error instanceof Error ? error.message : String(error)}`, resourceType, logicalId, physicalId, cause);
|
|
28596
|
+
}
|
|
28597
|
+
}
|
|
28598
|
+
async createHttpNamespace(logicalId, resourceType, properties) {
|
|
28599
|
+
this.logger.debug(`Creating HTTP namespace ${logicalId}`);
|
|
28600
|
+
const client = this.getClient();
|
|
28601
|
+
const name = properties["Name"];
|
|
28602
|
+
const description = properties["Description"];
|
|
28603
|
+
const tags = properties["Tags"];
|
|
28604
|
+
if (!name) throw new ProvisioningError(`Name is required for HttpNamespace ${logicalId}`, resourceType, logicalId);
|
|
28605
|
+
try {
|
|
28606
|
+
const operationId = (await client.send(new CreateHttpNamespaceCommand({
|
|
28607
|
+
Name: name,
|
|
28608
|
+
...description && { Description: description },
|
|
28609
|
+
...tags && tags.length > 0 && { Tags: tags }
|
|
28610
|
+
}))).OperationId;
|
|
28611
|
+
if (!operationId) throw new Error("CreateHttpNamespace did not return OperationId");
|
|
28612
|
+
const namespaceId = await this.pollOperation(operationId, logicalId, resourceType);
|
|
28613
|
+
const arn = await this.resolveNamespaceArn(namespaceId);
|
|
28614
|
+
this.logger.debug(`Successfully created HTTP namespace ${logicalId}: ${namespaceId}`);
|
|
28615
|
+
return {
|
|
28616
|
+
physicalId: namespaceId,
|
|
28617
|
+
attributes: {
|
|
28618
|
+
Id: namespaceId,
|
|
28619
|
+
Arn: arn
|
|
28620
|
+
}
|
|
28621
|
+
};
|
|
28622
|
+
} catch (error) {
|
|
28623
|
+
if (error instanceof ProvisioningError) throw error;
|
|
28624
|
+
const cause = error instanceof Error ? error : void 0;
|
|
28625
|
+
throw new ProvisioningError(`Failed to create HTTP namespace ${logicalId}: ${error instanceof Error ? error.message : String(error)}`, resourceType, logicalId, void 0, cause);
|
|
28626
|
+
}
|
|
28627
|
+
}
|
|
28628
|
+
/**
|
|
28629
|
+
* Update an HTTP namespace.
|
|
28630
|
+
*
|
|
28631
|
+
* `UpdateHttpNamespace` exposes exactly one mutable field: `Description`
|
|
28632
|
+
* (the SDK's `HttpNamespaceChange` shape). `Name` is createOnly — the
|
|
28633
|
+
* replacement-detection layer routes a Name change through DELETE+CREATE
|
|
28634
|
+
* before this method is ever called. Tags ride on the separate
|
|
28635
|
+
* `TagResource` / `UntagResource` APIs (see {@link syncNamespaceTags}).
|
|
28636
|
+
*
|
|
28637
|
+
* Empty-string Description is intentionally allowed through
|
|
28638
|
+
* (`!== undefined` gate, not truthy) so `cdkd drift --revert` can clear a
|
|
28639
|
+
* console-side ADD.
|
|
28640
|
+
*/
|
|
28641
|
+
async updateHttpNamespace(logicalId, physicalId, resourceType, properties, previousProperties) {
|
|
28642
|
+
this.logger.debug(`Updating HTTP namespace ${logicalId}: ${physicalId}`);
|
|
28643
|
+
const client = this.getClient();
|
|
28644
|
+
try {
|
|
28645
|
+
if (properties["Description"] !== void 0) {
|
|
28646
|
+
const namespaceChange = { Description: properties["Description"] };
|
|
28647
|
+
const operationId = (await client.send(new UpdateHttpNamespaceCommand({
|
|
28648
|
+
Id: physicalId,
|
|
28649
|
+
Namespace: namespaceChange
|
|
28650
|
+
}))).OperationId;
|
|
28651
|
+
if (operationId) await this.pollOperation(operationId, logicalId, resourceType);
|
|
28652
|
+
}
|
|
28653
|
+
await this.syncNamespaceTags(logicalId, physicalId, properties, previousProperties);
|
|
28654
|
+
this.logger.debug(`Successfully updated HTTP namespace ${logicalId}`);
|
|
28655
|
+
return {
|
|
28656
|
+
physicalId,
|
|
28657
|
+
wasReplaced: false
|
|
28658
|
+
};
|
|
28659
|
+
} catch (error) {
|
|
28660
|
+
if (error instanceof ProvisioningError) throw error;
|
|
28039
28661
|
const cause = error instanceof Error ? error : void 0;
|
|
28040
|
-
throw new ProvisioningError(`Failed to
|
|
28662
|
+
throw new ProvisioningError(`Failed to update HTTP namespace ${logicalId}: ${error instanceof Error ? error.message : String(error)}`, resourceType, logicalId, physicalId, cause);
|
|
28663
|
+
}
|
|
28664
|
+
}
|
|
28665
|
+
async createPublicDnsNamespace(logicalId, resourceType, properties) {
|
|
28666
|
+
this.logger.debug(`Creating public DNS namespace ${logicalId}`);
|
|
28667
|
+
const client = this.getClient();
|
|
28668
|
+
const name = properties["Name"];
|
|
28669
|
+
const description = properties["Description"];
|
|
28670
|
+
const tags = properties["Tags"];
|
|
28671
|
+
if (!name) throw new ProvisioningError(`Name is required for PublicDnsNamespace ${logicalId}`, resourceType, logicalId);
|
|
28672
|
+
const inputProperties = this.extractSoaTtlProperties(properties);
|
|
28673
|
+
try {
|
|
28674
|
+
const operationId = (await client.send(new CreatePublicDnsNamespaceCommand({
|
|
28675
|
+
Name: name,
|
|
28676
|
+
...description && { Description: description },
|
|
28677
|
+
...tags && tags.length > 0 && { Tags: tags },
|
|
28678
|
+
...inputProperties && { Properties: inputProperties }
|
|
28679
|
+
}))).OperationId;
|
|
28680
|
+
if (!operationId) throw new Error("CreatePublicDnsNamespace did not return OperationId");
|
|
28681
|
+
const namespaceId = await this.pollOperation(operationId, logicalId, resourceType);
|
|
28682
|
+
let arn;
|
|
28683
|
+
let hostedZoneId;
|
|
28684
|
+
try {
|
|
28685
|
+
const nsResp = await client.send(new GetNamespaceCommand({ Id: namespaceId }));
|
|
28686
|
+
arn = nsResp.Namespace?.Arn;
|
|
28687
|
+
hostedZoneId = nsResp.Namespace?.Properties?.DnsProperties?.HostedZoneId;
|
|
28688
|
+
} catch (err) {
|
|
28689
|
+
this.logger.debug(`GetNamespace(${namespaceId}) after create failed: ${err instanceof Error ? err.message : String(err)}`);
|
|
28690
|
+
}
|
|
28691
|
+
if (!arn) arn = await this.buildNamespaceArn(namespaceId);
|
|
28692
|
+
this.logger.debug(`Successfully created public DNS namespace ${logicalId}: ${namespaceId}`);
|
|
28693
|
+
return {
|
|
28694
|
+
physicalId: namespaceId,
|
|
28695
|
+
attributes: {
|
|
28696
|
+
Id: namespaceId,
|
|
28697
|
+
Arn: arn,
|
|
28698
|
+
...hostedZoneId && { HostedZoneId: hostedZoneId }
|
|
28699
|
+
}
|
|
28700
|
+
};
|
|
28701
|
+
} catch (error) {
|
|
28702
|
+
if (error instanceof ProvisioningError) throw error;
|
|
28703
|
+
const cause = error instanceof Error ? error : void 0;
|
|
28704
|
+
throw new ProvisioningError(`Failed to create public DNS namespace ${logicalId}: ${error instanceof Error ? error.message : String(error)}`, resourceType, logicalId, void 0, cause);
|
|
28705
|
+
}
|
|
28706
|
+
}
|
|
28707
|
+
/**
|
|
28708
|
+
* Update a public DNS namespace.
|
|
28709
|
+
*
|
|
28710
|
+
* `UpdatePublicDnsNamespace` exposes two mutable surfaces (the SDK's
|
|
28711
|
+
* `PublicDnsNamespaceChange` shape): `Description` and
|
|
28712
|
+
* `Properties.DnsProperties.SOA.TTL`. `Name` is createOnly — replacement
|
|
28713
|
+
* is routed through DELETE+CREATE upstream. Tags ride on the separate
|
|
28714
|
+
* `TagResource` / `UntagResource` APIs (see {@link syncNamespaceTags}).
|
|
28715
|
+
*/
|
|
28716
|
+
async updatePublicDnsNamespace(logicalId, physicalId, resourceType, properties, previousProperties) {
|
|
28717
|
+
this.logger.debug(`Updating public DNS namespace ${logicalId}: ${physicalId}`);
|
|
28718
|
+
const client = this.getClient();
|
|
28719
|
+
const namespaceChange = {};
|
|
28720
|
+
if (properties["Description"] !== void 0) namespaceChange.Description = properties["Description"];
|
|
28721
|
+
const soaProperties = this.extractSoaTtlProperties(properties);
|
|
28722
|
+
if (soaProperties) namespaceChange.Properties = soaProperties;
|
|
28723
|
+
try {
|
|
28724
|
+
if (Object.keys(namespaceChange).length > 0) {
|
|
28725
|
+
const operationId = (await client.send(new UpdatePublicDnsNamespaceCommand({
|
|
28726
|
+
Id: physicalId,
|
|
28727
|
+
Namespace: namespaceChange
|
|
28728
|
+
}))).OperationId;
|
|
28729
|
+
if (operationId) await this.pollOperation(operationId, logicalId, resourceType);
|
|
28730
|
+
}
|
|
28731
|
+
await this.syncNamespaceTags(logicalId, physicalId, properties, previousProperties);
|
|
28732
|
+
this.logger.debug(`Successfully updated public DNS namespace ${logicalId}`);
|
|
28733
|
+
return {
|
|
28734
|
+
physicalId,
|
|
28735
|
+
wasReplaced: false
|
|
28736
|
+
};
|
|
28737
|
+
} catch (error) {
|
|
28738
|
+
if (error instanceof ProvisioningError) throw error;
|
|
28739
|
+
const cause = error instanceof Error ? error : void 0;
|
|
28740
|
+
throw new ProvisioningError(`Failed to update public DNS namespace ${logicalId}: ${error instanceof Error ? error.message : String(error)}`, resourceType, logicalId, physicalId, cause);
|
|
28041
28741
|
}
|
|
28042
28742
|
}
|
|
28043
28743
|
async createService(logicalId, resourceType, properties) {
|
|
@@ -28187,6 +28887,59 @@ var ServiceDiscoveryProvider = class {
|
|
|
28187
28887
|
}
|
|
28188
28888
|
}
|
|
28189
28889
|
/**
|
|
28890
|
+
* Extract the CFn `Properties.DnsProperties.SOA.TTL` nested field (the only
|
|
28891
|
+
* mutable entry in the namespace `Properties` bag, shared by the private
|
|
28892
|
+
* and public DNS namespace kinds) into the SDK's input shape. Returns
|
|
28893
|
+
* `undefined` when the template does not set a TTL.
|
|
28894
|
+
*/
|
|
28895
|
+
extractSoaTtlProperties(properties) {
|
|
28896
|
+
const soa = (properties["Properties"]?.["DnsProperties"])?.["SOA"];
|
|
28897
|
+
return soa?.TTL !== void 0 ? { DnsProperties: { SOA: { TTL: Number(soa.TTL) } } } : void 0;
|
|
28898
|
+
}
|
|
28899
|
+
/**
|
|
28900
|
+
* Resolve a namespace's ARN — authoritative via `GetNamespace`, with a
|
|
28901
|
+
* deterministic STS-based construction as fallback so a transient read
|
|
28902
|
+
* failure right after create does not fail the whole resource.
|
|
28903
|
+
*/
|
|
28904
|
+
async resolveNamespaceArn(namespaceId) {
|
|
28905
|
+
try {
|
|
28906
|
+
const resp = await this.getClient().send(new GetNamespaceCommand({ Id: namespaceId }));
|
|
28907
|
+
if (resp.Namespace?.Arn) return resp.Namespace.Arn;
|
|
28908
|
+
} catch (err) {
|
|
28909
|
+
this.logger.debug(`GetNamespace(${namespaceId}) failed while resolving ARN: ${err instanceof Error ? err.message : String(err)}`);
|
|
28910
|
+
}
|
|
28911
|
+
return this.buildNamespaceArn(namespaceId);
|
|
28912
|
+
}
|
|
28913
|
+
/**
|
|
28914
|
+
* Diff-and-apply namespace tags via `TagResource` / `UntagResource`.
|
|
28915
|
+
*
|
|
28916
|
+
* `TagResource` is additive-only, so a tag dropped from the template
|
|
28917
|
+
* (partial removal) — or the entire `Tags` property removed (full removal,
|
|
28918
|
+
* `newTags === undefined`) — would survive on AWS unless we explicitly
|
|
28919
|
+
* `UntagResource` the removed keys (the ECR #981 regression class).
|
|
28920
|
+
* Failures THROW (never warn-swallow) so cdkd state is never written
|
|
28921
|
+
* as-if-applied; the next deploy retries naturally.
|
|
28922
|
+
*/
|
|
28923
|
+
async syncNamespaceTags(logicalId, physicalId, properties, previousProperties) {
|
|
28924
|
+
const newTags = properties["Tags"];
|
|
28925
|
+
const oldTags = previousProperties["Tags"];
|
|
28926
|
+
if (JSON.stringify(newTags) === JSON.stringify(oldTags)) return;
|
|
28927
|
+
const newKeys = new Set((newTags ?? []).map((t) => t.Key).filter((k) => !!k));
|
|
28928
|
+
const removedKeys = (oldTags ?? []).map((t) => t.Key).filter((k) => !!k && !newKeys.has(k));
|
|
28929
|
+
const hasAdds = !!newTags && newTags.length > 0;
|
|
28930
|
+
if (removedKeys.length === 0 && !hasAdds) return;
|
|
28931
|
+
const arn = await this.resolveNamespaceArn(physicalId);
|
|
28932
|
+
if (removedKeys.length > 0) await this.getClient().send(new UntagResourceCommand$14({
|
|
28933
|
+
ResourceARN: arn,
|
|
28934
|
+
TagKeys: removedKeys
|
|
28935
|
+
}));
|
|
28936
|
+
if (hasAdds) await this.getClient().send(new TagResourceCommand$14({
|
|
28937
|
+
ResourceARN: arn,
|
|
28938
|
+
Tags: newTags
|
|
28939
|
+
}));
|
|
28940
|
+
this.logger.debug(`Updated tags for namespace ${logicalId} (${physicalId})`);
|
|
28941
|
+
}
|
|
28942
|
+
/**
|
|
28190
28943
|
* Poll a Service Discovery operation until it completes.
|
|
28191
28944
|
* Returns the target resource ID from the operation result.
|
|
28192
28945
|
*/
|
|
@@ -28209,6 +28962,44 @@ var ServiceDiscoveryProvider = class {
|
|
|
28209
28962
|
throw new ProvisioningError(`Operation timed out for ${logicalId} (operationId: ${operationId})`, resourceType, logicalId);
|
|
28210
28963
|
}
|
|
28211
28964
|
/**
|
|
28965
|
+
* Resolve a `Fn::GetAtt` attribute live from AWS (used by `cdkd orphan`'s
|
|
28966
|
+
* sibling-reference rewriting and other post-deploy attribute reads).
|
|
28967
|
+
*
|
|
28968
|
+
* Namespace kinds resolve `Id` / `Arn` (plus `HostedZoneId` for the DNS
|
|
28969
|
+
* namespace kinds, read from `GetNamespace`'s
|
|
28970
|
+
* `Properties.DnsProperties.HostedZoneId`); Services resolve `Id` / `Arn` /
|
|
28971
|
+
* `Name` via `GetService`. Returns `undefined` for unknown attributes and
|
|
28972
|
+
* for gone resources.
|
|
28973
|
+
*/
|
|
28974
|
+
async getAttribute(physicalId, resourceType, attributeName) {
|
|
28975
|
+
switch (resourceType) {
|
|
28976
|
+
case "AWS::ServiceDiscovery::PrivateDnsNamespace":
|
|
28977
|
+
case "AWS::ServiceDiscovery::HttpNamespace":
|
|
28978
|
+
case "AWS::ServiceDiscovery::PublicDnsNamespace":
|
|
28979
|
+
if (attributeName === "Id") return physicalId;
|
|
28980
|
+
if (attributeName !== "Arn" && attributeName !== "HostedZoneId") return void 0;
|
|
28981
|
+
try {
|
|
28982
|
+
const resp = await this.getClient().send(new GetNamespaceCommand({ Id: physicalId }));
|
|
28983
|
+
if (attributeName === "Arn") return resp.Namespace?.Arn;
|
|
28984
|
+
return resp.Namespace?.Properties?.DnsProperties?.HostedZoneId;
|
|
28985
|
+
} catch (err) {
|
|
28986
|
+
if (err instanceof NamespaceNotFound) return void 0;
|
|
28987
|
+
throw err;
|
|
28988
|
+
}
|
|
28989
|
+
case "AWS::ServiceDiscovery::Service":
|
|
28990
|
+
if (attributeName === "Id") return physicalId;
|
|
28991
|
+
if (attributeName !== "Arn" && attributeName !== "Name") return void 0;
|
|
28992
|
+
try {
|
|
28993
|
+
const resp = await this.getClient().send(new GetServiceCommand({ Id: physicalId }));
|
|
28994
|
+
return attributeName === "Arn" ? resp.Service?.Arn : resp.Service?.Name;
|
|
28995
|
+
} catch (err) {
|
|
28996
|
+
if (err instanceof ServiceNotFound) return void 0;
|
|
28997
|
+
throw err;
|
|
28998
|
+
}
|
|
28999
|
+
default: return;
|
|
29000
|
+
}
|
|
29001
|
+
}
|
|
29002
|
+
/**
|
|
28212
29003
|
* Adopt an existing Cloud Map (Service Discovery) resource into cdkd state.
|
|
28213
29004
|
*
|
|
28214
29005
|
* - **AWS::ServiceDiscovery::PrivateDnsNamespace**: tag-based auto-lookup
|
|
@@ -28242,7 +29033,9 @@ var ServiceDiscoveryProvider = class {
|
|
|
28242
29033
|
*/
|
|
28243
29034
|
async readCurrentState(physicalId, _logicalId, resourceType) {
|
|
28244
29035
|
switch (resourceType) {
|
|
28245
|
-
case "AWS::ServiceDiscovery::PrivateDnsNamespace":
|
|
29036
|
+
case "AWS::ServiceDiscovery::PrivateDnsNamespace":
|
|
29037
|
+
case "AWS::ServiceDiscovery::PublicDnsNamespace": return this.readNamespace(physicalId, { includeProperties: true });
|
|
29038
|
+
case "AWS::ServiceDiscovery::HttpNamespace": return this.readNamespace(physicalId, { includeProperties: false });
|
|
28246
29039
|
case "AWS::ServiceDiscovery::Service": return this.readService(physicalId);
|
|
28247
29040
|
default: return;
|
|
28248
29041
|
}
|
|
@@ -28263,7 +29056,7 @@ var ServiceDiscoveryProvider = class {
|
|
|
28263
29056
|
if (resourceType === "AWS::ServiceDiscovery::PrivateDnsNamespace") return ["Vpc"];
|
|
28264
29057
|
return [];
|
|
28265
29058
|
}
|
|
28266
|
-
async readNamespace(physicalId) {
|
|
29059
|
+
async readNamespace(physicalId, options) {
|
|
28267
29060
|
let ns;
|
|
28268
29061
|
try {
|
|
28269
29062
|
ns = (await this.getClient().send(new GetNamespaceCommand({ Id: physicalId }))).Namespace;
|
|
@@ -28275,9 +29068,11 @@ var ServiceDiscoveryProvider = class {
|
|
|
28275
29068
|
const result = {};
|
|
28276
29069
|
if (ns.Name !== void 0) result["Name"] = ns.Name;
|
|
28277
29070
|
result["Description"] = ns.Description ?? "";
|
|
28278
|
-
|
|
28279
|
-
|
|
28280
|
-
|
|
29071
|
+
if (options.includeProperties) {
|
|
29072
|
+
const soa = ns.Properties?.DnsProperties?.SOA;
|
|
29073
|
+
if (soa?.TTL !== void 0) result["Properties"] = { DnsProperties: { SOA: { TTL: soa.TTL } } };
|
|
29074
|
+
else result["Properties"] = {};
|
|
29075
|
+
}
|
|
28281
29076
|
if (ns.Arn) await this.attachTags(result, ns.Arn);
|
|
28282
29077
|
return result;
|
|
28283
29078
|
}
|
|
@@ -28326,21 +29121,39 @@ var ServiceDiscoveryProvider = class {
|
|
|
28326
29121
|
/** Best-effort tag fetch via `ListTagsForResource(ResourceARN)`. */
|
|
28327
29122
|
async attachTags(result, arn) {
|
|
28328
29123
|
try {
|
|
28329
|
-
result["Tags"] = normalizeAwsTagsToCfn((await this.getClient().send(new ListTagsForResourceCommand$
|
|
29124
|
+
result["Tags"] = normalizeAwsTagsToCfn((await this.getClient().send(new ListTagsForResourceCommand$16({ ResourceARN: arn }))).Tags);
|
|
28330
29125
|
} catch (err) {
|
|
28331
29126
|
this.logger.debug(`ServiceDiscovery ListTagsForResource(${arn}) failed: ${err instanceof Error ? err.message : String(err)}`);
|
|
28332
29127
|
}
|
|
28333
29128
|
}
|
|
28334
29129
|
async import(input) {
|
|
28335
29130
|
switch (input.resourceType) {
|
|
28336
|
-
case "AWS::ServiceDiscovery::PrivateDnsNamespace":
|
|
29131
|
+
case "AWS::ServiceDiscovery::PrivateDnsNamespace":
|
|
29132
|
+
case "AWS::ServiceDiscovery::HttpNamespace":
|
|
29133
|
+
case "AWS::ServiceDiscovery::PublicDnsNamespace": return this.importNamespaceResource(input);
|
|
28337
29134
|
case "AWS::ServiceDiscovery::Service": return this.importServiceResource(input);
|
|
28338
29135
|
default: return null;
|
|
28339
29136
|
}
|
|
28340
29137
|
}
|
|
29138
|
+
/**
|
|
29139
|
+
* Map each namespace CFn type to its Cloud Map `Namespace.Type` value so
|
|
29140
|
+
* the import walk never adopts a same-named namespace of a different kind
|
|
29141
|
+
* (Cloud Map names are NOT unique across kinds; adopting the wrong one
|
|
29142
|
+
* would make a later destroy delete the wrong resource).
|
|
29143
|
+
*/
|
|
29144
|
+
static NAMESPACE_KIND_BY_TYPE = {
|
|
29145
|
+
"AWS::ServiceDiscovery::PrivateDnsNamespace": "DNS_PRIVATE",
|
|
29146
|
+
"AWS::ServiceDiscovery::HttpNamespace": "HTTP",
|
|
29147
|
+
"AWS::ServiceDiscovery::PublicDnsNamespace": "DNS_PUBLIC"
|
|
29148
|
+
};
|
|
28341
29149
|
async importNamespaceResource(input) {
|
|
29150
|
+
const expectedKind = ServiceDiscoveryProvider.NAMESPACE_KIND_BY_TYPE[input.resourceType];
|
|
28342
29151
|
if (input.knownPhysicalId) try {
|
|
28343
|
-
await this.getClient().send(new GetNamespaceCommand({ Id: input.knownPhysicalId }));
|
|
29152
|
+
const resp = await this.getClient().send(new GetNamespaceCommand({ Id: input.knownPhysicalId }));
|
|
29153
|
+
if (expectedKind && resp.Namespace?.Type && resp.Namespace.Type !== expectedKind) {
|
|
29154
|
+
this.logger.debug(`Namespace ${input.knownPhysicalId} is kind ${resp.Namespace.Type}, expected ${expectedKind} for ${input.resourceType} — refusing to adopt`);
|
|
29155
|
+
return null;
|
|
29156
|
+
}
|
|
28344
29157
|
return {
|
|
28345
29158
|
physicalId: input.knownPhysicalId,
|
|
28346
29159
|
attributes: {}
|
|
@@ -28355,12 +29168,13 @@ var ServiceDiscoveryProvider = class {
|
|
|
28355
29168
|
const list = await this.getClient().send(new ListNamespacesCommand({ ...token && { NextToken: token } }));
|
|
28356
29169
|
for (const ns of list.Namespaces ?? []) {
|
|
28357
29170
|
if (!ns.Id || !ns.Arn) continue;
|
|
29171
|
+
if (expectedKind && ns.Type && ns.Type !== expectedKind) continue;
|
|
28358
29172
|
if (desiredName && ns.Name === desiredName) return {
|
|
28359
29173
|
physicalId: ns.Id,
|
|
28360
29174
|
attributes: {}
|
|
28361
29175
|
};
|
|
28362
29176
|
if (input.cdkPath) try {
|
|
28363
|
-
if (matchesCdkPath((await this.getClient().send(new ListTagsForResourceCommand$
|
|
29177
|
+
if (matchesCdkPath((await this.getClient().send(new ListTagsForResourceCommand$16({ ResourceARN: ns.Arn }))).Tags, input.cdkPath)) return {
|
|
28364
29178
|
physicalId: ns.Id,
|
|
28365
29179
|
attributes: {}
|
|
28366
29180
|
};
|
|
@@ -28391,7 +29205,7 @@ var ServiceDiscoveryProvider = class {
|
|
|
28391
29205
|
for (const svc of list.Services ?? []) {
|
|
28392
29206
|
if (!svc.Id || !svc.Arn) continue;
|
|
28393
29207
|
try {
|
|
28394
|
-
if (matchesCdkPath((await this.getClient().send(new ListTagsForResourceCommand$
|
|
29208
|
+
if (matchesCdkPath((await this.getClient().send(new ListTagsForResourceCommand$16({ ResourceARN: svc.Arn }))).Tags, input.cdkPath)) return {
|
|
28395
29209
|
physicalId: svc.Id,
|
|
28396
29210
|
attributes: {}
|
|
28397
29211
|
};
|
|
@@ -28781,7 +29595,7 @@ var AppSyncProvider = class {
|
|
|
28781
29595
|
const tagsToAdd = {};
|
|
28782
29596
|
for (const [k, v] of Object.entries(newMap)) if (oldMap[k] !== v) tagsToAdd[k] = v;
|
|
28783
29597
|
if (tagKeysToRemove.length > 0) try {
|
|
28784
|
-
await this.getClient().send(new UntagResourceCommand$
|
|
29598
|
+
await this.getClient().send(new UntagResourceCommand$15({
|
|
28785
29599
|
resourceArn: arn,
|
|
28786
29600
|
tagKeys: tagKeysToRemove
|
|
28787
29601
|
}));
|
|
@@ -28789,7 +29603,7 @@ var AppSyncProvider = class {
|
|
|
28789
29603
|
throw this.wrapUpdateError(error, resourceType, logicalId, apiId, "GraphqlApi (untag)");
|
|
28790
29604
|
}
|
|
28791
29605
|
if (Object.keys(tagsToAdd).length > 0) try {
|
|
28792
|
-
await this.getClient().send(new TagResourceCommand$
|
|
29606
|
+
await this.getClient().send(new TagResourceCommand$15({
|
|
28793
29607
|
resourceArn: arn,
|
|
28794
29608
|
tags: tagsToAdd
|
|
28795
29609
|
}));
|
|
@@ -31342,14 +32156,14 @@ var KMSProvider = class {
|
|
|
31342
32156
|
const tagsToRemove = [];
|
|
31343
32157
|
for (const k of oldMap.keys()) if (!newMap.has(k)) tagsToRemove.push(k);
|
|
31344
32158
|
if (tagsToRemove.length > 0) {
|
|
31345
|
-
await this.getClient().send(new UntagResourceCommand$
|
|
32159
|
+
await this.getClient().send(new UntagResourceCommand$10({
|
|
31346
32160
|
KeyId: keyId,
|
|
31347
32161
|
TagKeys: tagsToRemove
|
|
31348
32162
|
}));
|
|
31349
32163
|
this.logger.debug(`Removed ${tagsToRemove.length} tag(s) from KMS Key ${keyId}`);
|
|
31350
32164
|
}
|
|
31351
32165
|
if (tagsToAdd.length > 0) {
|
|
31352
|
-
await this.getClient().send(new TagResourceCommand$
|
|
32166
|
+
await this.getClient().send(new TagResourceCommand$10({
|
|
31353
32167
|
KeyId: keyId,
|
|
31354
32168
|
Tags: tagsToAdd
|
|
31355
32169
|
}));
|
|
@@ -31964,11 +32778,11 @@ var BudgetsBudgetProvider = class {
|
|
|
31964
32778
|
const removedKeys = oldTags.map((t) => t.Key).filter((k) => {
|
|
31965
32779
|
return typeof k === "string" && !newKeys.has(k);
|
|
31966
32780
|
});
|
|
31967
|
-
if (removedKeys.length > 0) await this.getClient().send(new UntagResourceCommand$
|
|
32781
|
+
if (removedKeys.length > 0) await this.getClient().send(new UntagResourceCommand$16({
|
|
31968
32782
|
ResourceARN: arn,
|
|
31969
32783
|
ResourceTagKeys: removedKeys
|
|
31970
32784
|
}));
|
|
31971
|
-
if (newTags.length > 0) await this.getClient().send(new TagResourceCommand$
|
|
32785
|
+
if (newTags.length > 0) await this.getClient().send(new TagResourceCommand$16({
|
|
31972
32786
|
ResourceARN: arn,
|
|
31973
32787
|
ResourceTags: newTags
|
|
31974
32788
|
}));
|
|
@@ -32056,7 +32870,7 @@ var BudgetsBudgetProvider = class {
|
|
|
32056
32870
|
}));
|
|
32057
32871
|
for (const budget of list.Budgets ?? []) {
|
|
32058
32872
|
if (!budget.BudgetName) continue;
|
|
32059
|
-
if (matchesCdkPath((await client.send(new ListTagsForResourceCommand$
|
|
32873
|
+
if (matchesCdkPath((await client.send(new ListTagsForResourceCommand$17({ ResourceARN: this.budgetArn(accountId, budget.BudgetName) }))).ResourceTags, input.cdkPath)) return {
|
|
32060
32874
|
physicalId: budget.BudgetName,
|
|
32061
32875
|
attributes: { Arn: this.budgetArn(accountId, budget.BudgetName) }
|
|
32062
32876
|
};
|
|
@@ -32627,7 +33441,7 @@ var KinesisStreamConsumerProvider = class {
|
|
|
32627
33441
|
if (desc.ConsumerName !== void 0) result["ConsumerName"] = desc.ConsumerName;
|
|
32628
33442
|
if (desc.StreamARN !== void 0) result["StreamARN"] = desc.StreamARN;
|
|
32629
33443
|
try {
|
|
32630
|
-
result["Tags"] = normalizeAwsTagsToCfn((await this.getClient().send(new ListTagsForResourceCommand$
|
|
33444
|
+
result["Tags"] = normalizeAwsTagsToCfn((await this.getClient().send(new ListTagsForResourceCommand$18({ ResourceARN: physicalId }))).Tags);
|
|
32631
33445
|
} catch (err) {
|
|
32632
33446
|
if (err instanceof ResourceNotFoundException$8) return void 0;
|
|
32633
33447
|
this.logger.debug(`ListTagsForResource(${physicalId}) failed: ${err instanceof Error ? err.message : String(err)}`);
|
|
@@ -32651,14 +33465,14 @@ var KinesisStreamConsumerProvider = class {
|
|
|
32651
33465
|
const tagsToRemove = [];
|
|
32652
33466
|
for (const k of Object.keys(oldMap)) if (!(k in newMap)) tagsToRemove.push(k);
|
|
32653
33467
|
if (tagsToRemove.length > 0) {
|
|
32654
|
-
await this.getClient().send(new UntagResourceCommand$
|
|
33468
|
+
await this.getClient().send(new UntagResourceCommand$17({
|
|
32655
33469
|
ResourceARN: consumerArn,
|
|
32656
33470
|
TagKeys: tagsToRemove
|
|
32657
33471
|
}));
|
|
32658
33472
|
this.logger.debug(`Removed ${tagsToRemove.length} tag(s) from Kinesis stream consumer ${consumerArn}`);
|
|
32659
33473
|
}
|
|
32660
33474
|
if (Object.keys(tagsToAdd).length > 0) {
|
|
32661
|
-
await this.getClient().send(new TagResourceCommand$
|
|
33475
|
+
await this.getClient().send(new TagResourceCommand$17({
|
|
32662
33476
|
ResourceARN: consumerArn,
|
|
32663
33477
|
Tags: tagsToAdd
|
|
32664
33478
|
}));
|
|
@@ -35809,11 +36623,11 @@ var CodeCommitRepositoryProvider = class {
|
|
|
35809
36623
|
const repoArn = metadata?.Arn;
|
|
35810
36624
|
if (repoArn) {
|
|
35811
36625
|
const removedKeys = Object.keys(oldTagMap).filter((k) => !(k in newTagMap));
|
|
35812
|
-
if (removedKeys.length > 0) await this.getClient().send(new UntagResourceCommand$
|
|
36626
|
+
if (removedKeys.length > 0) await this.getClient().send(new UntagResourceCommand$18({
|
|
35813
36627
|
resourceArn: repoArn,
|
|
35814
36628
|
tagKeys: removedKeys
|
|
35815
36629
|
}));
|
|
35816
|
-
if (Object.keys(newTagMap).length > 0) await this.getClient().send(new TagResourceCommand$
|
|
36630
|
+
if (Object.keys(newTagMap).length > 0) await this.getClient().send(new TagResourceCommand$18({
|
|
35817
36631
|
resourceArn: repoArn,
|
|
35818
36632
|
tags: newTagMap
|
|
35819
36633
|
}));
|
|
@@ -35920,7 +36734,7 @@ var CodeCommitRepositoryProvider = class {
|
|
|
35920
36734
|
throw err;
|
|
35921
36735
|
}
|
|
35922
36736
|
if (!metadata?.Arn) continue;
|
|
35923
|
-
if ((await this.getClient().send(new ListTagsForResourceCommand$
|
|
36737
|
+
if ((await this.getClient().send(new ListTagsForResourceCommand$19({ resourceArn: metadata.Arn }))).tags?.["aws:cdk:path"] === input.cdkPath) return {
|
|
35924
36738
|
physicalId: repo.repositoryName,
|
|
35925
36739
|
attributes: this.toAttributes(metadata)
|
|
35926
36740
|
};
|
|
@@ -36070,7 +36884,7 @@ var DLMLifecyclePolicyProvider = class {
|
|
|
36070
36884
|
if (tagsChanged && arn) {
|
|
36071
36885
|
const removedKeys = Object.keys(oldTags).filter((k) => !(k in newTags));
|
|
36072
36886
|
if (removedKeys.length > 0) {
|
|
36073
|
-
await this.getClient().send(new UntagResourceCommand$
|
|
36887
|
+
await this.getClient().send(new UntagResourceCommand$19({
|
|
36074
36888
|
ResourceArn: arn,
|
|
36075
36889
|
TagKeys: removedKeys
|
|
36076
36890
|
}));
|
|
@@ -36079,7 +36893,7 @@ var DLMLifecyclePolicyProvider = class {
|
|
|
36079
36893
|
const tagsToAdd = {};
|
|
36080
36894
|
for (const [k, v] of Object.entries(newTags)) if (oldTags[k] !== v) tagsToAdd[k] = v;
|
|
36081
36895
|
if (Object.keys(tagsToAdd).length > 0) {
|
|
36082
|
-
await this.getClient().send(new TagResourceCommand$
|
|
36896
|
+
await this.getClient().send(new TagResourceCommand$19({
|
|
36083
36897
|
ResourceArn: arn,
|
|
36084
36898
|
Tags: tagsToAdd
|
|
36085
36899
|
}));
|
|
@@ -36282,11 +37096,11 @@ var S3VectorsProvider = class {
|
|
|
36282
37096
|
}
|
|
36283
37097
|
if (!resourceArn) throw new ProvisioningError(`Could not resolve ARN for S3 VectorBucket ${logicalId} (${physicalId}); cannot apply tag update.`, resourceType, logicalId, physicalId);
|
|
36284
37098
|
try {
|
|
36285
|
-
if (Object.keys(toSet).length > 0) await this.getClient().send(new TagResourceCommand$
|
|
37099
|
+
if (Object.keys(toSet).length > 0) await this.getClient().send(new TagResourceCommand$20({
|
|
36286
37100
|
resourceArn,
|
|
36287
37101
|
tags: toSet
|
|
36288
37102
|
}));
|
|
36289
|
-
if (toRemove.length > 0) await this.getClient().send(new UntagResourceCommand$
|
|
37103
|
+
if (toRemove.length > 0) await this.getClient().send(new UntagResourceCommand$20({
|
|
36290
37104
|
resourceArn,
|
|
36291
37105
|
tagKeys: toRemove
|
|
36292
37106
|
}));
|
|
@@ -36414,7 +37228,7 @@ var S3VectorsProvider = class {
|
|
|
36414
37228
|
if (Object.keys(enc).length > 0) result["EncryptionConfiguration"] = enc;
|
|
36415
37229
|
}
|
|
36416
37230
|
if (bucket?.vectorBucketArn) try {
|
|
36417
|
-
result["Tags"] = normalizeAwsTagsToCfn((await this.getClient().send(new ListTagsForResourceCommand$
|
|
37231
|
+
result["Tags"] = normalizeAwsTagsToCfn((await this.getClient().send(new ListTagsForResourceCommand$20({ resourceArn: bucket.vectorBucketArn }))).tags);
|
|
36418
37232
|
} catch (err) {
|
|
36419
37233
|
this.logger.debug(`S3Vectors ListTagsForResource(${bucket.vectorBucketArn}) failed: ${err instanceof Error ? err.message : String(err)}`);
|
|
36420
37234
|
result["Tags"] = [];
|
|
@@ -36450,7 +37264,7 @@ var S3VectorsProvider = class {
|
|
|
36450
37264
|
for (const bucket of list.vectorBuckets ?? []) {
|
|
36451
37265
|
if (!bucket.vectorBucketName || !bucket.vectorBucketArn) continue;
|
|
36452
37266
|
try {
|
|
36453
|
-
if ((await this.getClient().send(new ListTagsForResourceCommand$
|
|
37267
|
+
if ((await this.getClient().send(new ListTagsForResourceCommand$20({ resourceArn: bucket.vectorBucketArn }))).tags?.["aws:cdk:path"] === input.cdkPath) return {
|
|
36454
37268
|
physicalId: bucket.vectorBucketName,
|
|
36455
37269
|
attributes: {}
|
|
36456
37270
|
};
|
|
@@ -37060,7 +37874,7 @@ var S3TablesProvider = class {
|
|
|
37060
37874
|
attributes: {}
|
|
37061
37875
|
};
|
|
37062
37876
|
if (input.cdkPath) try {
|
|
37063
|
-
if ((await this.getClient().send(new ListTagsForResourceCommand$
|
|
37877
|
+
if ((await this.getClient().send(new ListTagsForResourceCommand$21({ resourceArn: bucket.arn }))).tags?.["aws:cdk:path"] === input.cdkPath) return {
|
|
37064
37878
|
physicalId: bucket.arn,
|
|
37065
37879
|
attributes: {}
|
|
37066
37880
|
};
|
|
@@ -37127,7 +37941,7 @@ var S3TablesProvider = class {
|
|
|
37127
37941
|
for (const table of tables.tables ?? []) {
|
|
37128
37942
|
if (!table.name || !table.tableARN) continue;
|
|
37129
37943
|
try {
|
|
37130
|
-
if ((await this.getClient().send(new ListTagsForResourceCommand$
|
|
37944
|
+
if ((await this.getClient().send(new ListTagsForResourceCommand$21({ resourceArn: table.tableARN }))).tags?.["aws:cdk:path"] === input.cdkPath) return {
|
|
37131
37945
|
physicalId: `${bucket.arn}|${namespaceName}|${table.name}`,
|
|
37132
37946
|
attributes: {}
|
|
37133
37947
|
};
|
|
@@ -37223,7 +38037,7 @@ var S3TablesProvider = class {
|
|
|
37223
38037
|
*/
|
|
37224
38038
|
async readTagsBestEffort(resourceArn) {
|
|
37225
38039
|
try {
|
|
37226
|
-
const tags = (await this.getClient().send(new ListTagsForResourceCommand$
|
|
38040
|
+
const tags = (await this.getClient().send(new ListTagsForResourceCommand$21({ resourceArn }))).tags ?? {};
|
|
37227
38041
|
const out = [];
|
|
37228
38042
|
for (const [Key, Value] of Object.entries(tags)) out.push({
|
|
37229
38043
|
Key,
|
|
@@ -37277,7 +38091,7 @@ var S3TablesProvider = class {
|
|
|
37277
38091
|
const resourceArn = await this.lookupTableArn(tableBucketARN, namespace, name);
|
|
37278
38092
|
if (!resourceArn) throw new ProvisioningError(`applyTableTagsDiff: GetTable returned no tableARN for ${physicalId} — table is gone or state is out-of-sync. Refusing to silently drop the tag update (run 'cdkd state orphan ${logicalId}' to clean up if the table was deleted out-of-band).`, resourceType, logicalId, physicalId);
|
|
37279
38093
|
if (removedKeys.length > 0) try {
|
|
37280
|
-
await this.getClient().send(new UntagResourceCommand$
|
|
38094
|
+
await this.getClient().send(new UntagResourceCommand$21({
|
|
37281
38095
|
resourceArn,
|
|
37282
38096
|
tagKeys: removedKeys
|
|
37283
38097
|
}));
|
|
@@ -37286,7 +38100,7 @@ var S3TablesProvider = class {
|
|
|
37286
38100
|
throw new ProvisioningError(`applyTableTagsDiff: UntagResource failed for ${resourceArn} (keys: ${removedKeys.join(", ")}): ${err instanceof Error ? err.message : String(err)}. State has NOT been updated so the next deploy will retry the tag-diff.`, resourceType, logicalId, physicalId, cause);
|
|
37287
38101
|
}
|
|
37288
38102
|
if (Object.keys(upserts).length > 0) try {
|
|
37289
|
-
await this.getClient().send(new TagResourceCommand$
|
|
38103
|
+
await this.getClient().send(new TagResourceCommand$21({
|
|
37290
38104
|
resourceArn,
|
|
37291
38105
|
tags: upserts
|
|
37292
38106
|
}));
|
|
@@ -37318,7 +38132,7 @@ var S3TablesProvider = class {
|
|
|
37318
38132
|
if (removedKeys.length === 0 && Object.keys(upserts).length === 0) return;
|
|
37319
38133
|
const resourceArn = physicalId;
|
|
37320
38134
|
if (removedKeys.length > 0) try {
|
|
37321
|
-
await this.getClient().send(new UntagResourceCommand$
|
|
38135
|
+
await this.getClient().send(new UntagResourceCommand$21({
|
|
37322
38136
|
resourceArn,
|
|
37323
38137
|
tagKeys: removedKeys
|
|
37324
38138
|
}));
|
|
@@ -37327,7 +38141,7 @@ var S3TablesProvider = class {
|
|
|
37327
38141
|
throw new ProvisioningError(`applyTableBucketTagsDiff: UntagResource failed for ${resourceArn} (keys: ${removedKeys.join(", ")}): ${err instanceof Error ? err.message : String(err)}. State has NOT been updated so the next deploy will retry the tag-diff.`, resourceType, logicalId, physicalId, cause);
|
|
37328
38142
|
}
|
|
37329
38143
|
if (Object.keys(upserts).length > 0) try {
|
|
37330
|
-
await this.getClient().send(new TagResourceCommand$
|
|
38144
|
+
await this.getClient().send(new TagResourceCommand$21({
|
|
37331
38145
|
resourceArn,
|
|
37332
38146
|
tags: upserts
|
|
37333
38147
|
}));
|
|
@@ -37510,11 +38324,11 @@ var ECRProvider = class {
|
|
|
37510
38324
|
if (repoArn) {
|
|
37511
38325
|
const newKeys = new Set((newTags ?? []).map((t) => t.Key).filter((k) => !!k));
|
|
37512
38326
|
const removedKeys = (oldTags ?? []).map((t) => t.Key).filter((k) => !!k && !newKeys.has(k));
|
|
37513
|
-
if (removedKeys.length > 0) await this.getClient().send(new UntagResourceCommand$
|
|
38327
|
+
if (removedKeys.length > 0) await this.getClient().send(new UntagResourceCommand$11({
|
|
37514
38328
|
resourceArn: repoArn,
|
|
37515
38329
|
tagKeys: removedKeys
|
|
37516
38330
|
}));
|
|
37517
|
-
if (newTags && newTags.length > 0) await this.getClient().send(new TagResourceCommand$
|
|
38331
|
+
if (newTags && newTags.length > 0) await this.getClient().send(new TagResourceCommand$11({
|
|
37518
38332
|
resourceArn: repoArn,
|
|
37519
38333
|
tags: newTags
|
|
37520
38334
|
}));
|
|
@@ -37613,7 +38427,7 @@ var ECRProvider = class {
|
|
|
37613
38427
|
if (!(err instanceof LifecyclePolicyNotFoundException)) throw err;
|
|
37614
38428
|
}
|
|
37615
38429
|
if (r.repositoryArn) try {
|
|
37616
|
-
result["Tags"] = normalizeAwsTagsToCfn((await this.getClient().send(new ListTagsForResourceCommand$
|
|
38430
|
+
result["Tags"] = normalizeAwsTagsToCfn((await this.getClient().send(new ListTagsForResourceCommand$8({ resourceArn: r.repositoryArn }))).tags);
|
|
37617
38431
|
} catch (err) {
|
|
37618
38432
|
if (!(err instanceof RepositoryNotFoundException)) throw err;
|
|
37619
38433
|
}
|
|
@@ -37646,7 +38460,7 @@ var ECRProvider = class {
|
|
|
37646
38460
|
for (const repo of list.repositories ?? []) {
|
|
37647
38461
|
if (!repo.repositoryArn || !repo.repositoryName) continue;
|
|
37648
38462
|
try {
|
|
37649
|
-
if (matchesCdkPath((await this.getClient().send(new ListTagsForResourceCommand$
|
|
38463
|
+
if (matchesCdkPath((await this.getClient().send(new ListTagsForResourceCommand$8({ resourceArn: repo.repositoryArn }))).tags, input.cdkPath)) return {
|
|
37650
38464
|
physicalId: repo.repositoryName,
|
|
37651
38465
|
attributes: {}
|
|
37652
38466
|
};
|
|
@@ -38944,8 +39758,13 @@ function registerAllProviders(registry) {
|
|
|
38944
39758
|
registry.register("AWS::ElastiCache::CacheCluster", elasticacheProvider);
|
|
38945
39759
|
const serviceDiscoveryProvider = new ServiceDiscoveryProvider();
|
|
38946
39760
|
registry.register("AWS::ServiceDiscovery::PrivateDnsNamespace", serviceDiscoveryProvider);
|
|
39761
|
+
registry.register("AWS::ServiceDiscovery::HttpNamespace", serviceDiscoveryProvider);
|
|
39762
|
+
registry.register("AWS::ServiceDiscovery::PublicDnsNamespace", serviceDiscoveryProvider);
|
|
38947
39763
|
registry.register("AWS::ServiceDiscovery::Service", serviceDiscoveryProvider);
|
|
38948
39764
|
registry.register("AWS::BedrockAgentCore::Runtime", new AgentCoreRuntimeProvider());
|
|
39765
|
+
registry.register("AWS::BedrockAgentCore::Browser", new AgentCoreBrowserProvider());
|
|
39766
|
+
registry.register("AWS::BedrockAgentCore::CodeInterpreter", new AgentCoreCodeInterpreterProvider());
|
|
39767
|
+
registry.register("AWS::BedrockAgentCore::Evaluator", new AgentCoreEvaluatorProvider());
|
|
38949
39768
|
const appSyncProvider = new AppSyncProvider();
|
|
38950
39769
|
registry.register("AWS::AppSync::GraphQLApi", appSyncProvider);
|
|
38951
39770
|
registry.register("AWS::AppSync::GraphQLSchema", appSyncProvider);
|
|
@@ -58249,7 +59068,7 @@ function reorderArgs(argv) {
|
|
|
58249
59068
|
async function main() {
|
|
58250
59069
|
installPipeCloseHandler();
|
|
58251
59070
|
const program = new Command();
|
|
58252
|
-
program.name("cdkd").description("CDK Direct - Deploy AWS CDK apps directly via SDK/Cloud Control API").version("0.
|
|
59071
|
+
program.name("cdkd").description("CDK Direct - Deploy AWS CDK apps directly via SDK/Cloud Control API").version("0.243.0");
|
|
58253
59072
|
program.addCommand(createBootstrapCommand());
|
|
58254
59073
|
program.addCommand(createSynthCommand());
|
|
58255
59074
|
program.addCommand(createListCommand());
|