cdk-real-drift 0.15.0 → 0.16.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/README.md CHANGED
@@ -1121,6 +1121,10 @@ Description / State / ExecutionRoleArn / PolicyDetails shape is re-supplied in
1121
1121
  place, since Cloud Control has no handler for the type),
1122
1122
  `docdb:ModifyDBCluster` / `ModifyDBInstance`,
1123
1123
  `config:DescribeConfigRules` / `config:PutConfigRule`,
1124
+ `config:PutConfigurationRecorder` (reverts an
1125
+ `AWS::Config::ConfigurationRecorder` — a whole-recorder upsert re-supplying the
1126
+ declared RecordingGroup / RecordingMode / RoleARN, since Cloud Control cannot
1127
+ write the type),
1124
1128
  `ecs:UpdateService` (reverts an `AWS::ECS::Service` `ServiceConnectConfiguration` /
1125
1129
  `VolumeConfigurations` drift — the whole writeOnly prop is re-supplied, since Cloud
1126
1130
  Control cannot sub-path patch it),
package/dist/cli.js CHANGED
@@ -49,7 +49,7 @@ import { DLMClient, GetLifecyclePolicyCommand, UpdateLifecyclePolicyCommand } fr
49
49
  import { DatabaseMigrationServiceClient, DescribeEndpointsCommand, DescribeReplicationInstancesCommand, DescribeReplicationSubnetGroupsCommand, DescribeReplicationTasksCommand, ListTagsForResourceCommand as ListTagsForResourceCommand$2 } from "@aws-sdk/client-database-migration-service";
50
50
  import { DescribeResourceCommand, EntityNotFoundException, LakeFormationClient } from "@aws-sdk/client-lakeformation";
51
51
  import { GetJobTemplateCommand, GetQueueCommand, ListTagsForResourceCommand as ListTagsForResourceCommand$3, MediaConvertClient } from "@aws-sdk/client-mediaconvert";
52
- import { ConfigServiceClient, DescribeConfigRulesCommand, DescribeConfigurationRecordersCommand, DescribeDeliveryChannelsCommand, PutConfigRuleCommand } from "@aws-sdk/client-config-service";
52
+ import { ConfigServiceClient, DescribeConfigRulesCommand, DescribeConfigurationRecordersCommand, DescribeDeliveryChannelsCommand, PutConfigRuleCommand, PutConfigurationRecorderCommand } from "@aws-sdk/client-config-service";
53
53
  import { DescribeConfigurationCommand, DescribeConfigurationRevisionCommand, KafkaClient, UpdateConfigurationCommand } from "@aws-sdk/client-kafka";
54
54
  import { GetWorkgroupCommand, RedshiftServerlessClient } from "@aws-sdk/client-redshift-serverless";
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";
@@ -17070,6 +17070,45 @@ const writeConfigRuleInputParameters = async (ctx, ops) => {
17070
17070
  InputParameters: configInputParametersString(op.value)
17071
17071
  } }));
17072
17072
  };
17073
+ const writeConfigConfigurationRecorder = async (ctx, ops) => {
17074
+ const desired = await desiredModel("AWS::Config::ConfigurationRecorder", ctx, ops);
17075
+ const name = str(desired.Name) ?? str(ctx.physicalId);
17076
+ const roleARN = str(desired.RoleARN);
17077
+ if (!name) throw new Error("cannot resolve Config recorder name for revert");
17078
+ if (!roleARN) throw new Error("cannot resolve Config recorder RoleARN for revert");
17079
+ const recorder = {
17080
+ name,
17081
+ roleARN
17082
+ };
17083
+ const rg = desired.RecordingGroup;
17084
+ if (rg) {
17085
+ const group = {};
17086
+ if (typeof rg.AllSupported === "boolean") group.allSupported = rg.AllSupported;
17087
+ if (typeof rg.IncludeGlobalResourceTypes === "boolean") group.includeGlobalResourceTypes = rg.IncludeGlobalResourceTypes;
17088
+ if (Array.isArray(rg.ResourceTypes)) group.resourceTypes = rg.ResourceTypes;
17089
+ const excl = rg.ExclusionByResourceTypes;
17090
+ if (excl && Array.isArray(excl.ResourceTypes) && excl.ResourceTypes.length > 0) group.exclusionByResourceTypes = { resourceTypes: excl.ResourceTypes };
17091
+ recorder.recordingGroup = group;
17092
+ }
17093
+ const rm = desired.RecordingMode;
17094
+ if (rm && str(rm.RecordingFrequency)) {
17095
+ const mode = { recordingFrequency: rm.RecordingFrequency };
17096
+ const overrides = rm.RecordingModeOverrides;
17097
+ if (Array.isArray(overrides) && overrides.length > 0) mode.recordingModeOverrides = overrides.map((o) => {
17098
+ const oo = o;
17099
+ return {
17100
+ resourceTypes: oo.ResourceTypes,
17101
+ recordingFrequency: oo.RecordingFrequency,
17102
+ ...str(oo.Description) ? { description: oo.Description } : {}
17103
+ };
17104
+ });
17105
+ recorder.recordingMode = mode;
17106
+ }
17107
+ await new ConfigServiceClient({
17108
+ region: ctx.region,
17109
+ ...CLIENT_TIMEOUTS
17110
+ }).send(new PutConfigurationRecorderCommand({ ConfigurationRecorder: recorder }));
17111
+ };
17073
17112
  const OS_UPDATABLE_OPTIONS = new Set([
17074
17113
  "ClusterConfig",
17075
17114
  "EBSOptions",
@@ -18063,7 +18102,8 @@ const SDK_WRITERS = {
18063
18102
  "AWS::SQS::QueuePolicy": writeSqsQueuePolicy,
18064
18103
  "AWS::Events::EventBusPolicy": writeEventBusPolicy,
18065
18104
  "AWS::IAM::Policy": writeIamPolicy,
18066
- "AWS::IAM::ManagedPolicy": writeIamManagedPolicy
18105
+ "AWS::IAM::ManagedPolicy": writeIamManagedPolicy,
18106
+ "AWS::Config::ConfigurationRecorder": writeConfigConfigurationRecorder
18067
18107
  };
18068
18108
  const SDK_PROP_WRITERS = {
18069
18109
  "AWS::Cognito::IdentityPool": { CognitoEvents: writeCognitoIdentityPoolEvents },