cdk-real-drift 0.21.0 → 0.22.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 +62 -1
- 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";
|
|
@@ -17643,6 +17643,66 @@ const writeSesReceiptRule = async (ctx, ops) => {
|
|
|
17643
17643
|
Rule: rule
|
|
17644
17644
|
}));
|
|
17645
17645
|
};
|
|
17646
|
+
const toSesv2EventType = (v) => {
|
|
17647
|
+
const s = str(v);
|
|
17648
|
+
if (!s) return void 0;
|
|
17649
|
+
return {
|
|
17650
|
+
send: "SEND",
|
|
17651
|
+
reject: "REJECT",
|
|
17652
|
+
bounce: "BOUNCE",
|
|
17653
|
+
complaint: "COMPLAINT",
|
|
17654
|
+
delivery: "DELIVERY",
|
|
17655
|
+
open: "OPEN",
|
|
17656
|
+
click: "CLICK",
|
|
17657
|
+
renderingfailure: "RENDERING_FAILURE",
|
|
17658
|
+
deliverydelay: "DELIVERY_DELAY",
|
|
17659
|
+
subscription: "SUBSCRIPTION"
|
|
17660
|
+
}[s.toLowerCase().replace(/[_-]/g, "")] ?? s;
|
|
17661
|
+
};
|
|
17662
|
+
const toSesv2DimensionValueSource = (v) => {
|
|
17663
|
+
const s = str(v);
|
|
17664
|
+
if (!s) return void 0;
|
|
17665
|
+
return {
|
|
17666
|
+
messagetag: "MESSAGE_TAG",
|
|
17667
|
+
emailheader: "EMAIL_HEADER",
|
|
17668
|
+
linktag: "LINK_TAG"
|
|
17669
|
+
}[s.toLowerCase().replace(/[_-]/g, "")] ?? s;
|
|
17670
|
+
};
|
|
17671
|
+
const writeSesConfigurationSetEventDestination = async (ctx, ops) => {
|
|
17672
|
+
const m = await desiredModel("AWS::SES::ConfigurationSetEventDestination", ctx, ops);
|
|
17673
|
+
const csName = str(m.ConfigurationSetName) ?? str(ctx.declared["ConfigurationSetName"]);
|
|
17674
|
+
const dest = m.EventDestination;
|
|
17675
|
+
const declDest = ctx.declared["EventDestination"];
|
|
17676
|
+
const destName = str(dest?.Name) ?? str(declDest?.Name) ?? str(ctx.physicalId);
|
|
17677
|
+
if (!csName || !dest || !destName) throw new Error("cannot resolve SES event-destination target for revert");
|
|
17678
|
+
const cw = dest.CloudWatchDestination;
|
|
17679
|
+
const kfh = dest.KinesisFirehoseDestination;
|
|
17680
|
+
const sns = dest.SnsDestination;
|
|
17681
|
+
const eb = dest.EventBridgeDestination;
|
|
17682
|
+
const matchingEventTypes = Array.isArray(dest.MatchingEventTypes) ? dest.MatchingEventTypes.map(toSesv2EventType).filter((t) => t !== void 0) : [];
|
|
17683
|
+
await new SESv2Client({
|
|
17684
|
+
region: ctx.region,
|
|
17685
|
+
...CLIENT_TIMEOUTS
|
|
17686
|
+
}).send(new UpdateConfigurationSetEventDestinationCommand({
|
|
17687
|
+
ConfigurationSetName: csName,
|
|
17688
|
+
EventDestinationName: destName,
|
|
17689
|
+
EventDestination: {
|
|
17690
|
+
...dest.Enabled !== void 0 && { Enabled: Boolean(dest.Enabled) },
|
|
17691
|
+
MatchingEventTypes: matchingEventTypes,
|
|
17692
|
+
...cw?.DimensionConfigurations && cw.DimensionConfigurations.length > 0 && { CloudWatchDestination: { DimensionConfigurations: cw.DimensionConfigurations.map((d) => ({
|
|
17693
|
+
DimensionName: str(d.DimensionName),
|
|
17694
|
+
DimensionValueSource: toSesv2DimensionValueSource(d.DimensionValueSource),
|
|
17695
|
+
DefaultDimensionValue: str(d.DefaultDimensionValue)
|
|
17696
|
+
})) } },
|
|
17697
|
+
...kfh && { KinesisFirehoseDestination: {
|
|
17698
|
+
IamRoleArn: str(kfh.IAMRoleARN),
|
|
17699
|
+
DeliveryStreamArn: str(kfh.DeliveryStreamARN)
|
|
17700
|
+
} },
|
|
17701
|
+
...sns && str(sns.TopicARN) !== void 0 && { SnsDestination: { TopicArn: str(sns.TopicARN) } },
|
|
17702
|
+
...eb && str(eb.EventBusArn) !== void 0 && { EventBridgeDestination: { EventBusArn: str(eb.EventBusArn) } }
|
|
17703
|
+
}
|
|
17704
|
+
}));
|
|
17705
|
+
};
|
|
17646
17706
|
const writeCloudWatchAnomalyDetector = async (ctx, ops) => {
|
|
17647
17707
|
const m = await desiredModel("AWS::CloudWatch::AnomalyDetector", ctx, ops);
|
|
17648
17708
|
const single = m.SingleMetricAnomalyDetector;
|
|
@@ -18884,6 +18944,7 @@ const SDK_WRITERS = {
|
|
|
18884
18944
|
"AWS::Glue::Workflow": writeGlueWorkflow,
|
|
18885
18945
|
"AWS::Glue::Connection": writeGlueConnection,
|
|
18886
18946
|
"AWS::SES::ReceiptRule": writeSesReceiptRule,
|
|
18947
|
+
"AWS::SES::ConfigurationSetEventDestination": writeSesConfigurationSetEventDestination,
|
|
18887
18948
|
"AWS::CloudWatch::AnomalyDetector": writeCloudWatchAnomalyDetector,
|
|
18888
18949
|
"AWS::DLM::LifecyclePolicy": writeDlmLifecyclePolicy,
|
|
18889
18950
|
"AWS::Logs::MetricFilter": writeMetricFilter,
|