cdk-real-drift 0.18.14 → 0.19.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 +140 -14
- package/dist/cli.js.map +1 -1
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -39,16 +39,16 @@ import { ACMClient, DescribeCertificateCommand, ListTagsForCertificateCommand }
|
|
|
39
39
|
import { BudgetsClient, DescribeBudgetCommand } from "@aws-sdk/client-budgets";
|
|
40
40
|
import { DescribeConfigurationSettingsCommand, ElasticBeanstalkClient, UpdateApplicationCommand, UpdateApplicationResourceLifecycleCommand, UpdateEnvironmentCommand } from "@aws-sdk/client-elastic-beanstalk";
|
|
41
41
|
import { CognitoSyncClient, GetCognitoEventsCommand, SetCognitoEventsCommand } from "@aws-sdk/client-cognito-sync";
|
|
42
|
-
import { BatchGetProjectsCommand, BatchGetReportGroupsCommand, CodeBuildClient, UpdateReportGroupCommand } from "@aws-sdk/client-codebuild";
|
|
42
|
+
import { BatchGetProjectsCommand, BatchGetReportGroupsCommand, CodeBuildClient, UpdateProjectCommand, UpdateReportGroupCommand } from "@aws-sdk/client-codebuild";
|
|
43
43
|
import { DescribeDBClustersCommand as DescribeDBClustersCommand$1, DescribeDBInstancesCommand as DescribeDBInstancesCommand$1, DocDBClient, ListTagsForResourceCommand as ListTagsForResourceCommand$1, ModifyDBClusterCommand, ModifyDBInstanceCommand } from "@aws-sdk/client-docdb";
|
|
44
44
|
import { DAXClient, DescribeClustersCommand, DescribeParameterGroupsCommand, DescribeParametersCommand as DescribeParametersCommand$1, DescribeSubnetGroupsCommand, ListTagsCommand, UpdateClusterCommand, UpdateParameterGroupCommand } from "@aws-sdk/client-dax";
|
|
45
45
|
import { AttachGroupPolicyCommand, AttachRolePolicyCommand, AttachUserPolicyCommand, CreatePolicyVersionCommand, DeletePolicyVersionCommand, DeleteRolePolicyCommand, DetachGroupPolicyCommand, DetachRolePolicyCommand, DetachUserPolicyCommand, GetGroupPolicyCommand, GetPolicyCommand as GetPolicyCommand$1, GetPolicyVersionCommand, GetRolePolicyCommand, GetUserPolicyCommand, IAMClient, ListAccessKeysCommand, ListEntitiesForPolicyCommand, ListPolicyVersionsCommand, PutGroupPolicyCommand, PutRolePolicyCommand, PutUserPolicyCommand } from "@aws-sdk/client-iam";
|
|
46
46
|
import { DescribeCacheClustersCommand, DescribeCacheParameterGroupsCommand, DescribeCacheParametersCommand, DescribeReplicationGroupsCommand, DescribeUsersCommand, ElastiCacheClient, ListTagsForResourceCommand as ListTagsForResourceCommand$2, ModifyCacheParameterGroupCommand, ResetCacheParameterGroupCommand } from "@aws-sdk/client-elasticache";
|
|
47
47
|
import { DescribeParameterGroupsCommand as DescribeParameterGroupsCommand$1, DescribeParametersCommand as DescribeParametersCommand$2, DescribeUsersCommand as DescribeUsersCommand$1, MemoryDBClient, ResetParameterGroupCommand, UpdateParameterGroupCommand as UpdateParameterGroupCommand$1 } from "@aws-sdk/client-memorydb";
|
|
48
|
-
import { CloudWatchClient, DescribeAnomalyDetectorsCommand, PutAnomalyDetectorCommand } from "@aws-sdk/client-cloudwatch";
|
|
48
|
+
import { CloudWatchClient, DescribeAnomalyDetectorsCommand, DisableAlarmActionsCommand, EnableAlarmActionsCommand, PutAnomalyDetectorCommand } from "@aws-sdk/client-cloudwatch";
|
|
49
49
|
import { DLMClient, GetLifecyclePolicyCommand, UpdateLifecyclePolicyCommand } from "@aws-sdk/client-dlm";
|
|
50
50
|
import { DescribeResourceCommand, EntityNotFoundException, LakeFormationClient } from "@aws-sdk/client-lakeformation";
|
|
51
|
-
import { GetJobTemplateCommand, GetQueueCommand, ListTagsForResourceCommand as ListTagsForResourceCommand$3, MediaConvertClient } from "@aws-sdk/client-mediaconvert";
|
|
51
|
+
import { GetJobTemplateCommand, GetQueueCommand, ListTagsForResourceCommand as ListTagsForResourceCommand$3, MediaConvertClient, UpdateQueueCommand } from "@aws-sdk/client-mediaconvert";
|
|
52
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";
|
|
@@ -2490,6 +2490,7 @@ const KNOWN_DEFAULTS = {
|
|
|
2490
2490
|
MinimumHealthyPercent: 100
|
|
2491
2491
|
}
|
|
2492
2492
|
},
|
|
2493
|
+
"AWS::AppConfig::ConfigurationProfile": { Type: "AWS.Freeform" },
|
|
2493
2494
|
"AWS::AppSync::GraphQLApi": {
|
|
2494
2495
|
ApiType: "GRAPHQL",
|
|
2495
2496
|
Visibility: "GLOBAL",
|
|
@@ -2613,6 +2614,7 @@ const KNOWN_DEFAULTS = {
|
|
|
2613
2614
|
ClusterSubnetGroupName: "default"
|
|
2614
2615
|
},
|
|
2615
2616
|
"AWS::Redshift::ScheduledAction": { Enable: true },
|
|
2617
|
+
"AWS::EC2::VPCEndpointService": { SupportedIpAddressTypes: ["ipv4"] },
|
|
2616
2618
|
"AWS::EC2::VPCEndpoint": {
|
|
2617
2619
|
IpAddressType: "ipv4",
|
|
2618
2620
|
VpcEndpointType: "Gateway",
|
|
@@ -3839,25 +3841,37 @@ const ELB_TG_ATTRIBUTE_DEFAULTS_BY_PROTOCOL = {
|
|
|
3839
3841
|
TCP: {
|
|
3840
3842
|
"stickiness.type": "source_ip",
|
|
3841
3843
|
"deregistration_delay.connection_termination.enabled": "false",
|
|
3842
|
-
"proxy_protocol_v2.enabled": "false"
|
|
3844
|
+
"proxy_protocol_v2.enabled": "false",
|
|
3845
|
+
"target_health_state.unhealthy.connection_termination.enabled": "true",
|
|
3846
|
+
"target_health_state.unhealthy.draining_interval_seconds": "0"
|
|
3843
3847
|
},
|
|
3844
3848
|
TLS: {
|
|
3845
3849
|
"stickiness.type": "source_ip",
|
|
3846
3850
|
"deregistration_delay.connection_termination.enabled": "false",
|
|
3847
|
-
"proxy_protocol_v2.enabled": "false"
|
|
3851
|
+
"proxy_protocol_v2.enabled": "false",
|
|
3852
|
+
"target_health_state.unhealthy.connection_termination.enabled": "true",
|
|
3853
|
+
"target_health_state.unhealthy.draining_interval_seconds": "0"
|
|
3848
3854
|
},
|
|
3849
3855
|
UDP: {
|
|
3850
3856
|
"stickiness.type": "source_ip",
|
|
3851
3857
|
"deregistration_delay.connection_termination.enabled": "false",
|
|
3852
|
-
"proxy_protocol_v2.enabled": "false"
|
|
3858
|
+
"proxy_protocol_v2.enabled": "false",
|
|
3859
|
+
"target_health_state.unhealthy.connection_termination.enabled": "true",
|
|
3860
|
+
"target_health_state.unhealthy.draining_interval_seconds": "0"
|
|
3853
3861
|
},
|
|
3854
3862
|
TCP_UDP: {
|
|
3855
3863
|
"stickiness.type": "source_ip",
|
|
3856
3864
|
"deregistration_delay.connection_termination.enabled": "false",
|
|
3857
|
-
"proxy_protocol_v2.enabled": "false"
|
|
3865
|
+
"proxy_protocol_v2.enabled": "false",
|
|
3866
|
+
"target_health_state.unhealthy.connection_termination.enabled": "true",
|
|
3867
|
+
"target_health_state.unhealthy.draining_interval_seconds": "0"
|
|
3858
3868
|
}
|
|
3859
3869
|
};
|
|
3860
|
-
const ELB_TG_ATTRIBUTE_DEFAULTS_BY_TARGET_TYPE = {
|
|
3870
|
+
const ELB_TG_ATTRIBUTE_DEFAULTS_BY_TARGET_TYPE = {
|
|
3871
|
+
alb: { "preserve_client_ip.enabled": "true" },
|
|
3872
|
+
ip: { "preserve_client_ip.enabled": "false" },
|
|
3873
|
+
instance: { "preserve_client_ip.enabled": "true" }
|
|
3874
|
+
};
|
|
3861
3875
|
const SENTINEL_UNPARSEABLE = Symbol("unparseable");
|
|
3862
3876
|
function deepCompareUnordered(a, b) {
|
|
3863
3877
|
if (a === b) return true;
|
|
@@ -3938,6 +3952,9 @@ const CASE_INSENSITIVE_PATHS = {
|
|
|
3938
3952
|
"AWS::Redshift::Cluster": new Set(["ClusterIdentifier"]),
|
|
3939
3953
|
"AWS::DMS::ReplicationInstance": new Set(["ReplicationInstanceIdentifier"]),
|
|
3940
3954
|
"AWS::DMS::ReplicationSubnetGroup": new Set(["ReplicationSubnetGroupIdentifier"]),
|
|
3955
|
+
"AWS::DAX::ParameterGroup": new Set(["ParameterGroupName"]),
|
|
3956
|
+
"AWS::DAX::SubnetGroup": new Set(["SubnetGroupName"]),
|
|
3957
|
+
"AWS::CertificateManager::Certificate": new Set(["DomainName"]),
|
|
3941
3958
|
"AWS::DMS::Endpoint": new Set(["EndpointType", "EndpointIdentifier"]),
|
|
3942
3959
|
"AWS::WAFv2::LoggingConfiguration": new Set(["RedactedFields.*.SingleHeader.Name"]),
|
|
3943
3960
|
"AWS::ElasticLoadBalancing::LoadBalancer": new Set(["Listeners.*.Protocol", "Listeners.*.InstanceProtocol"]),
|
|
@@ -4137,7 +4154,8 @@ function isPropertiesFileEqual(a, b) {
|
|
|
4137
4154
|
}
|
|
4138
4155
|
const CASE_INSENSITIVE_ARRAY_PATHS = {
|
|
4139
4156
|
"AWS::ApiGatewayV2::Api": new Set(["CorsConfiguration.AllowHeaders", "CorsConfiguration.ExposeHeaders"]),
|
|
4140
|
-
"AWS::Lambda::Url": new Set(["Cors.AllowHeaders", "Cors.ExposeHeaders"])
|
|
4157
|
+
"AWS::Lambda::Url": new Set(["Cors.AllowHeaders", "Cors.ExposeHeaders"]),
|
|
4158
|
+
"AWS::CertificateManager::Certificate": new Set(["SubjectAlternativeNames"])
|
|
4141
4159
|
};
|
|
4142
4160
|
function isCaseInsensitiveEqualScalarSet(a, b) {
|
|
4143
4161
|
if (!Array.isArray(a) || !Array.isArray(b) || a.length !== b.length) return false;
|
|
@@ -4473,6 +4491,7 @@ const READGAP_COLLECTION_PATHS = {
|
|
|
4473
4491
|
"AWS::DynamoDB::GlobalTable": new Set(["SSESpecification"]),
|
|
4474
4492
|
"AWS::DynamoDB::Table": new Set(["SSESpecification"]),
|
|
4475
4493
|
"AWS::CertificateManager::Certificate": new Set(["DomainValidationOptions"]),
|
|
4494
|
+
"AWS::Glue::Table": new Set(["OpenTableFormatInput"]),
|
|
4476
4495
|
"AWS::EC2::ClientVpnEndpoint": new Set(["TagSpecifications"]),
|
|
4477
4496
|
"AWS::DMS::Endpoint": new Set([
|
|
4478
4497
|
"DocDbSettings",
|
|
@@ -6260,6 +6279,17 @@ function configRecordingStrategyAtDefault(resourceType, schemaPath, value, live)
|
|
|
6260
6279
|
const useOnly = group.AllSupported === true ? "ALL_SUPPORTED_RESOURCE_TYPES" : Array.isArray(excl) && excl.length > 0 ? "EXCLUSION_BY_RESOURCE_TYPES" : Array.isArray(group.ResourceTypes) && group.ResourceTypes.length > 0 ? "INCLUSION_BY_RESOURCE_TYPES" : void 0;
|
|
6261
6280
|
return useOnly !== void 0 && deepEqual(value, { UseOnly: useOnly });
|
|
6262
6281
|
}
|
|
6282
|
+
function glueIcebergManagedParamsAtDefault(resourceType, schemaPath, value, declared) {
|
|
6283
|
+
if (resourceType !== "AWS::Glue::Table") return false;
|
|
6284
|
+
if (schemaPath !== "TableInput.Parameters") return false;
|
|
6285
|
+
const otf = declared.OpenTableFormatInput;
|
|
6286
|
+
if (!isNestedObject(otf) || !("IcebergInput" in otf)) return false;
|
|
6287
|
+
if (!isNestedObject(value)) return false;
|
|
6288
|
+
const params = value;
|
|
6289
|
+
const managed = new Set(["table_type", "metadata_location"]);
|
|
6290
|
+
if (!Object.keys(params).every((k) => managed.has(k))) return false;
|
|
6291
|
+
return params.table_type === "ICEBERG";
|
|
6292
|
+
}
|
|
6263
6293
|
const CLB_DEFAULT_SSL_POLICY_NAME = "ELBSecurityPolicy-2016-08";
|
|
6264
6294
|
function clbDefaultSslPoliciesAtDefault(resourceType, key, value) {
|
|
6265
6295
|
if (resourceType !== "AWS::ElasticLoadBalancing::LoadBalancer" || key !== "Policies") return false;
|
|
@@ -6964,6 +6994,11 @@ function classifyResource(resource, liveRaw, schema, opts = {}) {
|
|
|
6964
6994
|
...knownDefPaths,
|
|
6965
6995
|
"Artifacts.Name": artifactName
|
|
6966
6996
|
};
|
|
6997
|
+
const envType = declared["Environment"]?.["Type"];
|
|
6998
|
+
if (typeof envType === "string" && envType.endsWith("_LAMBDA_CONTAINER")) knownDef = {
|
|
6999
|
+
...knownDef,
|
|
7000
|
+
TimeoutInMinutes: 15
|
|
7001
|
+
};
|
|
6967
7002
|
}
|
|
6968
7003
|
if (resourceType === "AWS::SecretsManager::RotationSchedule") {
|
|
6969
7004
|
const expr = declared["RotationRules"]?.["ScheduleExpression"];
|
|
@@ -6998,6 +7033,14 @@ function classifyResource(resource, liveRaw, schema, opts = {}) {
|
|
|
6998
7033
|
};
|
|
6999
7034
|
}
|
|
7000
7035
|
}
|
|
7036
|
+
if (resourceType === "AWS::ElasticLoadBalancingV2::TargetGroup") {
|
|
7037
|
+
const proto = declared["Protocol"];
|
|
7038
|
+
if (typeof proto === "string" && (proto === "TCP" || proto === "TLS" || proto === "UDP" || proto === "TCP_UDP") && declared["TargetType"] !== "alb") knownDef = {
|
|
7039
|
+
...knownDef,
|
|
7040
|
+
HealthCheckProtocol: "TCP",
|
|
7041
|
+
HealthCheckTimeoutSeconds: 10
|
|
7042
|
+
};
|
|
7043
|
+
}
|
|
7001
7044
|
if (resourceType === "AWS::ElastiCache::ReplicationGroup" && declared["TransitEncryptionEnabled"] === true) knownDef = {
|
|
7002
7045
|
...knownDef,
|
|
7003
7046
|
TransitEncryptionMode: "required"
|
|
@@ -7168,7 +7211,7 @@ function classifyResource(resource, liveRaw, schema, opts = {}) {
|
|
|
7168
7211
|
const parentKey = (path.split(".").pop() ?? "").replace(/\[.*$/, "");
|
|
7169
7212
|
if (!isObjectForm || /tags$/i.test(parentKey)) return;
|
|
7170
7213
|
}
|
|
7171
|
-
const tier = schemaPath in schema.defaultPaths && matchesKnownDefault(value, schema.defaultPaths[schemaPath]) || schemaPath in knownDefPaths && matchesKnownDefault(value, knownDefPaths[schemaPath]) || (KNOWN_DEFAULT_ONE_OF_PATHS[resourceType]?.[schemaPath]?.some((d) => matchesKnownDefault(value, d)) ?? false) || VALUE_INDEPENDENT_DEFAULT_NESTED_PATHS[resourceType]?.has(schemaPath) && !(schemaPath in knownDefPaths) || dynamoGsiWarmThroughputAtDefault(resourceType, path, value, live, declared) || resourceType === "AWS::Events::EventBusPolicy" && schemaPath === "Statement.*.Sid" && typeof value === "string" && value === declared["StatementId"] || configRecordingStrategyAtDefault(resourceType, schemaPath, value, live) ? "atDefault" : generatedPaths.includes(schemaPath) && isPhysicalIdSegment(value, physicalId) || generatedNestedPaths?.has(schemaPath) && !(schemaPath in knownDefPaths) && (!(schemaPath in (MANAGED_KEY_ALIAS_PATHS[resourceType] ?? {})) || shouldFoldManagedServiceKey(resourceType, schemaPath, value, opts.kmsAliasTargets)) ? "generated" : "undeclared";
|
|
7214
|
+
const tier = schemaPath in schema.defaultPaths && matchesKnownDefault(value, schema.defaultPaths[schemaPath]) || schemaPath in knownDefPaths && matchesKnownDefault(value, knownDefPaths[schemaPath]) || (KNOWN_DEFAULT_ONE_OF_PATHS[resourceType]?.[schemaPath]?.some((d) => matchesKnownDefault(value, d)) ?? false) || VALUE_INDEPENDENT_DEFAULT_NESTED_PATHS[resourceType]?.has(schemaPath) && !(schemaPath in knownDefPaths) || dynamoGsiWarmThroughputAtDefault(resourceType, path, value, live, declared) || resourceType === "AWS::Events::EventBusPolicy" && schemaPath === "Statement.*.Sid" && typeof value === "string" && value === declared["StatementId"] || configRecordingStrategyAtDefault(resourceType, schemaPath, value, live) || glueIcebergManagedParamsAtDefault(resourceType, schemaPath, value, declared) ? "atDefault" : generatedPaths.includes(schemaPath) && isPhysicalIdSegment(value, physicalId) || generatedNestedPaths?.has(schemaPath) && !(schemaPath in knownDefPaths) && (!(schemaPath in (MANAGED_KEY_ALIAS_PATHS[resourceType] ?? {})) || shouldFoldManagedServiceKey(resourceType, schemaPath, value, opts.kmsAliasTargets)) ? "generated" : "undeclared";
|
|
7172
7215
|
const freeFormKey = tier === "undeclared" && underFreeFormMap(schemaPath);
|
|
7173
7216
|
findings.push({
|
|
7174
7217
|
tier,
|
|
@@ -12898,11 +12941,12 @@ const readAcmCertificate = async ({ physicalId, declared, region }) => {
|
|
|
12898
12941
|
const declaredSans = Array.isArray(declared.SubjectAlternativeNames) ? declared.SubjectAlternativeNames.filter((s) => str$1(s) !== void 0) : [];
|
|
12899
12942
|
const declaresSans = declaredSans.length > 0;
|
|
12900
12943
|
let sans = (cert.SubjectAlternativeNames ?? []).filter((s) => str$1(s) !== void 0);
|
|
12901
|
-
const apex = str$1(cert.DomainName);
|
|
12902
|
-
|
|
12944
|
+
const apex = str$1(cert.DomainName)?.toLowerCase();
|
|
12945
|
+
const declaredSansLower = declaredSans.map((s) => s.toLowerCase());
|
|
12946
|
+
if (declaresSans && apex !== void 0 && !declaredSansLower.includes(apex)) {
|
|
12903
12947
|
let dropped = false;
|
|
12904
12948
|
sans = sans.filter((s) => {
|
|
12905
|
-
if (!dropped && s === apex) {
|
|
12949
|
+
if (!dropped && s.toLowerCase() === apex) {
|
|
12906
12950
|
dropped = true;
|
|
12907
12951
|
return false;
|
|
12908
12952
|
}
|
|
@@ -17646,6 +17690,18 @@ const writeLogGroupBearerTokenAuth = async (ctx, ops) => {
|
|
|
17646
17690
|
}));
|
|
17647
17691
|
}
|
|
17648
17692
|
};
|
|
17693
|
+
const writeCompositeAlarmActionsEnabled = async (ctx, ops) => {
|
|
17694
|
+
const name = str(ctx.physicalId) ?? str(ctx.declared["AlarmName"]);
|
|
17695
|
+
if (!name) throw new Error("cannot resolve composite alarm name for ActionsEnabled revert");
|
|
17696
|
+
const c = new CloudWatchClient({
|
|
17697
|
+
region: ctx.region,
|
|
17698
|
+
...CLIENT_TIMEOUTS
|
|
17699
|
+
});
|
|
17700
|
+
for (const op of ops) {
|
|
17701
|
+
const enabled = op.op === "remove" ? true : op.value === true;
|
|
17702
|
+
await c.send(enabled ? new EnableAlarmActionsCommand({ AlarmNames: [name] }) : new DisableAlarmActionsCommand({ AlarmNames: [name] }));
|
|
17703
|
+
}
|
|
17704
|
+
};
|
|
17649
17705
|
const writeCognitoIdentityPoolEvents = async (ctx, ops) => {
|
|
17650
17706
|
const id = str(ctx.physicalId) ?? str(ctx.declared["Id"]);
|
|
17651
17707
|
if (!id) throw new Error("cannot resolve identity pool id for CognitoEvents revert");
|
|
@@ -17832,6 +17888,66 @@ const writeCodeBuildReportGroup = async (ctx, ops) => {
|
|
|
17832
17888
|
...CLIENT_TIMEOUTS
|
|
17833
17889
|
}).send(new UpdateReportGroupCommand(input));
|
|
17834
17890
|
};
|
|
17891
|
+
const CODEBUILD_PROJECT_MODIFY_PARAMS = {
|
|
17892
|
+
Description: "description",
|
|
17893
|
+
TimeoutInMinutes: "timeoutInMinutes",
|
|
17894
|
+
QueuedTimeoutInMinutes: "queuedTimeoutInMinutes",
|
|
17895
|
+
ConcurrentBuildLimit: "concurrentBuildLimit",
|
|
17896
|
+
AutoRetryLimit: "autoRetryLimit",
|
|
17897
|
+
BadgeEnabled: "badgeEnabled",
|
|
17898
|
+
SourceVersion: "sourceVersion",
|
|
17899
|
+
ServiceRole: "serviceRole",
|
|
17900
|
+
EncryptionKey: "encryptionKey"
|
|
17901
|
+
};
|
|
17902
|
+
const writeCodeBuildProject = async (ctx, ops) => {
|
|
17903
|
+
const name = str(ctx.physicalId) ?? str(ctx.declared["Name"]);
|
|
17904
|
+
if (!name) throw new Error("cannot resolve CodeBuild project name for revert");
|
|
17905
|
+
const desired = await desiredModel("AWS::CodeBuild::Project", ctx, ops);
|
|
17906
|
+
const input = { name };
|
|
17907
|
+
let any = false;
|
|
17908
|
+
for (const op of ops) {
|
|
17909
|
+
const top = op.path.replace(/^\//, "").split("/")[0] ?? "";
|
|
17910
|
+
const apiKey = CODEBUILD_PROJECT_MODIFY_PARAMS[top];
|
|
17911
|
+
if (!apiKey) continue;
|
|
17912
|
+
let val = desired[top];
|
|
17913
|
+
if (val === void 0) if (top === "Description" || top === "SourceVersion") val = "";
|
|
17914
|
+
else if (top === "ConcurrentBuildLimit") val = -1;
|
|
17915
|
+
else throw new Error(`CodeBuild Project ${top} cannot be cleared via UpdateProject (a selective modify keeps an omitted field); update it manually`);
|
|
17916
|
+
input[apiKey] = val;
|
|
17917
|
+
any = true;
|
|
17918
|
+
}
|
|
17919
|
+
if (any) await new CodeBuildClient({
|
|
17920
|
+
region: ctx.region,
|
|
17921
|
+
...CLIENT_TIMEOUTS
|
|
17922
|
+
}).send(new UpdateProjectCommand(input));
|
|
17923
|
+
assertOpsConsumed("CodeBuild Project", ops, new Set(Object.keys(CODEBUILD_PROJECT_MODIFY_PARAMS)));
|
|
17924
|
+
};
|
|
17925
|
+
const MEDIACONVERT_QUEUE_MODIFY_PARAMS = {
|
|
17926
|
+
Status: "Status",
|
|
17927
|
+
Description: "Description"
|
|
17928
|
+
};
|
|
17929
|
+
const writeMediaConvertQueue = async (ctx, ops) => {
|
|
17930
|
+
const name = str(ctx.physicalId) ?? str(ctx.declared["Name"]);
|
|
17931
|
+
if (!name) throw new Error("cannot resolve MediaConvert queue name for revert");
|
|
17932
|
+
const desired = await desiredModel("AWS::MediaConvert::Queue", ctx, ops);
|
|
17933
|
+
const input = { Name: name };
|
|
17934
|
+
let any = false;
|
|
17935
|
+
for (const op of ops) {
|
|
17936
|
+
const top = op.path.replace(/^\//, "").split("/")[0] ?? "";
|
|
17937
|
+
const apiKey = MEDIACONVERT_QUEUE_MODIFY_PARAMS[top];
|
|
17938
|
+
if (!apiKey) continue;
|
|
17939
|
+
let val = desired[top];
|
|
17940
|
+
if (val === void 0) if (top === "Description") val = "";
|
|
17941
|
+
else throw new Error(`MediaConvert Queue ${top} cannot be cleared via UpdateQueue; update it manually`);
|
|
17942
|
+
input[apiKey] = val;
|
|
17943
|
+
any = true;
|
|
17944
|
+
}
|
|
17945
|
+
if (any) await new MediaConvertClient({
|
|
17946
|
+
region: ctx.region,
|
|
17947
|
+
...CLIENT_TIMEOUTS
|
|
17948
|
+
}).send(new UpdateQueueCommand(input));
|
|
17949
|
+
assertOpsConsumed("MediaConvert Queue", ops, new Set(Object.keys(MEDIACONVERT_QUEUE_MODIFY_PARAMS)));
|
|
17950
|
+
};
|
|
17835
17951
|
const DAX_CLUSTER_MODIFY_PARAMS = {
|
|
17836
17952
|
Description: "Description",
|
|
17837
17953
|
PreferredMaintenanceWindow: "PreferredMaintenanceWindow",
|
|
@@ -18556,7 +18672,9 @@ const SDK_WRITERS = {
|
|
|
18556
18672
|
"AWS::ApiGatewayV2::Stage": writeApiGatewayV2Stage,
|
|
18557
18673
|
"AWS::ElasticBeanstalk::Application": writeElasticBeanstalkApplication,
|
|
18558
18674
|
"AWS::ElasticBeanstalk::Environment": writeElasticBeanstalkEnvironment,
|
|
18675
|
+
"AWS::CodeBuild::Project": writeCodeBuildProject,
|
|
18559
18676
|
"AWS::CodeBuild::ReportGroup": writeCodeBuildReportGroup,
|
|
18677
|
+
"AWS::MediaConvert::Queue": writeMediaConvertQueue,
|
|
18560
18678
|
"AWS::DAX::Cluster": writeDaxCluster,
|
|
18561
18679
|
"AWS::DAX::ParameterGroup": writeDaxParameterGroup,
|
|
18562
18680
|
"AWS::ElastiCache::ParameterGroup": writeElastiCacheParameterGroup,
|
|
@@ -18589,6 +18707,7 @@ const SDK_WRITERS = {
|
|
|
18589
18707
|
"AWS::Config::ConfigurationRecorder": writeConfigConfigurationRecorder
|
|
18590
18708
|
};
|
|
18591
18709
|
const SDK_PROP_WRITERS = {
|
|
18710
|
+
"AWS::CloudWatch::CompositeAlarm": { ActionsEnabled: writeCompositeAlarmActionsEnabled },
|
|
18592
18711
|
"AWS::Cognito::IdentityPool": { CognitoEvents: writeCognitoIdentityPoolEvents },
|
|
18593
18712
|
"AWS::Config::ConfigRule": { InputParameters: writeConfigRuleInputParameters },
|
|
18594
18713
|
"AWS::KinesisVideo::Stream": { DataRetentionInHours: writeKinesisVideoStreamRetention },
|
|
@@ -18932,7 +19051,14 @@ const REVERT_SET_DEFAULT_PATHS = new Set([
|
|
|
18932
19051
|
"AWS::ApiGatewayV2::RouteResponse\0ModelSelectionExpression",
|
|
18933
19052
|
"AWS::ApiGatewayV2::Api\0DisableExecuteApiEndpoint",
|
|
18934
19053
|
"AWS::ApiGatewayV2::Route\0AuthorizationType",
|
|
18935
|
-
"AWS::Kinesis::Stream\0RetentionPeriodHours"
|
|
19054
|
+
"AWS::Kinesis::Stream\0RetentionPeriodHours",
|
|
19055
|
+
"AWS::ECS::Cluster\0ClusterSettings",
|
|
19056
|
+
"AWS::CloudWatch::CompositeAlarm\0ActionsEnabled",
|
|
19057
|
+
"AWS::ApiGateway::RestApi\0ApiKeySourceType",
|
|
19058
|
+
"AWS::Glue::Crawler\0SchemaChangePolicy",
|
|
19059
|
+
"AWS::CodeBuild::Project\0TimeoutInMinutes",
|
|
19060
|
+
"AWS::CodeBuild::Project\0QueuedTimeoutInMinutes",
|
|
19061
|
+
"AWS::MediaConvert::Queue\0Status"
|
|
18936
19062
|
]);
|
|
18937
19063
|
const REVERT_SET_DEFAULT_VALUES = {
|
|
18938
19064
|
"AWS::EC2::Subnet\0EnableDns64": false,
|