From 521b18cfabc994ff52eae46bc67f2336183eb3cc Mon Sep 17 00:00:00 2001 From: Wing Fung Lau <4760060+hawflau@users.noreply.github.com> Date: Wed, 6 Jan 2021 23:44:03 -0800 Subject: [PATCH 1/3] Update AWS::S3::Bucket properties --- samtranslator/model/s3.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/samtranslator/model/s3.py b/samtranslator/model/s3.py index 6c60c26c78..d4a4aef01a 100644 --- a/samtranslator/model/s3.py +++ b/samtranslator/model/s3.py @@ -12,11 +12,15 @@ class S3Bucket(Resource): "BucketEncryption": PropertyType(False, any_type()), "BucketName": PropertyType(False, is_str()), "CorsConfiguration": PropertyType(False, any_type()), + "IntelligentTieringConfigurations": PropertyType(False, any_type()), "InventoryConfigurations": PropertyType(False, any_type()), "LifecycleConfiguration": PropertyType(False, any_type()), "LoggingConfiguration": PropertyType(False, any_type()), "MetricsConfigurations": PropertyType(False, any_type()), "NotificationConfiguration": PropertyType(False, is_type(dict)), + "ObjectLockConfiguration": PropertyType(False, is_type(dict)), + "ObjectLockEnabled": PropertyType(False, is_type(dict)), + "OwnershipControls": PropertyType(False, is_type(dict)), "PublicAccessBlockConfiguration": PropertyType(False, is_type(dict)), "ReplicationConfiguration": PropertyType(False, any_type()), "Tags": PropertyType(False, is_type(list)), From dfcd6f86b2276d399a0f5517cd4aab3048b3164c Mon Sep 17 00:00:00 2001 From: Wing Fung Lau <4760060+hawflau@users.noreply.github.com> Date: Thu, 7 Jan 2021 10:09:45 -0800 Subject: [PATCH 2/3] Fix type checking validators for AWS::S3::Bucket --- samtranslator/model/s3.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/samtranslator/model/s3.py b/samtranslator/model/s3.py index d4a4aef01a..d0f9867653 100644 --- a/samtranslator/model/s3.py +++ b/samtranslator/model/s3.py @@ -8,18 +8,18 @@ class S3Bucket(Resource): property_types = { "AccessControl": PropertyType(False, any_type()), "AccelerateConfiguration": PropertyType(False, any_type()), - "AnalyticsConfigurations": PropertyType(False, any_type()), + "AnalyticsConfigurations": PropertyType(False, is_type(list)), "BucketEncryption": PropertyType(False, any_type()), "BucketName": PropertyType(False, is_str()), "CorsConfiguration": PropertyType(False, any_type()), - "IntelligentTieringConfigurations": PropertyType(False, any_type()), - "InventoryConfigurations": PropertyType(False, any_type()), + "IntelligentTieringConfigurations": PropertyType(False, is_type(list)), + "InventoryConfigurations": PropertyType(False, is_type(list)), "LifecycleConfiguration": PropertyType(False, any_type()), "LoggingConfiguration": PropertyType(False, any_type()), - "MetricsConfigurations": PropertyType(False, any_type()), + "MetricsConfigurations": PropertyType(False, is_type(list)), "NotificationConfiguration": PropertyType(False, is_type(dict)), "ObjectLockConfiguration": PropertyType(False, is_type(dict)), - "ObjectLockEnabled": PropertyType(False, is_type(dict)), + "ObjectLockEnabled": PropertyType(False, is_type(bool)), "OwnershipControls": PropertyType(False, is_type(dict)), "PublicAccessBlockConfiguration": PropertyType(False, is_type(dict)), "ReplicationConfiguration": PropertyType(False, any_type()), From 620e8d761aa63cffea1b6d976b6fd4963a2f157f Mon Sep 17 00:00:00 2001 From: Wing Fung Lau <4760060+hawflau@users.noreply.github.com> Date: Thu, 7 Jan 2021 12:20:33 -0800 Subject: [PATCH 3/3] Update to use any_type() in favor of supporing ref --- samtranslator/model/s3.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/samtranslator/model/s3.py b/samtranslator/model/s3.py index d0f9867653..57325e9004 100644 --- a/samtranslator/model/s3.py +++ b/samtranslator/model/s3.py @@ -8,19 +8,19 @@ class S3Bucket(Resource): property_types = { "AccessControl": PropertyType(False, any_type()), "AccelerateConfiguration": PropertyType(False, any_type()), - "AnalyticsConfigurations": PropertyType(False, is_type(list)), + "AnalyticsConfigurations": PropertyType(False, any_type()), "BucketEncryption": PropertyType(False, any_type()), "BucketName": PropertyType(False, is_str()), "CorsConfiguration": PropertyType(False, any_type()), - "IntelligentTieringConfigurations": PropertyType(False, is_type(list)), - "InventoryConfigurations": PropertyType(False, is_type(list)), + "IntelligentTieringConfigurations": PropertyType(False, any_type()), + "InventoryConfigurations": PropertyType(False, any_type()), "LifecycleConfiguration": PropertyType(False, any_type()), "LoggingConfiguration": PropertyType(False, any_type()), - "MetricsConfigurations": PropertyType(False, is_type(list)), + "MetricsConfigurations": PropertyType(False, any_type()), "NotificationConfiguration": PropertyType(False, is_type(dict)), - "ObjectLockConfiguration": PropertyType(False, is_type(dict)), - "ObjectLockEnabled": PropertyType(False, is_type(bool)), - "OwnershipControls": PropertyType(False, is_type(dict)), + "ObjectLockConfiguration": PropertyType(False, any_type()), + "ObjectLockEnabled": PropertyType(False, any_type()), + "OwnershipControls": PropertyType(False, any_type()), "PublicAccessBlockConfiguration": PropertyType(False, is_type(dict)), "ReplicationConfiguration": PropertyType(False, any_type()), "Tags": PropertyType(False, is_type(list)),