Repository: cloudtools/troposphere
Pull request #2272 (2024-10-02 13:16:49)

Updates from spec version 185.0.1
Autogenerated by maintenance action

If tests are stuck on https://github.com/peter-evans/create-pull-request/issues/48:
["Manually close pull requests and immediately reopen them. This will enable `on: pull_request` workflows to run and be added as checks."](https://github.com/peter-evans/create-pull-request/blob/master/docs/concepts-guidelines.md#triggering-further-workflow-runs)


Patch:
diff --git a/troposphere/__init__.py b/troposphere/__init__.py
index 73b48e01..53c274c1 100644
--- a/troposphere/__init__.py
+++ b/troposphere/__init__.py
@@ -256,7 +256,7 @@ class BaseAWSObject:
             # to deal with this that we'll come up with eventually
             #
             # Don't do this for Tags since we can validate the assigned type below
-            if isinstance(value, AWSHelperFn) and name != "Tags":
+            if isinstance(value, AWSHelperFn) and not isinstance(value, Tags):
                 return self.properties.__setitem__(name, value)
 
             # If it's a function, call it...
diff --git a/troposphere/cognito.py b/troposphere/cognito.py
index 1002c86e..39575cd6 100644
--- a/troposphere/cognito.py
+++ b/troposphere/cognito.py
@@ -463,6 +463,8 @@ class UserPool(AWSObject):
         "AutoVerifiedAttributes": ([str], False),
         "DeletionProtection": (str, False),
         "DeviceConfiguration": (DeviceConfiguration, False),
+        "EmailAuthenticationMessage": (str, False),
+        "EmailAuthenticationSubject": (str, False),
         "EmailConfiguration": (EmailConfiguration, False),
         "EmailVerificationMessage": (str, False),
         "EmailVerificationSubject": (str, False),
diff --git a/troposphere/ec2.py b/troposphere/ec2.py
index c7a9424f..b6af235a 100644
--- a/troposphere/ec2.py
+++ b/troposphere/ec2.py
@@ -2511,6 +2511,7 @@ class TransitGateway(AWSObject):
         "DnsSupport": (str, False),
         "MulticastSupport": (str, False),
         "PropagationDefaultRouteTableId": (str, False),
+        "SecurityGroupReferencingSupport": (str, False),
         "Tags": (validate_tags_or_list, False),
         "TransitGatewayCidrBlocks": ([str], False),
         "VpnEcmpSupport": (str, False),
@@ -2526,6 +2527,7 @@ class Options(AWSProperty):
         "ApplianceModeSupport": (str, False),
         "DnsSupport": (str, False),
         "Ipv6Support": (str, False),
+        "SecurityGroupReferencingSupport": (str, False),
     }
 
 
diff --git a/troposphere/eks.py b/troposphere/eks.py
index b22b4276..1a41c5ca 100644
--- a/troposphere/eks.py
+++ b/troposphere/eks.py
@@ -211,6 +211,16 @@ class UpgradePolicy(AWSProperty):
     }
 
 
+class ZonalShiftConfig(AWSProperty):
+    """
+    `ZonalShiftConfig <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-eks-cluster-zonalshiftconfig.html>`__
+    """
+
+    props: PropsDictType = {
+        "Enabled": (boolean, False),
+    }
+
+
 class Cluster(AWSObject):
     """
     `Cluster <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-eks-cluster.html>`__
@@ -231,6 +241,7 @@ class Cluster(AWSObject):
         "Tags": (Tags, False),
         "UpgradePolicy": (UpgradePolicy, False),
         "Version": (str, False),
+        "ZonalShiftConfig": (ZonalShiftConfig, False),
     }
 
 
diff --git a/troposphere/sagemaker.py b/troposphere/sagemaker.py
index ac6ee03e..ff332515 100644
--- a/troposphere/sagemaker.py
+++ b/troposphere/sagemaker.py
@@ -1308,6 +1308,7 @@ class ImageVersion(AWSObject):
         "ProgrammingLang": (str, False),
         "ReleaseNotes": (str, False),
         "VendorGuidance": (str, False),
+        "Version": (integer, False),
     }
 
 
diff --git a/troposphere/ses.py b/troposphere/ses.py
index fd284844..bfb5d3f8 100644
--- a/troposphere/ses.py
+++ b/troposphere/ses.py
@@ -590,7 +590,8 @@ class RuleStringToEvaluate(AWSProperty):
     """
 
     props: PropsDictType = {
-        "Attribute": (str, True),
+        "Attribute": (str, False),
+        "MimeHeaderAttribute": (str, False),
     }
 
 
diff --git a/troposphere/workspacesweb.py b/troposphere/workspacesweb.py
index ad0b161e..47c712db 100644
--- a/troposphere/workspacesweb.py
+++ b/troposphere/workspacesweb.py
@@ -37,6 +37,7 @@ class IdentityProvider(AWSObject):
         "IdentityProviderName": (str, True),
         "IdentityProviderType": (str, True),
         "PortalArn": (str, False),
+        "Tags": (Tags, False),
     }
 
 


Test patch:
diff --git a/tests/test_tags.py b/tests/test_tags.py
index b3cb4ebf..2ea6a65e 100644
--- a/tests/test_tags.py
+++ b/tests/test_tags.py
@@ -1,6 +1,6 @@
 import unittest
 
-from troposphere import If, Sub, Tag, Tags
+from troposphere import GetAtt, If, Sub, Tag, Tags
 from troposphere.autoscaling import Tags as ASTags
 
 
@@ -88,6 +88,18 @@ class TestTags(unittest.TestCase):
             Tags={"foo": "bar"},
         )
 
+        JobDefinition(
+            "myjobdef",
+            Type="container",
+            ContainerProperties=ContainerProperties(
+                Image="image",
+                Vcpus=2,
+                Memory=2000,
+                Command=["echo", "foobar"],
+            ),
+            Tags=GetAtt("resource", "tags"),
+        )
+
         with self.assertRaises(TypeError):
             JobDefinition(
                 "myjobdef",
@@ -114,6 +126,39 @@ class TestTags(unittest.TestCase):
                 Tags="string",
             )
 
+    def test_object_tags(self):
+        from troposphere.dynamodb import KeySchema, Table
+
+        Table(
+            "mytable",
+            KeySchema=[KeySchema(KeyType="HASH", AttributeName="id")],
+            BillingMode="PAY_PER_REQUEST",
+            Tags=Tags(Name="Example"),
+        )
+
+        Table(
+            "mytable",
+            KeySchema=[KeySchema(KeyType="HASH", AttributeName="id")],
+            BillingMode="PAY_PER_REQUEST",
+            Tags=GetAtt("resource", "tags"),
+        )
+
+        with self.assertRaises(TypeError):
+            Table(
+                "mytable",
+                KeySchema=[KeySchema(KeyType="HASH", AttributeName="id")],
+                BillingMode="PAY_PER_REQUEST",
+                Tags={"Name": "Example"},
+            )
+
+        with self.assertRaises(TypeError):
+            Table(
+                "mytable",
+                KeySchema=[KeySchema(KeyType="HASH", AttributeName="id")],
+                BillingMode="PAY_PER_REQUEST",
+                Tags="string",
+            )
+
 
 if __name__ == "__main__":
     unittest.main()