<NME> batch.py
<BEF> ADDFILE
<MSG> Auto-generate Batch

<DFF> @@ -0,0 +1,62 @@
+# Copyright (c) 2012-2022, Mark Peek <mark@peek.org>
+# All rights reserved.
+#
+# See LICENSE file for full license.
+
+from . import exactly_one
+
+
+def validate_launch_template_specification(self):
+    """
+    Class: LaunchTemplateSpecification
+    """
+    template_ids = ["LaunchTemplateId", "LaunchTemplateName"]
+    exactly_one(self.__class__.__name__, self.properties, template_ids)
+
+
+def validate_allocation_strategy(allocation_strategy):
+    """Validate allocation strategy
+    :param allocation_strategy: Allocation strategy for ComputeResource
+    :return: The provided value if valid
+    Property: ComputeResources.AllocationStrategy
+    """
+
+    valid_strategies = [
+        "BEST_FIT",
+        "BEST_FIT_PROGRESSIVE",
+        "SPOT_CAPACITY_OPTIMIZED",
+    ]
+
+    if allocation_strategy not in valid_strategies:
+        raise ValueError("{} is not a valid strategy".format(allocation_strategy))
+    return allocation_strategy
+
+
+def validate_environment_state(environment_state):
+    """Validate response type
+    :param environment_state: State of the environment
+    :return: The provided value if valid
+    Property: ComputeEnvironment.State
+    """
+
+    valid_states = ["ENABLED", "DISABLED"]
+
+    if environment_state not in valid_states:
+        raise ValueError(
+            "{} is not a valid environment state".format(environment_state)
+        )
+    return environment_state
+
+
+def validate_queue_state(queue_state):
+    """Validate response type
+    :param queue_state: State of the queue
+    :return: The provided value if valid
+    Property: JobQueue.State
+    """
+
+    valid_states = ["ENABLED", "DISABLED"]
+
+    if queue_state not in valid_states:
+        raise ValueError("{} is not a valid queue state".format(queue_state))
+    return queue_state

{'commit': 'diff --git a/troposphere/batch.py b/troposphere/batch.py\nindex ebf3906..5d8427c 100644\n--- a/troposphere/batch.py\n+++ b/troposphere/batch.py\n@@ -1,51 +1,64 @@\n-from . import AWSObject, AWSProperty, Tags\n-from .validators import boolean, double, exactly_one, integer, positive_integer\n+# Copyright (c) 2012-2022, Mark Peek <mark@peek.org>\n+# All rights reserved.\n+#\n+# See LICENSE file for full license.\n+#\n+# *** Do not modify - this file is autogenerated ***\n+\n+\n+from . import AWSObject, AWSProperty, PropsDictType\n+from .validators import boolean, double, integer\n+from .validators.batch import (\n+    validate_allocation_strategy,\n+    validate_environment_state,\n+    validate_launch_template_specification,\n+    validate_queue_state,\n+)\n \n \n class Ec2ConfigurationObject(AWSProperty):\n-    props = {\n+    """\n+    `Ec2ConfigurationObject <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-batch-computeenvironment-ec2configurationobject.html>`__\n+    """\n+\n+    props: PropsDictType = {\n         "ImageIdOverride": (str, False),\n         "ImageType": (str, True),\n     }\n \n \n class LaunchTemplateSpecification(AWSProperty):\n-    props = {\n+    """\n+    `LaunchTemplateSpecification <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-batch-computeenvironment-launchtemplatespecification.html>`__\n+    """\n+\n+    props: PropsDictType = {\n         "LaunchTemplateId": (str, False),\n         "LaunchTemplateName": (str, False),\n         "Version": (str, False),\n     }\n \n     def validate(self):\n-        template_ids = ["LaunchTemplateId", "LaunchTemplateName"]\n-        exactly_one(self.__class__.__name__, self.properties, template_ids)\n-\n-\n-def validate_allocation_strategy(allocation_strategy):\n-    """Validate allocation strategy\n-    :param allocation_strategy: Allocation strategy for ComputeResource\n-    :return: The provided value if valid\n-    """\n-    valid_strategies = ["BEST_FIT", "BEST_FIT_PROGRESSIVE", "SPOT_CAPACITY_OPTIMIZED"]\n-    if allocation_strategy not in valid_strategies:\n-        raise ValueError("{} is not a valid strategy".format(allocation_strategy))\n-    return allocation_strategy\n+        validate_launch_template_specification(self)\n \n \n class ComputeResources(AWSProperty):\n+    """\n+    `ComputeResources <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-batch-computeenvironment-computeresources.html>`__\n+    """\n \n-    props = {\n+    props: PropsDictType = {\n         "AllocationStrategy": (validate_allocation_strategy, False),\n-        "BidPercentage": (positive_integer, False),\n-        "DesiredvCpus": (positive_integer, False),\n+        "BidPercentage": (integer, False),\n+        "DesiredvCpus": (integer, False),\n         "Ec2Configuration": ([Ec2ConfigurationObject], False),\n         "Ec2KeyPair": (str, False),\n         "ImageId": (str, False),\n         "InstanceRole": (str, False),\n         "InstanceTypes": ([str], False),\n         "LaunchTemplate": (LaunchTemplateSpecification, False),\n-        "MaxvCpus": (positive_integer, True),\n-        "MinvCpus": (positive_integer, False),\n+        "MaxvCpus": (integer, True),\n+        "MinvCpus": (integer, False),\n         "PlacementGroup": (str, False),\n         "SecurityGroupIds": ([str], False),\n         "SpotIamFleetRole": (str, False),\n@@ -55,8 +68,51 @@ class ComputeResources(AWSProperty):\n     }\n \n \n+class ComputeEnvironment(AWSObject):\n+    """\n+    `ComputeEnvironment <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-batch-computeenvironment.html>`__\n+    """\n+\n+    resource_type = "AWS::Batch::ComputeEnvironment"\n+\n+    props: PropsDictType = {\n+        "ComputeEnvironmentName": (str, False),\n+        "ComputeResources": (ComputeResources, False),\n+        "ServiceRole": (str, False),\n+        "State": (validate_environment_state, False),\n+        "Tags": (dict, False),\n+        "Type": (str, True),\n+        "UnmanagedvCpus": (integer, False),\n+    }\n+\n+\n+class Environment(AWSProperty):\n+    """\n+    `Environment <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-batch-jobdefinition-environment.html>`__\n+    """\n+\n+    props: PropsDictType = {\n+        "Name": (str, False),\n+        "Value": (str, False),\n+    }\n+\n+\n+class FargatePlatformConfiguration(AWSProperty):\n+    """\n+    `FargatePlatformConfiguration <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-batch-jobdefinition-containerproperties-fargateplatformconfiguration.html>`__\n+    """\n+\n+    props: PropsDictType = {\n+        "PlatformVersion": (str, False),\n+    }\n+\n+\n class Device(AWSProperty):\n-    props = {\n+    """\n+    `Device <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-batch-jobdefinition-device.html>`__\n+    """\n+\n+    props: PropsDictType = {\n         "ContainerPath": (str, False),\n         "HostPath": (str, False),\n         "Permissions": ([str], False),\n@@ -64,7 +120,11 @@ class Device(AWSProperty):\n \n \n class Tmpfs(AWSProperty):\n-    props = {\n+    """\n+    `Tmpfs <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-batch-jobdefinition-tmpfs.html>`__\n+    """\n+\n+    props: PropsDictType = {\n         "ContainerPath": (str, True),\n         "MountOptions": ([str], False),\n         "Size": (integer, True),\n@@ -72,7 +132,11 @@ class Tmpfs(AWSProperty):\n \n \n class LinuxParameters(AWSProperty):\n-    props = {\n+    """\n+    `LinuxParameters <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-batch-jobdefinition-containerproperties-linuxparameters.html>`__\n+    """\n+\n+    props: PropsDictType = {\n         "Devices": ([Device], False),\n         "InitProcessEnabled": (boolean, False),\n         "MaxSwap": (integer, False),\n@@ -83,14 +147,22 @@ class LinuxParameters(AWSProperty):\n \n \n class Secret(AWSProperty):\n-    props = {\n+    """\n+    `Secret <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-batch-jobdefinition-secret.html>`__\n+    """\n+\n+    props: PropsDictType = {\n         "Name": (str, True),\n         "ValueFrom": (str, True),\n     }\n \n \n class LogConfiguration(AWSProperty):\n-    props = {\n+    """\n+    `LogConfiguration <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-batch-jobdefinition-containerproperties-logconfiguration.html>`__\n+    """\n+\n+    props: PropsDictType = {\n         "LogDriver": (str, True),\n         "Options": (dict, False),\n         "SecretOptions": ([Secret], False),\n@@ -98,30 +170,67 @@ class LogConfiguration(AWSProperty):\n \n \n class MountPoints(AWSProperty):\n+    """\n+    `MountPoints <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-batch-jobdefinition-mountpoints.html>`__\n+    """\n \n-    props = {\n-        "ReadOnly": (bool, False),\n-        "SourceVolume": (str, False),\n+    props: PropsDictType = {\n         "ContainerPath": (str, False),\n+        "ReadOnly": (boolean, False),\n+        "SourceVolume": (str, False),\n     }\n \n \n class NetworkConfiguration(AWSProperty):\n+    """\n+    `NetworkConfiguration <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-batch-jobdefinition-containerproperties-networkconfiguration.html>`__\n+    """\n \n-    props = {\n+    props: PropsDictType = {\n         "AssignPublicIp": (str, False),\n     }\n \n \n+class ResourceRequirement(AWSProperty):\n+    """\n+    `ResourceRequirement <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-batch-jobdefinition-resourcerequirement.html>`__\n+    """\n+\n+    props: PropsDictType = {\n+        "Type": (str, False),\n+        "Value": (str, False),\n+    }\n+\n+\n+class Ulimit(AWSProperty):\n+    """\n+    `Ulimit <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-batch-jobdefinition-ulimit.html>`__\n+    """\n+\n+    props: PropsDictType = {\n+        "HardLimit": (integer, True),\n+        "Name": (str, True),\n+        "SoftLimit": (integer, True),\n+    }\n+\n+\n class AuthorizationConfig(AWSProperty):\n-    props = {\n+    """\n+    `AuthorizationConfig <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-batch-jobdefinition-authorizationconfig.html>`__\n+    """\n+\n+    props: PropsDictType = {\n         "AccessPointId": (str, False),\n         "Iam": (str, False),\n     }\n \n \n class EfsVolumeConfiguration(AWSProperty):\n-    props = {\n+    """\n+    `EfsVolumeConfiguration <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-batch-jobdefinition-efsvolumeconfiguration.html>`__\n+    """\n+\n+    props: PropsDictType = {\n         "AuthorizationConfig": (AuthorizationConfig, False),\n         "FileSystemId": (str, True),\n         "RootDirectory": (str, False),\n@@ -131,52 +240,43 @@ class EfsVolumeConfiguration(AWSProperty):\n \n \n class VolumesHost(AWSProperty):\n+    """\n+    `VolumesHost <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-batch-jobdefinition-volumeshost.html>`__\n+    """\n \n-    props = {"SourcePath": (str, False)}\n+    props: PropsDictType = {\n+        "SourcePath": (str, False),\n+    }\n \n \n class Volumes(AWSProperty):\n+    """\n+    `Volumes <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-batch-jobdefinition-volumes.html>`__\n+    """\n \n-    props = {\n+    props: PropsDictType = {\n         "EfsVolumeConfiguration": (EfsVolumeConfiguration, False),\n         "Host": (VolumesHost, False),\n         "Name": (str, False),\n     }\n \n \n-class Environment(AWSProperty):\n-\n-    props = {"Value": (str, False), "Name": (str, False)}\n-\n-\n-class ResourceRequirement(AWSProperty):\n-    props = {\n-        "Type": (str, False),\n-        "Value": (str, False),\n-    }\n-\n-\n-class Ulimit(AWSProperty):\n-\n-    props = {\n-        "SoftLimit": (positive_integer, True),\n-        "HardLimit": (positive_integer, True),\n-        "Name": (str, True),\n-    }\n-\n-\n class ContainerProperties(AWSProperty):\n+    """\n+    `ContainerProperties <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-batch-jobdefinition-containerproperties.html>`__\n+    """\n \n-    props = {\n+    props: PropsDictType = {\n         "Command": ([str], False),\n         "Environment": ([Environment], False),\n         "ExecutionRoleArn": (str, False),\n+        "FargatePlatformConfiguration": (FargatePlatformConfiguration, False),\n         "Image": (str, True),\n         "InstanceType": (str, False),\n         "JobRoleArn": (str, False),\n         "LinuxParameters": (LinuxParameters, False),\n         "LogConfiguration": (LogConfiguration, False),\n-        "Memory": (positive_integer, False),\n+        "Memory": (integer, False),\n         "MountPoints": ([MountPoints], False),\n         "NetworkConfiguration": (NetworkConfiguration, False),\n         "Privileged": (boolean, False),\n@@ -185,20 +285,28 @@ class ContainerProperties(AWSProperty):\n         "Secrets": ([Secret], False),\n         "Ulimits": ([Ulimit], False),\n         "User": (str, False),\n-        "Vcpus": (positive_integer, False),\n+        "Vcpus": (integer, False),\n         "Volumes": ([Volumes], False),\n     }\n \n \n class NodeRangeProperty(AWSProperty):\n-    props = {\n+    """\n+    `NodeRangeProperty <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-batch-jobdefinition-noderangeproperty.html>`__\n+    """\n+\n+    props: PropsDictType = {\n         "Container": (ContainerProperties, False),\n         "TargetNodes": (str, True),\n     }\n \n \n class NodeProperties(AWSProperty):\n-    props = {\n+    """\n+    `NodeProperties <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-batch-jobdefinition-nodeproperties.html>`__\n+    """\n+\n+    props: PropsDictType = {\n         "MainNode": (integer, True),\n         "NodeRangeProperties": ([NodeRangeProperty], True),\n         "NumNodes": (integer, True),\n@@ -206,7 +314,11 @@ class NodeProperties(AWSProperty):\n \n \n class EvaluateOnExit(AWSProperty):\n-    props = {\n+    """\n+    `EvaluateOnExit <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-batch-jobdefinition-evaluateonexit.html>`__\n+    """\n+\n+    props: PropsDictType = {\n         "Action": (str, True),\n         "OnExitCode": (str, False),\n         "OnReason": (str, False),\n@@ -215,23 +327,34 @@ class EvaluateOnExit(AWSProperty):\n \n \n class RetryStrategy(AWSProperty):\n+    """\n+    `RetryStrategy <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-batch-jobdefinition-retrystrategy.html>`__\n+    """\n \n-    props = {\n-        "Attempts": (positive_integer, False),\n+    props: PropsDictType = {\n+        "Attempts": (integer, False),\n         "EvaluateOnExit": ([EvaluateOnExit], False),\n     }\n \n \n class Timeout(AWSProperty):\n-    props = {\n+    """\n+    `Timeout <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-batch-jobdefinition-timeout.html>`__\n+    """\n+\n+    props: PropsDictType = {\n         "AttemptDurationSeconds": (integer, False),\n     }\n \n \n class JobDefinition(AWSObject):\n+    """\n+    `JobDefinition <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-batch-jobdefinition.html>`__\n+    """\n+\n     resource_type = "AWS::Batch::JobDefinition"\n \n-    props = {\n+    props: PropsDictType = {\n         "ContainerProperties": (ContainerProperties, False),\n         "JobDefinitionName": (str, False),\n         "NodeProperties": (NodeProperties, False),\n@@ -246,56 +369,28 @@ class JobDefinition(AWSObject):\n     }\n \n \n-def validate_environment_state(environment_state):\n-    """Validate response type\n-    :param environment_state: State of the environment\n-    :return: The provided value if valid\n+class ComputeEnvironmentOrder(AWSProperty):\n+    """\n+    `ComputeEnvironmentOrder <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-batch-jobqueue-computeenvironmentorder.html>`__\n     """\n-    valid_states = ["ENABLED", "DISABLED"]\n-    if environment_state not in valid_states:\n-        raise ValueError(\n-            "{} is not a valid environment state".format(environment_state)\n-        )\n-    return environment_state\n-\n-\n-class ComputeEnvironment(AWSObject):\n-    resource_type = "AWS::Batch::ComputeEnvironment"\n \n-    props = {\n-        "ComputeEnvironmentName": (str, False),\n-        "ComputeResources": (ComputeResources, True),\n-        "ServiceRole": (str, False),\n-        "State": (validate_environment_state, False),\n-        "Tags": (dict, False),\n-        "Type": (str, True),\n-        "UnmanagedvCpus": (integer, False),\n+    props: PropsDictType = {\n+        "ComputeEnvironment": (str, True),\n+        "Order": (integer, True),\n     }\n \n \n-class ComputeEnvironmentOrder(AWSProperty):\n-\n-    props = {"ComputeEnvironment": (str, True), "Order": (positive_integer, True)}\n-\n-\n-def validate_queue_state(queue_state):\n-    """Validate response type\n-    :param queue_state: State of the queue\n-    :return: The provided value if valid\n+class JobQueue(AWSObject):\n+    """\n+    `JobQueue <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-batch-jobqueue.html>`__\n     """\n-    valid_states = ["ENABLED", "DISABLED"]\n-    if queue_state not in valid_states:\n-        raise ValueError("{} is not a valid queue state".format(queue_state))\n-    return queue_state\n-\n \n-class JobQueue(AWSObject):\n     resource_type = "AWS::Batch::JobQueue"\n \n-    props = {\n+    props: PropsDictType = {\n         "ComputeEnvironmentOrder": ([ComputeEnvironmentOrder], True),\n         "JobQueueName": (str, False),\n-        "Priority": (positive_integer, True),\n+        "Priority": (integer, True),\n         "SchedulingPolicyArn": (str, False),\n         "State": (validate_queue_state, False),\n         "Tags": (dict, False),\n@@ -303,14 +398,22 @@ class JobQueue(AWSObject):\n \n \n class ShareAttributes(AWSProperty):\n-    props = {\n+    """\n+    `ShareAttributes <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-batch-schedulingpolicy-shareattributes.html>`__\n+    """\n+\n+    props: PropsDictType = {\n         "ShareIdentifier": (str, False),\n         "WeightFactor": (double, False),\n     }\n \n \n class FairsharePolicy(AWSProperty):\n-    props = {\n+    """\n+    `FairsharePolicy <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-batch-schedulingpolicy-fairsharepolicy.html>`__\n+    """\n+\n+    props: PropsDictType = {\n         "ComputeReservation": (double, False),\n         "ShareDecaySeconds": (double, False),\n         "ShareDistribution": ([ShareAttributes], False),\n@@ -318,10 +421,14 @@ class FairsharePolicy(AWSProperty):\n \n \n class SchedulingPolicy(AWSObject):\n+    """\n+    `SchedulingPolicy <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-batch-schedulingpolicy.html>`__\n+    """\n+\n     resource_type = "AWS::Batch::SchedulingPolicy"\n \n-    props = {\n+    props: PropsDictType = {\n         "FairsharePolicy": (FairsharePolicy, False),\n         "Name": (str, False),\n-        "Tags": (Tags, False),\n+        "Tags": (dict, False),\n     }\ndiff --git a/troposphere/validators/batch.py b/troposphere/validators/batch.py\nnew file mode 100644\nindex 0000000..887c065\n--- /dev/null\n+++ b/troposphere/validators/batch.py\n@@ -0,0 +1,62 @@\n+# Copyright (c) 2012-2022, Mark Peek <mark@peek.org>\n+# All rights reserved.\n+#\n+# See LICENSE file for full license.\n+\n+from . import exactly_one\n+\n+\n+def validate_launch_template_specification(self):\n+    """\n+    Class: LaunchTemplateSpecification\n+    """\n+    template_ids = ["LaunchTemplateId", "LaunchTemplateName"]\n+    exactly_one(self.__class__.__name__, self.properties, template_ids)\n+\n+\n+def validate_allocation_strategy(allocation_strategy):\n+    """Validate allocation strategy\n+    :param allocation_strategy: Allocation strategy for ComputeResource\n+    :return: The provided value if valid\n+    Property: ComputeResources.AllocationStrategy\n+    """\n+\n+    valid_strategies = [\n+        "BEST_FIT",\n+        "BEST_FIT_PROGRESSIVE",\n+        "SPOT_CAPACITY_OPTIMIZED",\n+    ]\n+\n+    if allocation_strategy not in valid_strategies:\n+        raise ValueError("{} is not a valid strategy".format(allocation_strategy))\n+    return allocation_strategy\n+\n+\n+def validate_environment_state(environment_state):\n+    """Validate response type\n+    :param environment_state: State of the environment\n+    :return: The provided value if valid\n+    Property: ComputeEnvironment.State\n+    """\n+\n+    valid_states = ["ENABLED", "DISABLED"]\n+\n+    if environment_state not in valid_states:\n+        raise ValueError(\n+            "{} is not a valid environment state".format(environment_state)\n+        )\n+    return environment_state\n+\n+\n+def validate_queue_state(queue_state):\n+    """Validate response type\n+    :param queue_state: State of the queue\n+    :return: The provided value if valid\n+    Property: JobQueue.State\n+    """\n+\n+    valid_states = ["ENABLED", "DISABLED"]\n+\n+    if queue_state not in valid_states:\n+        raise ValueError("{} is not a valid queue state".format(queue_state))\n+    return queue_state\n', 'commit_subject': 'Auto-generate Batch', 'repo_name': 'cloudtools/troposphere', 'committer': {'name': 'Mark Peek', 'email': 'f1b5a91d4d6ad523f2610114591c007e75d15084@peek.org', 'time_sec': '1643329510', 'tz_offset': '-480', 'date': {'seconds': '1643329510'}}, 'commit_tree': 'ad3a8f97936c95246a7e98eb3b340470c1660c46', 'commit_message': 'Auto-generate Batch\n', 'language_name': 'Shell', 'license': 'bsd-2-clause', 'hunks': '@@ -0,0 +1,62 @@\n+# Copyright (c) 2012-2022, Mark Peek <mark@peek.org>\n+# All rights reserved.\n+#\n+# See LICENSE file for full license.\n+\n+from . import exactly_one\n+\n+\n+def validate_launch_template_specification(self):\n+    """\n+    Class: LaunchTemplateSpecification\n+    """\n+    template_ids = ["LaunchTemplateId", "LaunchTemplateName"]\n+    exactly_one(self.__class__.__name__, self.properties, template_ids)\n+\n+\n+def validate_allocation_strategy(allocation_strategy):\n+    """Validate allocation strategy\n+    :param allocation_strategy: Allocation strategy for ComputeResource\n+    :return: The provided value if valid\n+    Property: ComputeResources.AllocationStrategy\n+    """\n+\n+    valid_strategies = [\n+        "BEST_FIT",\n+        "BEST_FIT_PROGRESSIVE",\n+        "SPOT_CAPACITY_OPTIMIZED",\n+    ]\n+\n+    if allocation_strategy not in valid_strategies:\n+        raise ValueError("{} is not a valid strategy".format(allocation_strategy))\n+    return allocation_strategy\n+\n+\n+def validate_environment_state(environment_state):\n+    """Validate response type\n+    :param environment_state: State of the environment\n+    :return: The provided value if valid\n+    Property: ComputeEnvironment.State\n+    """\n+\n+    valid_states = ["ENABLED", "DISABLED"]\n+\n+    if environment_state not in valid_states:\n+        raise ValueError(\n+            "{} is not a valid environment state".format(environment_state)\n+        )\n+    return environment_state\n+\n+\n+def validate_queue_state(queue_state):\n+    """Validate response type\n+    :param queue_state: State of the queue\n+    :return: The provided value if valid\n+    Property: JobQueue.State\n+    """\n+\n+    valid_states = ["ENABLED", "DISABLED"]\n+\n+    if queue_state not in valid_states:\n+        raise ValueError("{} is not a valid queue state".format(queue_state))\n+    return queue_state\n', 'addition_count': 62, 'deletion_count': 0, 'src_file': '/dev/null', 'tgt_file': 'b/troposphere/validators/batch.py', 'file_extension': '.py', 'before_file': 'ADDFILE', 'message': 'Auto-generate Batch\n', 'author_name': 'Mark Peek', 'lang': 'py'}