cdk-real-drift 0.2.72 → 0.2.73

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
@@ -8814,6 +8814,8 @@ const CC_IDENTIFIER_ADAPTERS = {
8814
8814
  "AWS::ApiGatewayV2::Stage": compositeWith("ApiId"),
8815
8815
  "AWS::ApiGatewayV2::Route": compositeWith("ApiId"),
8816
8816
  "AWS::ApiGatewayV2::Integration": compositeWith("ApiId"),
8817
+ "AWS::ApiGatewayV2::Model": compositeWith("ApiId"),
8818
+ "AWS::ApiGatewayV2::Deployment": compositeWith("ApiId"),
8817
8819
  "AWS::ApiGatewayV2::Authorizer": (pid, declared) => {
8818
8820
  if (pid.includes("|")) return pid;
8819
8821
  const apiId = declared.ApiId;
@@ -8890,6 +8892,12 @@ const CC_IDENTIFIER_ADAPTERS = {
8890
8892
  const routeId = declared.RouteId;
8891
8893
  return typeof apiId === "string" && apiId.length > 0 && typeof routeId === "string" && routeId.length > 0 ? `${apiId}|${routeId}|${pid}` : void 0;
8892
8894
  },
8895
+ "AWS::ApiGatewayV2::IntegrationResponse": (pid, declared) => {
8896
+ if (pid.includes("|")) return pid;
8897
+ const apiId = declared.ApiId;
8898
+ const integrationId = declared.IntegrationId;
8899
+ return typeof apiId === "string" && apiId.length > 0 && typeof integrationId === "string" && integrationId.length > 0 ? `${apiId}|${integrationId}|${pid}` : void 0;
8900
+ },
8893
8901
  "AWS::GuardDuty::Filter": compositeWith("DetectorId")
8894
8902
  };
8895
8903
  function scalingPolicyComposite(pid, declared) {
@@ -10426,12 +10434,15 @@ const writeGlueWorkflow = async (ctx, ops) => {
10426
10434
  const m = await desiredModel("AWS::Glue::Workflow", ctx, ops);
10427
10435
  const name = str(m.Name) ?? str(ctx.physicalId) ?? str(ctx.declared["Name"]);
10428
10436
  if (!name) throw new Error("cannot resolve Glue workflow target for revert");
10429
- await new GlueClient({ region: ctx.region }).send(new UpdateWorkflowCommand({
10430
- Name: name,
10431
- ...m.Description !== void 0 && { Description: str(m.Description) },
10432
- ...m.DefaultRunProperties !== void 0 && { DefaultRunProperties: m.DefaultRunProperties },
10433
- ...m.MaxConcurrentRuns !== void 0 && { MaxConcurrentRuns: Number(m.MaxConcurrentRuns) }
10434
- }));
10437
+ const removed = (field) => ops.some((o) => o.op === "remove" && o.path.replace(/^\//, "").split("/")[0] === field);
10438
+ if (removed("MaxConcurrentRuns")) throw new Error("Glue Workflow MaxConcurrentRuns cannot be cleared via UpdateWorkflow (its unset state, \"no limit\", is not expressible in a selective update); update it manually");
10439
+ const input = { Name: name };
10440
+ if (m.Description !== void 0) input.Description = str(m.Description);
10441
+ else if (removed("Description")) input.Description = "";
10442
+ if (m.DefaultRunProperties !== void 0) input.DefaultRunProperties = m.DefaultRunProperties;
10443
+ else if (removed("DefaultRunProperties")) input.DefaultRunProperties = {};
10444
+ if (m.MaxConcurrentRuns !== void 0) input.MaxConcurrentRuns = Number(m.MaxConcurrentRuns);
10445
+ await new GlueClient({ region: ctx.region }).send(new UpdateWorkflowCommand(input));
10435
10446
  };
10436
10447
  const GLUE_CONNECTION_PASSWORD_KEY = /PASSWORD/i;
10437
10448
  const writeGlueConnection = async (ctx, ops) => {
@@ -10493,6 +10504,10 @@ const writeCloudWatchAnomalyDetector = async (ctx, ops) => {
10493
10504
  const writeDlmLifecyclePolicy = async (ctx, ops) => {
10494
10505
  const id = str(ctx.physicalId);
10495
10506
  if (!id) throw new Error("cannot resolve DLM lifecycle policy id for revert");
10507
+ for (const o of ops) {
10508
+ const top = o.path.replace(/^\//, "").split("/")[0] ?? "";
10509
+ if (o.op === "remove" && (top === "State" || top === "Description" || top === "ExecutionRoleArn")) throw new Error(`DLM LifecyclePolicy ${top} cannot be cleared via UpdateLifecyclePolicy (no safe clearing value; needs live confirmation); update it manually`);
10510
+ }
10496
10511
  const c = new DLMClient({ region: ctx.region });
10497
10512
  const m = await desiredModel("AWS::DLM::LifecyclePolicy", ctx, ops);
10498
10513
  let details = m.PolicyDetails;
@@ -10580,7 +10595,8 @@ const writeConfigRuleInputParameters = async (ctx, ops) => {
10580
10595
  const name = str(ctx.physicalId) ?? str(ctx.declared["ConfigRuleName"]);
10581
10596
  if (!name) throw new Error("cannot resolve Config rule name for revert");
10582
10597
  const op = ops.find((o) => o.path === "/InputParameters");
10583
- if (op?.op !== "add") throw new Error("Config rule InputParameters revert: unexpected op");
10598
+ if (!op) throw new Error("Config rule InputParameters revert: op not found");
10599
+ if (op.op !== "add") throw new Error("Config rule InputParameters cannot be cleared via revert: PutConfigRule re-PUTs the whole rule and the exact clearing payload (omit vs empty {}) needs live confirmation; clear it manually");
10584
10600
  const client = new ConfigServiceClient({ region: ctx.region });
10585
10601
  const rule = (await client.send(new DescribeConfigRulesCommand({ ConfigRuleNames: [name] }))).ConfigRules?.[0];
10586
10602
  if (!rule) throw new Error(`Config rule not found for revert: ${name}`);
@@ -10827,11 +10843,11 @@ const writeDaxCluster = async (ctx, ops) => {
10827
10843
  const top = op.path.replace(/^\//, "").split("/")[0] ?? "";
10828
10844
  const apiKey = DAX_CLUSTER_MODIFY_PARAMS[top];
10829
10845
  if (!apiKey) continue;
10830
- const val = desired[top] ?? (apiKey === "NotificationTopicArn" ? "" : void 0);
10831
- if (val !== void 0) {
10832
- input[apiKey] = val;
10833
- any = true;
10834
- }
10846
+ let val = desired[top];
10847
+ if (val === void 0) if (top === "NotificationTopicARN" || top === "Description") val = "";
10848
+ else throw new Error(`DAX Cluster ${top} cannot be cleared via UpdateCluster (its unset state is AWS-assigned, not expressible in a selective modify); update it manually`);
10849
+ input[apiKey] = val;
10850
+ any = true;
10835
10851
  }
10836
10852
  if (!any) return;
10837
10853
  await new DAXClient({ region: ctx.region }).send(new UpdateClusterCommand(input));