Skip to content

Commit

Permalink
Updates from spec version 152.0.0
Browse files Browse the repository at this point in the history
This change contains numerous patches to AWS::Batch to prevent backward
compatibility issues due to the property renames in 152.0.0. This will
be revisted at the next major version change.
  • Loading branch information
markpeek committed Dec 27, 2023
1 parent 97062fe commit f4c07c9
Show file tree
Hide file tree
Showing 12 changed files with 394 additions and 25 deletions.
98 changes: 98 additions & 0 deletions scripts/patches/batch.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
patches = [
# backward compatibility
{
"op": "move",
"from": "/PropertyTypes/AWS::Batch::JobDefinition.JobTimeout",
"path": "/PropertyTypes/AWS::Batch::JobDefinition.Timeout",
},
# backward compatibility
{
"op": "replace",
"path": "/ResourceTypes/AWS::Batch::JobDefinition/Properties/Timeout/Type",
"value": "Timeout",
},
# backward compatibility
{
"op": "move",
"from": "/PropertyTypes/AWS::Batch::JobDefinition.EksMetadata",
"path": "/PropertyTypes/AWS::Batch::JobDefinition.Metadata",
},
# backward compatibility
{
"op": "replace",
"path": "/PropertyTypes/AWS::Batch::JobDefinition.EksPodProperties/Properties/Metadata/Type",
"value": "Metadata",
},
# backward compatibility
{
"op": "move",
"from": "/PropertyTypes/AWS::Batch::JobDefinition.EksPodProperties",
"path": "/PropertyTypes/AWS::Batch::JobDefinition.PodProperties",
},
# backward compatibility
{
"op": "replace",
"path": "/PropertyTypes/AWS::Batch::JobDefinition.EksProperties/Properties/PodProperties/Type",
"value": "PodProperties",
},
# backward compatibility
{
"op": "move",
"from": "/PropertyTypes/AWS::Batch::JobDefinition.EFSAuthorizationConfig",
"path": "/PropertyTypes/AWS::Batch::JobDefinition.AuthorizationConfig",
},
# backward compatibility
{
"op": "replace",
"path": "/PropertyTypes/AWS::Batch::JobDefinition.EFSVolumeConfiguration/Properties/AuthorizationConfig/Type",
"value": "AuthorizationConfig",
},
# backward compatibility
{
"op": "move",
"from": "/PropertyTypes/AWS::Batch::JobDefinition.EFSVolumeConfiguration",
"path": "/PropertyTypes/AWS::Batch::JobDefinition.EfsVolumeConfiguration",
},
# backward compatibility
{
"op": "replace",
"path": "/PropertyTypes/AWS::Batch::JobDefinition.Volume/Properties/EfsVolumeConfiguration/Type",
"value": "EfsVolumeConfiguration",
},
# backward compatibility
{
"op": "move",
"from": "/PropertyTypes/AWS::Batch::JobDefinition.Host",
"path": "/PropertyTypes/AWS::Batch::JobDefinition.VolumesHost",
},
# backward compatibility
{
"op": "replace",
"path": "/PropertyTypes/AWS::Batch::JobDefinition.Volume/Properties/Host/Type",
"value": "VolumesHost",
},
# backward compatibility
{
"op": "move",
"from": "/PropertyTypes/AWS::Batch::JobDefinition.MountPoint",
"path": "/PropertyTypes/AWS::Batch::JobDefinition.MountPoints",
},
# backward compatibility
{
"op": "replace",
"path": "/PropertyTypes/AWS::Batch::JobDefinition.ContainerProperties/Properties/MountPoints/ItemType",
"value": "MountPoints",
},
# backward compatibility
{
"op": "move",
"from": "/PropertyTypes/AWS::Batch::JobDefinition.Volume",
"path": "/PropertyTypes/AWS::Batch::JobDefinition.Volumes",
},
# backward compatibility
{
"op": "replace",
"path": "/PropertyTypes/AWS::Batch::JobDefinition.ContainerProperties/Properties/Volumes/ItemType",
"value": "Volumes",
},
]
3 changes: 3 additions & 0 deletions troposphere/appsync.py
Original file line number Diff line number Diff line change
Expand Up @@ -366,12 +366,15 @@ class GraphQLApi(AWSObject):
),
"ApiType": (str, False),
"AuthenticationType": (str, True),
"IntrospectionConfig": (str, False),
"LambdaAuthorizerConfig": (LambdaAuthorizerConfig, False),
"LogConfig": (LogConfig, False),
"MergedApiExecutionRoleArn": (str, False),
"Name": (str, True),
"OpenIDConnectConfig": (OpenIDConnectConfig, False),
"OwnerContact": (str, False),
"QueryDepthLimit": (integer, False),
"ResolverCountLimit": (integer, False),
"Tags": (Tags, False),
"UserPoolConfig": (UserPoolConfig, False),
"Visibility": (str, False),
Expand Down
26 changes: 13 additions & 13 deletions troposphere/batch.py
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ class Environment(AWSProperty):

class EphemeralStorage(AWSProperty):
"""
`EphemeralStorage <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-batch-jobdefinition-containerproperties-ephemeralstorage.html>`__
`EphemeralStorage <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-batch-jobdefinition-ephemeralstorage.html>`__
"""

props: PropsDictType = {
Expand All @@ -136,7 +136,7 @@ class EphemeralStorage(AWSProperty):

class FargatePlatformConfiguration(AWSProperty):
"""
`FargatePlatformConfiguration <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-batch-jobdefinition-containerproperties-fargateplatformconfiguration.html>`__
`FargatePlatformConfiguration <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-batch-jobdefinition-fargateplatformconfiguration.html>`__
"""

props: PropsDictType = {
Expand Down Expand Up @@ -170,7 +170,7 @@ class Tmpfs(AWSProperty):

class LinuxParameters(AWSProperty):
"""
`LinuxParameters <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-batch-jobdefinition-containerproperties-linuxparameters.html>`__
`LinuxParameters <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-batch-jobdefinition-linuxparameters.html>`__
"""

props: PropsDictType = {
Expand All @@ -196,7 +196,7 @@ class Secret(AWSProperty):

class LogConfiguration(AWSProperty):
"""
`LogConfiguration <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-batch-jobdefinition-containerproperties-logconfiguration.html>`__
`LogConfiguration <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-batch-jobdefinition-logconfiguration.html>`__
"""

props: PropsDictType = {
Expand All @@ -208,7 +208,7 @@ class LogConfiguration(AWSProperty):

class MountPoints(AWSProperty):
"""
`MountPoints <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-batch-jobdefinition-mountpoints.html>`__
`MountPoints <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-batch-jobdefinition-mountpoint.html>`__
"""

props: PropsDictType = {
Expand All @@ -220,7 +220,7 @@ class MountPoints(AWSProperty):

class NetworkConfiguration(AWSProperty):
"""
`NetworkConfiguration <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-batch-jobdefinition-containerproperties-networkconfiguration.html>`__
`NetworkConfiguration <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-batch-jobdefinition-networkconfiguration.html>`__
"""

props: PropsDictType = {
Expand All @@ -241,7 +241,7 @@ class ResourceRequirement(AWSProperty):

class RuntimePlatform(AWSProperty):
"""
`RuntimePlatform <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-batch-jobdefinition-containerproperties-runtimeplatform.html>`__
`RuntimePlatform <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-batch-jobdefinition-runtimeplatform.html>`__
"""

props: PropsDictType = {
Expand All @@ -264,7 +264,7 @@ class Ulimit(AWSProperty):

class AuthorizationConfig(AWSProperty):
"""
`AuthorizationConfig <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-batch-jobdefinition-authorizationconfig.html>`__
`AuthorizationConfig <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-batch-jobdefinition-efsauthorizationconfig.html>`__
"""

props: PropsDictType = {
Expand All @@ -289,7 +289,7 @@ class EfsVolumeConfiguration(AWSProperty):

class VolumesHost(AWSProperty):
"""
`VolumesHost <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-batch-jobdefinition-volumeshost.html>`__
`VolumesHost <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-batch-jobdefinition-host.html>`__
"""

props: PropsDictType = {
Expand All @@ -299,7 +299,7 @@ class VolumesHost(AWSProperty):

class Volumes(AWSProperty):
"""
`Volumes <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-batch-jobdefinition-volumes.html>`__
`Volumes <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-batch-jobdefinition-volume.html>`__
"""

props: PropsDictType = {
Expand Down Expand Up @@ -453,7 +453,7 @@ class EksVolume(AWSProperty):

class Metadata(AWSProperty):
"""
`Metadata <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-batch-jobdefinition-podproperties-metadata.html>`__
`Metadata <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-batch-jobdefinition-eksmetadata.html>`__
"""

props: PropsDictType = {
Expand All @@ -463,7 +463,7 @@ class Metadata(AWSProperty):

class PodProperties(AWSProperty):
"""
`PodProperties <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-batch-jobdefinition-podproperties.html>`__
`PodProperties <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-batch-jobdefinition-ekspodproperties.html>`__
"""

props: PropsDictType = {
Expand Down Expand Up @@ -535,7 +535,7 @@ class RetryStrategy(AWSProperty):

class Timeout(AWSProperty):
"""
`Timeout <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-batch-jobdefinition-timeout.html>`__
`Timeout <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-batch-jobdefinition-jobtimeout.html>`__
"""

props: PropsDictType = {
Expand Down
1 change: 1 addition & 0 deletions troposphere/codecommit.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ class Repository(AWSObject):

props: PropsDictType = {
"Code": (Code, False),
"KmsKeyId": (str, False),
"RepositoryDescription": (str, False),
"RepositoryName": (str, True),
"Tags": (Tags, False),
Expand Down
25 changes: 16 additions & 9 deletions troposphere/ec2.py
Original file line number Diff line number Diff line change
Expand Up @@ -868,7 +868,7 @@ class EBSBlockDevice(AWSProperty):

class BlockDeviceMapping(AWSProperty):
"""
`BlockDeviceMapping <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-instance-blockdevicemapping.html>`__
`BlockDeviceMapping <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-blockdev-mapping.html>`__
"""

props: PropsDictType = {
Expand Down Expand Up @@ -987,7 +987,7 @@ class PrivateIpAddressSpecification(AWSProperty):

class NetworkInterfaceProperty(AWSProperty):
"""
`NetworkInterfaceProperty <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-instance-networkinterface.html>`__
`NetworkInterfaceProperty <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-network-iface-embedded.html>`__
"""

props: PropsDictType = {
Expand Down Expand Up @@ -1021,7 +1021,7 @@ class PrivateDnsNameOptions(AWSProperty):

class AssociationParameters(AWSProperty):
"""
`AssociationParameters <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-instance-associationparameter.html>`__
`AssociationParameters <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-instance-ssmassociations-associationparameters.html>`__
"""

props: PropsDictType = {
Expand All @@ -1032,7 +1032,7 @@ class AssociationParameters(AWSProperty):

class SsmAssociations(AWSProperty):
"""
`SsmAssociations <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-instance-ssmassociation.html>`__
`SsmAssociations <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-instance-ssmassociations.html>`__
"""

props: PropsDictType = {
Expand All @@ -1043,7 +1043,7 @@ class SsmAssociations(AWSProperty):

class Instance(AWSObject):
"""
`Instance <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-instance.html>`__
`Instance <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-instance.html>`__
"""

resource_type = "AWS::EC2::Instance"
Expand Down Expand Up @@ -2331,10 +2331,9 @@ class Subnet(AWSObject):
"AvailabilityZoneId": (str, False),
"CidrBlock": (str, False),
"EnableDns64": (boolean, False),
"Ipv4NetmaskLength": (integer, False),
"Ipv6CidrBlock": (str, False),
"Ipv6CidrBlocks": ([str], False),
"Ipv6Native": (boolean, False),
"Ipv6NetmaskLength": (integer, False),
"MapPublicIpOnLaunch": (boolean, False),
"OutpostArn": (str, False),
"PrivateDnsNameOptionsOnLaunch": (PrivateDnsNameOptionsOnLaunch, False),
Expand Down Expand Up @@ -3209,7 +3208,7 @@ class Ingress(AWSProperty):

class MountPoint(AWSProperty):
"""
`MountPoint <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-instance-volume.html>`__
`MountPoint <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-mount-point.html>`__
"""

props: PropsDictType = {
Expand All @@ -3218,6 +3217,14 @@ class MountPoint(AWSProperty):
}


class NoDevice(AWSProperty):
"""
`NoDevice <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-instance-nodevice.html>`__
"""

props: PropsDictType = {}


class PeeringAttachmentStatus(AWSProperty):
"""
`PeeringAttachmentStatus <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-transitgatewaypeeringattachment-peeringattachmentstatus.html>`__
Expand Down Expand Up @@ -3268,7 +3275,7 @@ class TransitGatewayRouteTableRoute(AWSProperty):

class VolumeProperty(AWSProperty):
"""
`VolumeProperty <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-instance-volume.html>`__
`VolumeProperty <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-mount-point.html>`__
"""

props: PropsDictType = {
Expand Down
43 changes: 43 additions & 0 deletions troposphere/ecs.py
Original file line number Diff line number Diff line change
Expand Up @@ -374,6 +374,48 @@ class ServiceRegistry(AWSProperty):
}


class EBSTagSpecification(AWSProperty):
"""
`EBSTagSpecification <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-service-ebstagspecification.html>`__
"""

props: PropsDictType = {
"PropagateTags": (str, False),
"ResourceType": (str, True),
"Tags": (Tags, False),
}


class ServiceManagedEBSVolumeConfiguration(AWSProperty):
"""
`ServiceManagedEBSVolumeConfiguration <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-service-servicemanagedebsvolumeconfiguration.html>`__
"""

props: PropsDictType = {
"Encrypted": (boolean, False),
"FilesystemType": (str, False),
"Iops": (integer, False),
"KmsKeyId": (str, False),
"RoleArn": (str, True),
"SizeInGiB": (integer, False),
"SnapshotId": (str, False),
"TagSpecifications": ([EBSTagSpecification], False),
"Throughput": (integer, False),
"VolumeType": (str, False),
}


class ServiceVolumeConfiguration(AWSProperty):
"""
`ServiceVolumeConfiguration <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-service-servicevolumeconfiguration.html>`__
"""

props: PropsDictType = {
"ManagedEBSVolume": (ServiceManagedEBSVolumeConfiguration, False),
"Name": (str, True),
}


class Service(AWSObject):
"""
`Service <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ecs-service.html>`__
Expand Down Expand Up @@ -404,6 +446,7 @@ class Service(AWSObject):
"ServiceRegistries": ([ServiceRegistry], False),
"Tags": (Tags, False),
"TaskDefinition": (str, False),
"VolumeConfigurations": ([ServiceVolumeConfiguration], False),
}


Expand Down
Loading

0 comments on commit f4c07c9

Please sign in to comment.