From 863e5017e246761b0a575b92d38869b34e55b963 Mon Sep 17 00:00:00 2001 From: Kevin DeJong Date: Sun, 20 Oct 2024 09:23:01 -0700 Subject: [PATCH] Add boto exceptions for AppSync patterns --- scripts/boto/update_schemas_from_boto.py | 2 +- .../all/aws_appsync_functionconfiguration/boto.json | 10 ---------- .../extensions/all/aws_appsync_resolver/boto.json | 10 ---------- .../boto.json | 5 ----- .../extensions/all/aws_redshift_integration/boto.json | 7 +++++++ .../providers/ca_west_1/aws-redshift-integration.json | 1 + .../eu_central_1/aws-autoscaling-autoscalinggroup.json | 4 +++- .../eu_central_1/aws-redshift-integration.json | 1 + .../eu_central_2/aws-redshift-integration.json | 1 + .../us_east_1/aws-appsync-functionconfiguration.json | 2 -- .../providers/us_east_1/aws-appsync-resolver.json | 2 -- 11 files changed, 14 insertions(+), 31 deletions(-) create mode 100644 src/cfnlint/data/schemas/patches/extensions/all/aws_redshift_integration/boto.json diff --git a/scripts/boto/update_schemas_from_boto.py b/scripts/boto/update_schemas_from_boto.py index 978c5bbe00..a2a16eea50 100755 --- a/scripts/boto/update_schemas_from_boto.py +++ b/scripts/boto/update_schemas_from_boto.py @@ -70,7 +70,7 @@ def build_resource_type_patches( if not value: continue if field == "pattern": - if value == ".*": + if value in [".*", "^.*$"]: continue try: re.compile(value) diff --git a/src/cfnlint/data/schemas/patches/extensions/all/aws_appsync_functionconfiguration/boto.json b/src/cfnlint/data/schemas/patches/extensions/all/aws_appsync_functionconfiguration/boto.json index 3cc817afef..9bc1716b6a 100644 --- a/src/cfnlint/data/schemas/patches/extensions/all/aws_appsync_functionconfiguration/boto.json +++ b/src/cfnlint/data/schemas/patches/extensions/all/aws_appsync_functionconfiguration/boto.json @@ -8,15 +8,5 @@ "op": "add", "path": "/properties/DataSourceName/pattern", "value": "[_A-Za-z][_0-9A-Za-z]*" - }, - { - "op": "add", - "path": "/properties/RequestMappingTemplate/pattern", - "value": "^.*$" - }, - { - "op": "add", - "path": "/properties/ResponseMappingTemplate/pattern", - "value": "^.*$" } ] diff --git a/src/cfnlint/data/schemas/patches/extensions/all/aws_appsync_resolver/boto.json b/src/cfnlint/data/schemas/patches/extensions/all/aws_appsync_resolver/boto.json index 5394860acb..aa35fa3048 100644 --- a/src/cfnlint/data/schemas/patches/extensions/all/aws_appsync_resolver/boto.json +++ b/src/cfnlint/data/schemas/patches/extensions/all/aws_appsync_resolver/boto.json @@ -14,16 +14,6 @@ "path": "/properties/DataSourceName/pattern", "value": "[_A-Za-z][_0-9A-Za-z]*" }, - { - "op": "add", - "path": "/properties/RequestMappingTemplate/pattern", - "value": "^.*$" - }, - { - "op": "add", - "path": "/properties/ResponseMappingTemplate/pattern", - "value": "^.*$" - }, { "op": "add", "path": "/properties/Kind/enum", diff --git a/src/cfnlint/data/schemas/patches/extensions/all/aws_codestarconnections_syncconfiguration/boto.json b/src/cfnlint/data/schemas/patches/extensions/all/aws_codestarconnections_syncconfiguration/boto.json index 3a9a286a82..8b5b0d33b9 100644 --- a/src/cfnlint/data/schemas/patches/extensions/all/aws_codestarconnections_syncconfiguration/boto.json +++ b/src/cfnlint/data/schemas/patches/extensions/all/aws_codestarconnections_syncconfiguration/boto.json @@ -1,9 +1,4 @@ [ - { - "op": "add", - "path": "/properties/Branch/pattern", - "value": "^.*$" - }, { "op": "add", "path": "/properties/RoleArn/pattern", diff --git a/src/cfnlint/data/schemas/patches/extensions/all/aws_redshift_integration/boto.json b/src/cfnlint/data/schemas/patches/extensions/all/aws_redshift_integration/boto.json new file mode 100644 index 0000000000..c722bc92c7 --- /dev/null +++ b/src/cfnlint/data/schemas/patches/extensions/all/aws_redshift_integration/boto.json @@ -0,0 +1,7 @@ +[ + { + "op": "add", + "path": "/properties/IntegrationName/pattern", + "value": "^[a-zA-Z][a-zA-Z0-9]*(-[a-zA-Z0-9]+)*$" + } +] diff --git a/src/cfnlint/data/schemas/providers/ca_west_1/aws-redshift-integration.json b/src/cfnlint/data/schemas/providers/ca_west_1/aws-redshift-integration.json index a3df6f7445..0aa07b1c20 100644 --- a/src/cfnlint/data/schemas/providers/ca_west_1/aws-redshift-integration.json +++ b/src/cfnlint/data/schemas/providers/ca_west_1/aws-redshift-integration.json @@ -63,6 +63,7 @@ "IntegrationName": { "maxLength": 64, "minLength": 1, + "pattern": "^[a-zA-Z][a-zA-Z0-9]*(-[a-zA-Z0-9]+)*$", "type": "string" }, "KMSKeyId": { diff --git a/src/cfnlint/data/schemas/providers/eu_central_1/aws-autoscaling-autoscalinggroup.json b/src/cfnlint/data/schemas/providers/eu_central_1/aws-autoscaling-autoscalinggroup.json index 2a0eaf3daf..82e9b574a6 100644 --- a/src/cfnlint/data/schemas/providers/eu_central_1/aws-autoscaling-autoscalinggroup.json +++ b/src/cfnlint/data/schemas/providers/eu_central_1/aws-autoscaling-autoscalinggroup.json @@ -516,8 +516,10 @@ }, "HealthCheckType": { "enum": [ + "EBS", "EC2", - "ELB" + "ELB", + "VPC_LATTICE" ], "type": "string" }, diff --git a/src/cfnlint/data/schemas/providers/eu_central_1/aws-redshift-integration.json b/src/cfnlint/data/schemas/providers/eu_central_1/aws-redshift-integration.json index a3df6f7445..0aa07b1c20 100644 --- a/src/cfnlint/data/schemas/providers/eu_central_1/aws-redshift-integration.json +++ b/src/cfnlint/data/schemas/providers/eu_central_1/aws-redshift-integration.json @@ -63,6 +63,7 @@ "IntegrationName": { "maxLength": 64, "minLength": 1, + "pattern": "^[a-zA-Z][a-zA-Z0-9]*(-[a-zA-Z0-9]+)*$", "type": "string" }, "KMSKeyId": { diff --git a/src/cfnlint/data/schemas/providers/eu_central_2/aws-redshift-integration.json b/src/cfnlint/data/schemas/providers/eu_central_2/aws-redshift-integration.json index a3df6f7445..0aa07b1c20 100644 --- a/src/cfnlint/data/schemas/providers/eu_central_2/aws-redshift-integration.json +++ b/src/cfnlint/data/schemas/providers/eu_central_2/aws-redshift-integration.json @@ -63,6 +63,7 @@ "IntegrationName": { "maxLength": 64, "minLength": 1, + "pattern": "^[a-zA-Z][a-zA-Z0-9]*(-[a-zA-Z0-9]+)*$", "type": "string" }, "KMSKeyId": { diff --git a/src/cfnlint/data/schemas/providers/us_east_1/aws-appsync-functionconfiguration.json b/src/cfnlint/data/schemas/providers/us_east_1/aws-appsync-functionconfiguration.json index 31766b0a77..514833c872 100644 --- a/src/cfnlint/data/schemas/providers/us_east_1/aws-appsync-functionconfiguration.json +++ b/src/cfnlint/data/schemas/providers/us_east_1/aws-appsync-functionconfiguration.json @@ -85,14 +85,12 @@ "type": "string" }, "RequestMappingTemplate": { - "pattern": "^.*$", "type": "string" }, "RequestMappingTemplateS3Location": { "type": "string" }, "ResponseMappingTemplate": { - "pattern": "^.*$", "type": "string" }, "ResponseMappingTemplateS3Location": { diff --git a/src/cfnlint/data/schemas/providers/us_east_1/aws-appsync-resolver.json b/src/cfnlint/data/schemas/providers/us_east_1/aws-appsync-resolver.json index 144958cfd2..e9f0a78165 100644 --- a/src/cfnlint/data/schemas/providers/us_east_1/aws-appsync-resolver.json +++ b/src/cfnlint/data/schemas/providers/us_east_1/aws-appsync-resolver.json @@ -129,7 +129,6 @@ "$ref": "#/definitions/PipelineConfig" }, "RequestMappingTemplate": { - "pattern": "^.*$", "type": "string" }, "RequestMappingTemplateS3Location": { @@ -139,7 +138,6 @@ "type": "string" }, "ResponseMappingTemplate": { - "pattern": "^.*$", "type": "string" }, "ResponseMappingTemplateS3Location": {