cdk-real-drift 0.21.0 → 0.22.1
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 +67 -2
- package/dist/cli.js.map +1 -1
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -55,7 +55,7 @@ import { GetWorkgroupCommand, RedshiftServerlessClient } from "@aws-sdk/client-r
|
|
|
55
55
|
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";
|
|
56
56
|
import { GetScheduleCommand, SchedulerClient } from "@aws-sdk/client-scheduler";
|
|
57
57
|
import { DescribeReceiptRuleCommand, DescribeReceiptRuleSetCommand, ListReceiptFiltersCommand, SESClient, UpdateReceiptRuleCommand } from "@aws-sdk/client-ses";
|
|
58
|
-
import { GetConfigurationSetEventDestinationsCommand, SESv2Client } from "@aws-sdk/client-sesv2";
|
|
58
|
+
import { GetConfigurationSetEventDestinationsCommand, SESv2Client, UpdateConfigurationSetEventDestinationCommand } from "@aws-sdk/client-sesv2";
|
|
59
59
|
import { DescribeEndpointConfigCommand, DescribeMonitoringScheduleCommand, ListTagsCommand as ListTagsCommand$1, SageMakerClient, UpdateMonitoringScheduleCommand } from "@aws-sdk/client-sagemaker";
|
|
60
60
|
import { GetNamespaceCommand, GetServiceCommand, ListTagsForResourceCommand as ListTagsForResourceCommand$4, ServiceDiscoveryClient, UpdateHttpNamespaceCommand, UpdateServiceCommand as UpdateServiceCommand$1 } from "@aws-sdk/client-servicediscovery";
|
|
61
61
|
import { createHash } from "node:crypto";
|
|
@@ -5922,7 +5922,11 @@ const MEANINGFUL_WHEN_OFF = {
|
|
|
5922
5922
|
},
|
|
5923
5923
|
"AWS::Redshift::ScheduledAction": { Enable: () => true },
|
|
5924
5924
|
"AWS::RDS::DBInstance": { AutoMinorVersionUpgrade: notRestored("DBSnapshotIdentifier") },
|
|
5925
|
-
"AWS::RDS::DBCluster": { AutoMinorVersionUpgrade:
|
|
5925
|
+
"AWS::RDS::DBCluster": { AutoMinorVersionUpgrade: (ctx) => {
|
|
5926
|
+
const engine = ctx.live["Engine"] ?? ctx.declared["Engine"];
|
|
5927
|
+
if (typeof engine === "string" && engine.startsWith("aurora")) return false;
|
|
5928
|
+
return notRestored("SnapshotIdentifier", "SourceDBClusterIdentifier")(ctx);
|
|
5929
|
+
} },
|
|
5926
5930
|
"AWS::Neptune::DBInstance": { AutoMinorVersionUpgrade: () => true },
|
|
5927
5931
|
"AWS::ElastiCache::CacheCluster": { AutoMinorVersionUpgrade: notRestored("SnapshotName", "SnapshotArns") },
|
|
5928
5932
|
"AWS::ElastiCache::ReplicationGroup": { AutoMinorVersionUpgrade: notRestored("SnapshotName", "SnapshotArns") },
|
|
@@ -17643,6 +17647,66 @@ const writeSesReceiptRule = async (ctx, ops) => {
|
|
|
17643
17647
|
Rule: rule
|
|
17644
17648
|
}));
|
|
17645
17649
|
};
|
|
17650
|
+
const toSesv2EventType = (v) => {
|
|
17651
|
+
const s = str(v);
|
|
17652
|
+
if (!s) return void 0;
|
|
17653
|
+
return {
|
|
17654
|
+
send: "SEND",
|
|
17655
|
+
reject: "REJECT",
|
|
17656
|
+
bounce: "BOUNCE",
|
|
17657
|
+
complaint: "COMPLAINT",
|
|
17658
|
+
delivery: "DELIVERY",
|
|
17659
|
+
open: "OPEN",
|
|
17660
|
+
click: "CLICK",
|
|
17661
|
+
renderingfailure: "RENDERING_FAILURE",
|
|
17662
|
+
deliverydelay: "DELIVERY_DELAY",
|
|
17663
|
+
subscription: "SUBSCRIPTION"
|
|
17664
|
+
}[s.toLowerCase().replace(/[_-]/g, "")] ?? s;
|
|
17665
|
+
};
|
|
17666
|
+
const toSesv2DimensionValueSource = (v) => {
|
|
17667
|
+
const s = str(v);
|
|
17668
|
+
if (!s) return void 0;
|
|
17669
|
+
return {
|
|
17670
|
+
messagetag: "MESSAGE_TAG",
|
|
17671
|
+
emailheader: "EMAIL_HEADER",
|
|
17672
|
+
linktag: "LINK_TAG"
|
|
17673
|
+
}[s.toLowerCase().replace(/[_-]/g, "")] ?? s;
|
|
17674
|
+
};
|
|
17675
|
+
const writeSesConfigurationSetEventDestination = async (ctx, ops) => {
|
|
17676
|
+
const m = await desiredModel("AWS::SES::ConfigurationSetEventDestination", ctx, ops);
|
|
17677
|
+
const csName = str(m.ConfigurationSetName) ?? str(ctx.declared["ConfigurationSetName"]);
|
|
17678
|
+
const dest = m.EventDestination;
|
|
17679
|
+
const declDest = ctx.declared["EventDestination"];
|
|
17680
|
+
const destName = str(dest?.Name) ?? str(declDest?.Name) ?? str(ctx.physicalId);
|
|
17681
|
+
if (!csName || !dest || !destName) throw new Error("cannot resolve SES event-destination target for revert");
|
|
17682
|
+
const cw = dest.CloudWatchDestination;
|
|
17683
|
+
const kfh = dest.KinesisFirehoseDestination;
|
|
17684
|
+
const sns = dest.SnsDestination;
|
|
17685
|
+
const eb = dest.EventBridgeDestination;
|
|
17686
|
+
const matchingEventTypes = Array.isArray(dest.MatchingEventTypes) ? dest.MatchingEventTypes.map(toSesv2EventType).filter((t) => t !== void 0) : [];
|
|
17687
|
+
await new SESv2Client({
|
|
17688
|
+
region: ctx.region,
|
|
17689
|
+
...CLIENT_TIMEOUTS
|
|
17690
|
+
}).send(new UpdateConfigurationSetEventDestinationCommand({
|
|
17691
|
+
ConfigurationSetName: csName,
|
|
17692
|
+
EventDestinationName: destName,
|
|
17693
|
+
EventDestination: {
|
|
17694
|
+
...dest.Enabled !== void 0 && { Enabled: Boolean(dest.Enabled) },
|
|
17695
|
+
MatchingEventTypes: matchingEventTypes,
|
|
17696
|
+
...cw?.DimensionConfigurations && cw.DimensionConfigurations.length > 0 && { CloudWatchDestination: { DimensionConfigurations: cw.DimensionConfigurations.map((d) => ({
|
|
17697
|
+
DimensionName: str(d.DimensionName),
|
|
17698
|
+
DimensionValueSource: toSesv2DimensionValueSource(d.DimensionValueSource),
|
|
17699
|
+
DefaultDimensionValue: str(d.DefaultDimensionValue)
|
|
17700
|
+
})) } },
|
|
17701
|
+
...kfh && { KinesisFirehoseDestination: {
|
|
17702
|
+
IamRoleArn: str(kfh.IAMRoleARN),
|
|
17703
|
+
DeliveryStreamArn: str(kfh.DeliveryStreamARN)
|
|
17704
|
+
} },
|
|
17705
|
+
...sns && str(sns.TopicARN) !== void 0 && { SnsDestination: { TopicArn: str(sns.TopicARN) } },
|
|
17706
|
+
...eb && str(eb.EventBusArn) !== void 0 && { EventBridgeDestination: { EventBusArn: str(eb.EventBusArn) } }
|
|
17707
|
+
}
|
|
17708
|
+
}));
|
|
17709
|
+
};
|
|
17646
17710
|
const writeCloudWatchAnomalyDetector = async (ctx, ops) => {
|
|
17647
17711
|
const m = await desiredModel("AWS::CloudWatch::AnomalyDetector", ctx, ops);
|
|
17648
17712
|
const single = m.SingleMetricAnomalyDetector;
|
|
@@ -18884,6 +18948,7 @@ const SDK_WRITERS = {
|
|
|
18884
18948
|
"AWS::Glue::Workflow": writeGlueWorkflow,
|
|
18885
18949
|
"AWS::Glue::Connection": writeGlueConnection,
|
|
18886
18950
|
"AWS::SES::ReceiptRule": writeSesReceiptRule,
|
|
18951
|
+
"AWS::SES::ConfigurationSetEventDestination": writeSesConfigurationSetEventDestination,
|
|
18887
18952
|
"AWS::CloudWatch::AnomalyDetector": writeCloudWatchAnomalyDetector,
|
|
18888
18953
|
"AWS::DLM::LifecyclePolicy": writeDlmLifecyclePolicy,
|
|
18889
18954
|
"AWS::Logs::MetricFilter": writeMetricFilter,
|