cdk-real-drift 0.13.8 → 0.13.9

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/README.md CHANGED
@@ -935,6 +935,10 @@ covers them. **If you never run `revert`, cdkrd needs no write permissions at al
935
935
  `AWS::SageMaker::EndpointConfig` — its production-variant model wiring, plus the
936
936
  tags a separate `ListTags` call supplies since `DescribeEndpointConfig` omits
937
937
  them),
938
+ `sagemaker:DescribeMonitoringSchedule` + `sagemaker:ListTags` (read an
939
+ `AWS::SageMaker::MonitoringSchedule` — the Cloud Control read omits `Tags`, so
940
+ a declared `Tags` false-flagged as drift on every tagged schedule; a separate
941
+ `ListTags` call supplies them),
938
942
  `codebuild:BatchGetProjects` (reads an `AWS::CodeBuild::Project`) +
939
943
  `codebuild:BatchGetReportGroups` (reads an `AWS::CodeBuild::ReportGroup`),
940
944
  `dax:DescribeClusters` + `dax:DescribeParameterGroups` + `dax:DescribeParameters` +
package/dist/cli.js CHANGED
@@ -53,7 +53,7 @@ import { GetWorkgroupCommand, RedshiftServerlessClient } from "@aws-sdk/client-r
53
53
  import { BuildBotLocaleCommand, CreateIntentCommand, CreateSlotCommand, CreateSlotTypeCommand, DeleteIntentCommand, DeleteSlotCommand, DeleteSlotTypeCommand, DescribeBotLocaleCommand, DescribeIntentCommand, DescribeSlotCommand, DescribeSlotTypeCommand, LexModelsV2Client, ListBotLocalesCommand, ListIntentsCommand, ListSlotTypesCommand, ListSlotsCommand, UpdateBotLocaleCommand, UpdateIntentCommand, UpdateSlotCommand, UpdateSlotTypeCommand } from "@aws-sdk/client-lex-models-v2";
54
54
  import { GetScheduleCommand, SchedulerClient } from "@aws-sdk/client-scheduler";
55
55
  import { DescribeReceiptRuleCommand, DescribeReceiptRuleSetCommand, ListReceiptFiltersCommand, SESClient, UpdateReceiptRuleCommand } from "@aws-sdk/client-ses";
56
- import { DescribeEndpointConfigCommand, ListTagsCommand as ListTagsCommand$1, SageMakerClient } from "@aws-sdk/client-sagemaker";
56
+ import { DescribeEndpointConfigCommand, DescribeMonitoringScheduleCommand, ListTagsCommand as ListTagsCommand$1, SageMakerClient } from "@aws-sdk/client-sagemaker";
57
57
  import { GetNamespaceCommand, GetServiceCommand, ListTagsForResourceCommand as ListTagsForResourceCommand$4, ServiceDiscoveryClient, UpdateHttpNamespaceCommand } from "@aws-sdk/client-servicediscovery";
58
58
  import { createHash } from "node:crypto";
59
59
  import { S_BAR, S_BAR_END, S_BAR_START, S_CHECKBOX_INACTIVE, S_CHECKBOX_SELECTED, confirm, isCancel, select, spinner } from "@clack/prompts";
@@ -11641,6 +11641,32 @@ const readSageMakerEndpointConfig = async ({ physicalId, declared, region, accou
11641
11641
  }
11642
11642
  return model;
11643
11643
  };
11644
+ const readSageMakerMonitoringSchedule = async ({ physicalId, declared, region, accountId }) => {
11645
+ const raw = str$1(physicalId) ?? str$1(declared.MonitoringScheduleName);
11646
+ if (!raw) return void 0;
11647
+ const name = raw.startsWith("arn:") ? raw.split("/").pop() ?? raw : raw;
11648
+ const c = new SageMakerClient({
11649
+ region,
11650
+ ...READ_RETRY
11651
+ });
11652
+ const r = await c.send(new DescribeMonitoringScheduleCommand({ MonitoringScheduleName: name }));
11653
+ if (!r.MonitoringScheduleName) throw new ResourceGoneError(`SageMaker MonitoringSchedule ${name} absent`);
11654
+ const model = {};
11655
+ if (str$1(r.MonitoringScheduleName)) model.MonitoringScheduleName = r.MonitoringScheduleName;
11656
+ if (r.MonitoringScheduleConfig !== void 0) model.MonitoringScheduleConfig = r.MonitoringScheduleConfig;
11657
+ if (str$1(r.EndpointName)) model.EndpointName = r.EndpointName;
11658
+ const tagArn = str$1(r.MonitoringScheduleArn) ?? (accountId ? `arn:${partitionForRegion(region).partition}:sagemaker:${region}:${accountId}:monitoring-schedule/${name}` : void 0);
11659
+ if (tagArn) try {
11660
+ const tags = projectTagList((await c.send(new ListTagsCommand$1({ ResourceArn: tagArn }))).Tags);
11661
+ if (tags) model.Tags = tags;
11662
+ } catch (err) {
11663
+ const mirrored = mirrorDeclaredTags(declared.Tags);
11664
+ if (mirrored) model.Tags = mirrored;
11665
+ const call = err?.name || "unknown error";
11666
+ process.stderr.write(`[cdkrd] warning: SageMaker ListTags for MonitoringSchedule (${tagArn}) failed (${call}) — mirroring declared Tags to avoid a false drift; grant sagemaker:ListTags to detect out-of-band tag changes\n`);
11667
+ }
11668
+ return model;
11669
+ };
11644
11670
  const readMetricFilter = async ({ physicalId, declared, region }) => {
11645
11671
  const logGroup = str$1(declared.LogGroupName);
11646
11672
  const filterName = str$1(physicalId) ?? str$1(declared.FilterName);
@@ -12180,6 +12206,7 @@ const SDK_OVERRIDES = {
12180
12206
  "AWS::Glue::Connection": readGlueConnection,
12181
12207
  "AWS::Glue::SecurityConfiguration": readGlueSecurityConfiguration,
12182
12208
  "AWS::SageMaker::EndpointConfig": readSageMakerEndpointConfig,
12209
+ "AWS::SageMaker::MonitoringSchedule": readSageMakerMonitoringSchedule,
12183
12210
  "AWS::Logs::MetricFilter": readMetricFilter,
12184
12211
  "AWS::Scheduler::Schedule": readSchedulerSchedule
12185
12212
  };