cdk-real-drift 0.2.22 → 0.2.23

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
@@ -50,7 +50,7 @@ import { S_BAR, S_BAR_END, S_BAR_START, S_CHECKBOX_INACTIVE, S_CHECKBOX_SELECTED
50
50
  import pc from "picocolors";
51
51
  import { MultiSelectPrompt, Prompt, isCancel as isCancel$1 } from "@clack/core";
52
52
  import { CloudFrontClient, GetDistributionConfigCommand, UpdateDistributionCommand } from "@aws-sdk/client-cloudfront";
53
- import { DescribeSignalingChannelCommand, DescribeStreamCommand, KinesisVideoClient, UpdateDataRetentionCommand, UpdateSignalingChannelCommand } from "@aws-sdk/client-kinesis-video";
53
+ import { DescribeSignalingChannelCommand, DescribeStreamCommand, KinesisVideoClient, UpdateDataRetentionCommand, UpdateSignalingChannelCommand, UpdateStreamStorageConfigurationCommand } from "@aws-sdk/client-kinesis-video";
54
54
  import { DescribeDomainConfigCommand, OpenSearchClient, UpdateDomainConfigCommand } from "@aws-sdk/client-opensearch";
55
55
  import { GetWebACLCommand, UpdateWebACLCommand, WAFV2Client } from "@aws-sdk/client-wafv2";
56
56
  import { ConfigServiceClient, DescribeConfigRulesCommand, PutConfigRuleCommand } from "@aws-sdk/client-config-service";
@@ -10274,6 +10274,22 @@ const writeKinesisVideoSignalingChannel = async (ctx, ops) => {
10274
10274
  SingleMasterConfiguration: { MessageTtlSeconds: target }
10275
10275
  }));
10276
10276
  };
10277
+ const KVS_STREAM_STORAGE_TIER_DEFAULT = "HOT";
10278
+ const writeKinesisVideoStreamStorage = async (ctx, ops) => {
10279
+ const id = str(ctx.physicalId) ?? str(ctx.declared["Name"]);
10280
+ if (!id) throw new Error("cannot resolve Kinesis Video stream for revert");
10281
+ const op = ops.find((o) => o.path.replace(/^\//, "").replace(/\//g, ".").endsWith("DefaultStorageTier"));
10282
+ if (!op) return;
10283
+ const target = op.op === "add" && typeof op.value === "string" ? op.value : KVS_STREAM_STORAGE_TIER_DEFAULT;
10284
+ const kv = new KinesisVideoClient({ region: ctx.region });
10285
+ const version = (await kv.send(new DescribeStreamCommand(kvsStreamRef(id)))).StreamInfo?.Version;
10286
+ if (version === void 0) throw new Error(`cannot resolve stream version for ${id}`);
10287
+ await kv.send(new UpdateStreamStorageConfigurationCommand({
10288
+ ...kvsStreamRef(id),
10289
+ CurrentVersion: version,
10290
+ StreamStorageConfiguration: { DefaultStorageTier: target }
10291
+ }));
10292
+ };
10277
10293
  const SDK_WRITERS = {
10278
10294
  "AWS::ElasticBeanstalk::Application": writeElasticBeanstalkApplication,
10279
10295
  "AWS::ElasticBeanstalk::Environment": writeElasticBeanstalkEnvironment,
@@ -10376,6 +10392,10 @@ const SDK_NESTED_WRITERS = {
10376
10392
  match: isApiGatewayMethodKnobPath,
10377
10393
  writer: writeApiGatewayMethod
10378
10394
  },
10395
+ "AWS::KinesisVideo::Stream": {
10396
+ match: (p) => p === "StreamStorageConfiguration" || p.startsWith("StreamStorageConfiguration."),
10397
+ writer: writeKinesisVideoStreamStorage
10398
+ },
10379
10399
  "AWS::ECS::Service": {
10380
10400
  match: (p) => p === "ServiceConnectConfiguration" || p.startsWith("ServiceConnectConfiguration.") || p === "VolumeConfigurations" || p.startsWith("VolumeConfigurations.") || p.startsWith("VolumeConfigurations["),
10381
10401
  writer: writeEcsServiceWriteOnlyProps
@@ -10438,7 +10458,8 @@ const REVERT_SET_DEFAULT_PATHS = new Set([
10438
10458
  "AWS::Cognito::UserPool\0UserPoolTier",
10439
10459
  "AWS::SNS::Subscription\0FilterPolicyScope",
10440
10460
  "AWS::InternetMonitor::Monitor\0Status",
10441
- "AWS::RolesAnywhere::Profile\0DurationSeconds"
10461
+ "AWS::RolesAnywhere::Profile\0DurationSeconds",
10462
+ "AWS::RolesAnywhere::Profile\0AttributeMappings"
10442
10463
  ]);
10443
10464
  /**
10444
10465
  * A nested undeclared value (a live sub-key inside a declared object, R96/R98) — a dotted