cdk-preflight 0.0.76 → 0.0.77
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/.jsii +2 -2
- package/docs/rules.md +76 -1
- package/lib/index.js +1 -1
- package/lib/rules.generated.js +859 -22
- package/package.json +1 -1
package/.jsii
CHANGED
|
@@ -9599,6 +9599,6 @@
|
|
|
9599
9599
|
"symbolId": "src/index:PreflightOptions"
|
|
9600
9600
|
}
|
|
9601
9601
|
},
|
|
9602
|
-
"version": "0.0.
|
|
9603
|
-
"fingerprint": "
|
|
9602
|
+
"version": "0.0.77",
|
|
9603
|
+
"fingerprint": "sL0Zdj2e7j1qnpJA2tJIRrYAmGzG7Ew7j8UMsVZs2Dw="
|
|
9604
9604
|
}
|
package/docs/rules.md
CHANGED
|
@@ -249,19 +249,62 @@
|
|
|
249
249
|
| `pf-cloudfront-origin-group-member-origin` | AWS::CloudFront::Distribution | Origin group members must reference an origin declared in the distribution | none |
|
|
250
250
|
| `pf-cloudfront-ttl-order` | AWS::CloudFront::Distribution | Cache behavior TTLs must satisfy MinTTL <= DefaultTTL <= MaxTTL | none |
|
|
251
251
|
| `pf-cloudfront-wafv2-webacl-scope` | AWS::CloudFront::Distribution | A WAFv2 web ACL attached to CloudFront must be globally scoped | none |
|
|
252
|
+
| `pf-cloudwatch-alarm-action-vendor` | AWS::CloudWatch::Alarm | Alarm actions accept only the CloudWatch action vendors | none |
|
|
253
|
+
| `pf-cloudwatch-alarm-actions-max` | AWS::CloudWatch::Alarm | Each alarm action list holds at most 5 ARNs | none |
|
|
254
|
+
| `pf-cloudwatch-alarm-anomaly-autoscaling-action` | AWS::CloudWatch::Alarm | An anomaly-detection alarm cannot carry an Auto Scaling action | none |
|
|
255
|
+
| `pf-cloudwatch-alarm-ec2-action-region` | AWS::CloudWatch::Alarm | An EC2 automate action must name the stack's own region | none |
|
|
256
|
+
| `pf-cloudwatch-alarm-evaluation-window` | AWS::CloudWatch::Alarm | The evaluation window caps at 7 days (Period >= 3600) or 1 day (Period < 3600) | none |
|
|
257
|
+
| `pf-cloudwatch-alarm-expressions-max` | AWS::CloudWatch::Alarm | An alarm takes at most 10 math expressions | none |
|
|
258
|
+
| `pf-cloudwatch-alarm-low-sample-percentile` | AWS::CloudWatch::Alarm | EvaluateLowSampleCountPercentile only applies to percentile statistics | none |
|
|
259
|
+
| `pf-cloudwatch-alarm-metrics-max` | AWS::CloudWatch::Alarm | An alarm takes at most 10 MetricStat queries | none |
|
|
252
260
|
| `pf-cloudwatch-alarm-period` | AWS::CloudWatch::Alarm | Period must be 10, 20, 30 or a multiple of 60 | none |
|
|
261
|
+
| `pf-cloudwatch-alarm-search-expression` | AWS::CloudWatch::Alarm | SEARCH() cannot be used in a metric alarm | none |
|
|
253
262
|
| `pf-cloudwatch-alarm-threshold` | AWS::CloudWatch::Alarm | Standard operators need Threshold, range operators need ThresholdMetricId | none |
|
|
263
|
+
| `pf-cloudwatch-anomaly-detector-excluded-range-order` | AWS::CloudWatch::AnomalyDetector | An excluded time range must start before it ends | none |
|
|
264
|
+
| `pf-cloudwatch-anomaly-detector-exclusive` | AWS::CloudWatch::AnomalyDetector | SingleMetricAnomalyDetector and MetricMathAnomalyDetector are mutually exclusive | none |
|
|
265
|
+
| `pf-cloudwatch-anomaly-detector-math-single-query` | AWS::CloudWatch::AnomalyDetector | A math detector needs more than one metric data query | none |
|
|
266
|
+
| `pf-cloudwatch-anomaly-detector-math-toplevel` | AWS::CloudWatch::AnomalyDetector | MetricMathAnomalyDetector cannot be combined with the top-level metric properties | none |
|
|
267
|
+
| `pf-cloudwatch-anomaly-detector-namespace-colon` | AWS::CloudWatch::AnomalyDetector | A metric namespace must not start with a colon | none |
|
|
268
|
+
| `pf-cloudwatch-anomaly-detector-stat-syntax` | AWS::CloudWatch::AnomalyDetector | The anomaly detector Stat must be a CloudWatch statistic | none |
|
|
254
269
|
| `pf-cloudwatch-composite-alarm-rule-syntax` | AWS::CloudWatch::CompositeAlarm | An AlarmRule must start with a valid expression token | none |
|
|
270
|
+
| `pf-cloudwatch-composite-self-reference` | AWS::CloudWatch::CompositeAlarm | A composite alarm cannot reference itself in its AlarmRule | none |
|
|
271
|
+
| `pf-cloudwatch-composite-suppressor-extension-period` | AWS::CloudWatch::CompositeAlarm | ActionsSuppressor requires ActionsSuppressorExtensionPeriod | none |
|
|
272
|
+
| `pf-cloudwatch-composite-suppressor-format` | AWS::CloudWatch::CompositeAlarm | ActionsSuppressor must be an alarm name or a CloudWatch alarm ARN | none |
|
|
273
|
+
| `pf-cloudwatch-composite-suppressor-required` | AWS::CloudWatch::CompositeAlarm | The suppressor periods require an ActionsSuppressor | none |
|
|
274
|
+
| `pf-cloudwatch-composite-suppressor-wait-period` | AWS::CloudWatch::CompositeAlarm | ActionsSuppressor requires ActionsSuppressorWaitPeriod | none |
|
|
275
|
+
| `pf-cloudwatch-dashboard-alarm-widget-alarms` | AWS::CloudWatch::Dashboard | An alarm widget requires properties.alarms | none |
|
|
255
276
|
| `pf-cloudwatch-dashboard-body-json` | AWS::CloudWatch::Dashboard | DashboardBody must be valid JSON | none |
|
|
277
|
+
| `pf-cloudwatch-dashboard-metric-widget-source` | AWS::CloudWatch::Dashboard | A metric widget needs a region and a data source | none |
|
|
256
278
|
| `pf-cloudwatch-dashboard-name` | AWS::CloudWatch::Dashboard | Dashboard names allow only alphanumerics, dash and underscore | none |
|
|
279
|
+
| `pf-cloudwatch-dashboard-text-widget-markdown` | AWS::CloudWatch::Dashboard | A text widget requires properties.markdown | none |
|
|
257
280
|
| `pf-cloudwatch-dashboard-widget-fields` | AWS::CloudWatch::Dashboard | Every dashboard widget requires type and properties | none |
|
|
281
|
+
| `pf-cloudwatch-dashboard-widget-height-max` | AWS::CloudWatch::Dashboard | Widget height tops out at 1000 | none |
|
|
282
|
+
| `pf-cloudwatch-dashboard-widget-period` | AWS::CloudWatch::Dashboard | A widget period must be 1, 5, 10, 20, 30 or a multiple of 60 | none |
|
|
258
283
|
| `pf-cloudwatch-dashboard-widget-position` | AWS::CloudWatch::Dashboard | Dashboard widget x tops out at 23 and width at 24 | none |
|
|
284
|
+
| `pf-cloudwatch-dashboard-widget-position-min` | AWS::CloudWatch::Dashboard | Widget x and y must not be negative | none |
|
|
285
|
+
| `pf-cloudwatch-dashboard-widget-stat-syntax` | AWS::CloudWatch::Dashboard | A widget stat must be a CloudWatch statistic | none |
|
|
259
286
|
| `pf-cloudwatch-dashboard-widgets` | AWS::CloudWatch::Dashboard | DashboardBody requires a widgets array | none |
|
|
287
|
+
| `pf-cloudwatch-dashboard-widgets-array` | AWS::CloudWatch::Dashboard | The widgets key must hold an array | none |
|
|
288
|
+
| `pf-cloudwatch-dashboard-yaxis-range` | AWS::CloudWatch::Dashboard | A widget yAxis min must be below its max | none |
|
|
260
289
|
| `pf-cloudwatch-datapoints-evaluation` | AWS::CloudWatch::Alarm | DatapointsToAlarm must not exceed EvaluationPeriods | none |
|
|
261
290
|
| `pf-cloudwatch-extended-statistic` | AWS::CloudWatch::Alarm | A percentile statistic cannot exceed p100 | none |
|
|
291
|
+
| `pf-cloudwatch-insight-rule-body-json` | AWS::CloudWatch::InsightRule | RuleBody must be valid JSON | none |
|
|
292
|
+
| `pf-cloudwatch-insight-rule-body-unknown-key` | AWS::CloudWatch::InsightRule | The rule body top level takes only the documented keys | none |
|
|
293
|
+
| `pf-cloudwatch-insight-rule-contribution-filters` | AWS::CloudWatch::InsightRule | Contribution requires a Filters key | none |
|
|
294
|
+
| `pf-cloudwatch-insight-rule-keys-max` | AWS::CloudWatch::InsightRule | Contribution.Keys holds at most 4 keys | none |
|
|
295
|
+
| `pf-cloudwatch-insight-rule-log-format` | AWS::CloudWatch::InsightRule | LogFormat must be JSON or CLF | none |
|
|
296
|
+
| `pf-cloudwatch-insight-rule-log-groups` | AWS::CloudWatch::InsightRule | The rule body needs at least one log group | none |
|
|
297
|
+
| `pf-cloudwatch-insight-rule-schema` | AWS::CloudWatch::InsightRule | The rule body Schema must be CloudWatchLogRule version 1 | none |
|
|
262
298
|
| `pf-cloudwatch-metric-namespace-ascii` | AWS::CloudWatch::Alarm | Metric namespaces must not contain non-ASCII characters | none |
|
|
263
299
|
| `pf-cloudwatch-metric-query-exclusive` | AWS::CloudWatch::Alarm | Expression and MetricStat are mutually exclusive per query | none |
|
|
264
|
-
| `pf-cloudwatch-metric-query-returndata` | AWS::CloudWatch::Alarm |
|
|
300
|
+
| `pf-cloudwatch-metric-query-returndata` | AWS::CloudWatch::Alarm | One metric query must return data, or two for an anomaly alarm | none |
|
|
301
|
+
| `pf-cloudwatch-metric-stream-additional-statistic` | AWS::CloudWatch::MetricStream | AdditionalStatistics must be CloudWatch statistics | none |
|
|
302
|
+
| `pf-cloudwatch-metric-stream-filters-exclusive` | AWS::CloudWatch::MetricStream | IncludeFilters and ExcludeFilters are mutually exclusive | none |
|
|
303
|
+
| `pf-cloudwatch-metric-stream-firehose-account` | AWS::CloudWatch::MetricStream | FirehoseArn must be in the stack's own account | none |
|
|
304
|
+
| `pf-cloudwatch-metric-stream-firehose-region` | AWS::CloudWatch::MetricStream | FirehoseArn must be in the stack's own region and partition | none |
|
|
305
|
+
| `pf-cloudwatch-metric-stream-include-metrics` | AWS::CloudWatch::MetricStream | A statistics configuration needs at least one IncludeMetrics entry | none |
|
|
306
|
+
| `pf-cloudwatch-metric-stream-role-account` | AWS::CloudWatch::MetricStream | RoleArn must be in the stack's own account | none |
|
|
307
|
+
| `pf-cloudwatch-metricstat-stat-syntax` | AWS::CloudWatch::Alarm | MetricStat.Stat must be a CloudWatch statistic | none |
|
|
265
308
|
| `pf-cloudwatch-threshold-metric-id` | AWS::CloudWatch::Alarm | ThresholdMetricId must match a metric query that returns data | none |
|
|
266
309
|
| `pf-cognito-alias-username-exclusive` | AWS::Cognito::UserPool | AliasAttributes and UsernameAttributes are mutually exclusive | none |
|
|
267
310
|
| `pf-cognito-client-credentials-exclusive` | AWS::Cognito::UserPoolClient | client_credentials cannot combine with code or implicit | none |
|
|
@@ -821,9 +864,41 @@
|
|
|
821
864
|
| `pf-lambda-vpc-non-empty` | AWS::Lambda::Function | VpcConfig needs at least one subnet and one security group | none |
|
|
822
865
|
| `pf-lambda-vpc-same-vpc` | AWS::Lambda::Function | Subnets and security groups belong to one VPC | none |
|
|
823
866
|
| `pf-lambda-zip-no-imageuri` | AWS::Lambda::Function | A .zip function cannot carry Code.ImageUri | none |
|
|
867
|
+
| `pf-logs-account-policy-document-json` | AWS::Logs::AccountPolicy | An account policy document must be valid JSON | none |
|
|
868
|
+
| `pf-logs-account-policy-selection-criteria-prefix` | AWS::Logs::AccountPolicy | Field index and transformer account policies select with LogGroupNamePrefix | none |
|
|
869
|
+
| `pf-logs-account-policy-selection-criteria-subscription` | AWS::Logs::AccountPolicy | A subscription account policy selects with LogGroupName NOT IN | none |
|
|
870
|
+
| `pf-logs-account-policy-selection-criteria-unsupported` | AWS::Logs::AccountPolicy | A data protection account policy takes no SelectionCriteria | none |
|
|
871
|
+
| `pf-logs-account-policy-subscription-document` | AWS::Logs::AccountPolicy | A subscription account policy document needs DestinationArn | none |
|
|
872
|
+
| `pf-logs-account-policy-transformer-document` | AWS::Logs::AccountPolicy | A transformer account policy document is an array of processors | none |
|
|
873
|
+
| `pf-logs-anomaly-detector-single-log-group` | AWS::Logs::LogAnomalyDetector | A log anomaly detector watches exactly one log group | none |
|
|
874
|
+
| `pf-logs-data-protection-identifier-arn` | AWS::Logs::LogGroup | A data identifier must be a managed data-identifier ARN | none |
|
|
875
|
+
| `pf-logs-data-protection-identifiers-match` | AWS::Logs::LogGroup | Both data protection statements must list the same data identifiers | none |
|
|
876
|
+
| `pf-logs-data-protection-mask-config-empty` | AWS::Logs::LogGroup | Deidentify MaskConfig takes no fields | none |
|
|
877
|
+
| `pf-logs-data-protection-policy-statements` | AWS::Logs::LogGroup | A data protection policy needs exactly two statements | none |
|
|
878
|
+
| `pf-logs-data-protection-policy-version` | AWS::Logs::LogGroup | A data protection policy version must be 2021-06-01 | none |
|
|
879
|
+
| `pf-logs-delivery-destination-output-format-enum` | AWS::Logs::DeliveryDestination | OutputFormat must be json, plain, w3c, raw or parquet | none |
|
|
880
|
+
| `pf-logs-delivery-destination-output-format-target` | AWS::Logs::DeliveryDestination | A CloudWatch Logs delivery destination cannot use parquet | none |
|
|
881
|
+
| `pf-logs-delivery-destination-region` | AWS::Logs::DeliveryDestination | A delivery destination must be in the stack's own region | none |
|
|
882
|
+
| `pf-logs-destination-policy-json` | AWS::Logs::Destination | DestinationPolicy must be an IAM policy document | none |
|
|
883
|
+
| `pf-logs-field-index-fields-max` | AWS::Logs::LogGroup | A field index policy indexes at most 20 fields | none |
|
|
884
|
+
| `pf-logs-field-selection-criteria-syntax` | AWS::Logs::MetricFilter | FieldSelectionCriteria must reference an @aws system field | none |
|
|
885
|
+
| `pf-logs-filter-name-charset` | AWS::Logs::MetricFilter | A filter name cannot contain a colon or an asterisk | none |
|
|
824
886
|
| `pf-logs-filter-pattern-bracket` | AWS::Logs::MetricFilter<br>AWS::Logs::SubscriptionFilter | A filter pattern starting with '[' must end with ']' | none |
|
|
887
|
+
| `pf-logs-infrequent-access-anomaly-detector` | AWS::Logs::LogGroup<br>AWS::Logs::LogAnomalyDetector | A log anomaly detector needs Standard-class log groups | none |
|
|
888
|
+
| `pf-logs-infrequent-access-metric-filter` | AWS::Logs::LogGroup<br>AWS::Logs::MetricFilter | A metric filter needs a Standard-class log group | none |
|
|
889
|
+
| `pf-logs-infrequent-access-subscription-filter` | AWS::Logs::LogGroup<br>AWS::Logs::SubscriptionFilter | A subscription filter needs a Standard-class log group | none |
|
|
890
|
+
| `pf-logs-infrequent-access-transformer` | AWS::Logs::LogGroup<br>AWS::Logs::Transformer | A transformer needs a Standard-class log group | none |
|
|
891
|
+
| `pf-logs-metric-dimension-selector` | AWS::Logs::MetricFilter | A metric filter dimension value must be a field selector | none |
|
|
825
892
|
| `pf-logs-metric-dimensions-default-exclusive` | AWS::Logs::MetricFilter | Dimensions and DefaultValue are mutually exclusive | none |
|
|
893
|
+
| `pf-logs-metric-namespace-reserved` | AWS::Logs::MetricFilter | A metric filter cannot publish into the AWS/ namespace | none |
|
|
894
|
+
| `pf-logs-query-definition-log-groups-max` | AWS::Logs::QueryDefinition | A saved query names at most 50 log groups | none |
|
|
895
|
+
| `pf-logs-resource-policy-json` | AWS::Logs::ResourcePolicy | PolicyDocument must be an IAM policy document | none |
|
|
896
|
+
| `pf-logs-subscription-destination-vendor` | AWS::Logs::SubscriptionFilter | A subscription destination must be Lambda, Kinesis, Firehose or a Logs destination | none |
|
|
897
|
+
| `pf-logs-subscription-firehose-role` | AWS::Logs::SubscriptionFilter | A Firehose destination needs RoleArn | none |
|
|
826
898
|
| `pf-logs-subscription-kinesis-role` | AWS::Logs::SubscriptionFilter | A Kinesis destination needs RoleArn | none |
|
|
899
|
+
| `pf-logs-subscription-lambda-no-role` | AWS::Logs::SubscriptionFilter | A Lambda destination must not carry RoleArn | none |
|
|
900
|
+
| `pf-logs-transformer-grok-pattern` | AWS::Logs::Transformer | A grok match may only use supported pattern names | none |
|
|
901
|
+
| `pf-logs-transformer-parser-first` | AWS::Logs::Transformer | A transformer config must begin with a parser | none |
|
|
827
902
|
| `pf-memorydb-data-tiering-node-type` | AWS::MemoryDB::Cluster | DataTiering only works on r6gd node types | none |
|
|
828
903
|
| `pf-memorydb-engine` | AWS::MemoryDB::Cluster | MemoryDB runs Valkey or Redis, not Memcached | none |
|
|
829
904
|
| `pf-memorydb-kms-key-region` | AWS::MemoryDB::Cluster | KmsKeyId must name a key in the deploy region | none |
|
package/lib/index.js
CHANGED
|
@@ -17,7 +17,7 @@ const rules_generated_1 = require("./rules.generated");
|
|
|
17
17
|
* Preflight.apply(app);
|
|
18
18
|
*/
|
|
19
19
|
class Preflight {
|
|
20
|
-
static [JSII_RTTI_SYMBOL_1] = { fqn: "cdk-preflight.Preflight", version: "0.0.
|
|
20
|
+
static [JSII_RTTI_SYMBOL_1] = { fqn: "cdk-preflight.Preflight", version: "0.0.77" };
|
|
21
21
|
/**
|
|
22
22
|
* Register the cdk-preflight rules on an App or Stage.
|
|
23
23
|
*/
|