Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updates from spec version 149.0.0 #2207

Merged
merged 1 commit into from
Dec 6, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
},
"homepage": "https://github.com/cloudtools/troposphere#readme",
"devDependencies": {
"pyright": "=1.1.261"
"pyright": "^1.1.261"
},
"engines": {
"npm": ">=7.0.0",
Expand Down
23 changes: 22 additions & 1 deletion troposphere/accessanalyzer.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,27 @@


from . import AWSObject, AWSProperty, PropsDictType, Tags
from .validators import boolean
from .validators import boolean, integer


class UnusedAccessConfiguration(AWSProperty):
"""
`UnusedAccessConfiguration <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-accessanalyzer-analyzer-unusedaccessconfiguration.html>`__
"""

props: PropsDictType = {
"UnusedAccessAge": (integer, False),
}


class AnalyzerConfiguration(AWSProperty):
"""
`AnalyzerConfiguration <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-accessanalyzer-analyzer-analyzerconfiguration.html>`__
"""

props: PropsDictType = {
"UnusedAccessConfiguration": (UnusedAccessConfiguration, False),
}


class Filter(AWSProperty):
Expand Down Expand Up @@ -43,6 +63,7 @@ class Analyzer(AWSObject):
resource_type = "AWS::AccessAnalyzer::Analyzer"

props: PropsDictType = {
"AnalyzerConfiguration": (AnalyzerConfiguration, False),
"AnalyzerName": (str, False),
"ArchiveRules": ([ArchiveRule], False),
"Tags": (Tags, False),
Expand Down
58 changes: 54 additions & 4 deletions troposphere/applicationautoscaling.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ class ScalableTarget(AWSObject):

class StepAdjustment(AWSProperty):
"""
`StepAdjustment <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-applicationautoscaling-scalingpolicy-stepscalingpolicyconfiguration-stepadjustment.html>`__
`StepAdjustment <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-applicationautoscaling-scalingpolicy-stepadjustment.html>`__
"""

props: PropsDictType = {
Expand Down Expand Up @@ -104,16 +104,66 @@ class MetricDimension(AWSProperty):
}


class TargetTrackingMetricDimension(AWSProperty):
"""
`TargetTrackingMetricDimension <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-applicationautoscaling-scalingpolicy-targettrackingmetricdimension.html>`__
"""

props: PropsDictType = {
"Name": (str, False),
"Value": (str, False),
}


class TargetTrackingMetric(AWSProperty):
"""
`TargetTrackingMetric <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-applicationautoscaling-scalingpolicy-targettrackingmetric.html>`__
"""

props: PropsDictType = {
"Dimensions": ([TargetTrackingMetricDimension], False),
"MetricName": (str, False),
"Namespace": (str, False),
}


class TargetTrackingMetricStat(AWSProperty):
"""
`TargetTrackingMetricStat <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-applicationautoscaling-scalingpolicy-targettrackingmetricstat.html>`__
"""

props: PropsDictType = {
"Metric": (TargetTrackingMetric, False),
"Stat": (str, False),
"Unit": (str, False),
}


class TargetTrackingMetricDataQuery(AWSProperty):
"""
`TargetTrackingMetricDataQuery <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-applicationautoscaling-scalingpolicy-targettrackingmetricdataquery.html>`__
"""

props: PropsDictType = {
"Expression": (str, False),
"Id": (str, False),
"Label": (str, False),
"MetricStat": (TargetTrackingMetricStat, False),
"ReturnData": (boolean, False),
}


class CustomizedMetricSpecification(AWSProperty):
"""
`CustomizedMetricSpecification <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-applicationautoscaling-scalingpolicy-customizedmetricspecification.html>`__
"""

props: PropsDictType = {
"Dimensions": ([MetricDimension], False),
"MetricName": (str, True),
"Namespace": (str, True),
"Statistic": (str, True),
"MetricName": (str, False),
"Metrics": ([TargetTrackingMetricDataQuery], False),
"Namespace": (str, False),
"Statistic": (str, False),
"Unit": (str, False),
}

Expand Down
12 changes: 12 additions & 0 deletions troposphere/autoscaling.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,17 @@
)


class InstanceMaintenancePolicy(AWSProperty):
"""
`InstanceMaintenancePolicy <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-autoscaling-autoscalinggroup-instancemaintenancepolicy.html>`__
"""

props: PropsDictType = {
"MaxHealthyPercentage": (integer, False),
"MinHealthyPercentage": (integer, False),
}


class LaunchTemplateSpecification(AWSProperty):
"""
`LaunchTemplateSpecification <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-autoscaling-autoscalinggroup-launchtemplatespecification.html>`__
Expand Down Expand Up @@ -284,6 +295,7 @@ class AutoScalingGroup(AWSObject):
"HealthCheckGracePeriod": (integer, False),
"HealthCheckType": (str, False),
"InstanceId": (str, False),
"InstanceMaintenancePolicy": (InstanceMaintenancePolicy, False),
"LaunchConfigurationName": (str, False),
"LaunchTemplate": (LaunchTemplateSpecification, False),
"LifecycleHookSpecificationList": ([LifecycleHookSpecification], False),
Expand Down
14 changes: 14 additions & 0 deletions troposphere/awslambda.py
Original file line number Diff line number Diff line change
Expand Up @@ -351,6 +351,19 @@ def validate(self):
validate_image_config(self)


class LoggingConfig(AWSProperty):
"""
`LoggingConfig <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lambda-function-loggingconfig.html>`__
"""

props: PropsDictType = {
"ApplicationLogLevel": (str, False),
"LogFormat": (str, False),
"LogGroup": (str, False),
"SystemLogLevel": (str, False),
}


class RuntimeManagementConfig(AWSProperty):
"""
`RuntimeManagementConfig <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lambda-function-runtimemanagementconfig.html>`__
Expand Down Expand Up @@ -415,6 +428,7 @@ class Function(AWSObject):
"ImageConfig": (ImageConfig, False),
"KmsKeyArn": (str, False),
"Layers": ([str], False),
"LoggingConfig": (LoggingConfig, False),
"MemorySize": (validate_memory_size, False),
"PackageType": (validate_package_type, False),
"Policy": (dict, False),
Expand Down
72 changes: 72 additions & 0 deletions troposphere/backup.py
Original file line number Diff line number Diff line change
Expand Up @@ -289,3 +289,75 @@ class ReportPlan(AWSObject):
"ReportPlanTags": (Tags, False),
"ReportSetting": (ReportSetting, True),
}


class RestoreTestingRecoveryPointSelection(AWSProperty):
"""
`RestoreTestingRecoveryPointSelection <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-backup-restoretestingplan-restoretestingrecoverypointselection.html>`__
"""

props: PropsDictType = {
"Algorithm": (str, True),
"ExcludeVaults": ([str], False),
"IncludeVaults": ([str], True),
"RecoveryPointTypes": ([str], True),
"SelectionWindowDays": (integer, False),
}


class RestoreTestingPlan(AWSObject):
"""
`RestoreTestingPlan <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-backup-restoretestingplan.html>`__
"""

resource_type = "AWS::Backup::RestoreTestingPlan"

props: PropsDictType = {
"RecoveryPointSelection": (RestoreTestingRecoveryPointSelection, True),
"RestoreTestingPlanName": (str, True),
"ScheduleExpression": (str, True),
"ScheduleExpressionTimezone": (str, False),
"StartWindowHours": (integer, False),
"Tags": (Tags, False),
}


class KeyValue(AWSProperty):
"""
`KeyValue <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-backup-restoretestingselection-keyvalue.html>`__
"""

props: PropsDictType = {
"Key": (str, True),
"Value": (str, True),
}


class ProtectedResourceConditions(AWSProperty):
"""
`ProtectedResourceConditions <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-backup-restoretestingselection-protectedresourceconditions.html>`__
"""

props: PropsDictType = {
"StringEquals": ([KeyValue], False),
"StringNotEquals": ([KeyValue], False),
}


class RestoreTestingSelection(AWSObject):
"""
`RestoreTestingSelection <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-backup-restoretestingselection.html>`__
"""

resource_type = "AWS::Backup::RestoreTestingSelection"

props: PropsDictType = {
"IamRoleArn": (str, True),
"ProtectedResourceArns": ([str], False),
"ProtectedResourceConditions": (ProtectedResourceConditions, False),
"ProtectedResourceType": (str, True),
"RestoreMetadataOverrides": (dict, False),
"RestoreTestingPlanName": (str, True),
"RestoreTestingSelectionName": (str, True),
"ValidationWindowHours": (integer, False),
}
23 changes: 13 additions & 10 deletions troposphere/cloudtrail.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,16 @@ class AdvancedEventSelector(AWSProperty):
}


class InsightSelector(AWSProperty):
"""
`InsightSelector <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cloudtrail-trail-insightselector.html>`__
"""

props: PropsDictType = {
"InsightType": (str, False),
}


class EventDataStore(AWSObject):
"""
`EventDataStore <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cloudtrail-eventdatastore.html>`__
Expand All @@ -72,7 +82,10 @@ class EventDataStore(AWSObject):

props: PropsDictType = {
"AdvancedEventSelectors": ([AdvancedEventSelector], False),
"BillingMode": (str, False),
"IngestionEnabled": (boolean, False),
"InsightSelectors": ([InsightSelector], False),
"InsightsDestination": (str, False),
"KmsKeyId": (str, False),
"MultiRegionEnabled": (boolean, False),
"Name": (str, False),
Expand Down Expand Up @@ -120,16 +133,6 @@ class EventSelector(AWSProperty):
}


class InsightSelector(AWSProperty):
"""
`InsightSelector <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cloudtrail-trail-insightselector.html>`__
"""

props: PropsDictType = {
"InsightType": (str, False),
}


class Trail(AWSObject):
"""
`Trail <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cloudtrail-trail.html>`__
Expand Down
33 changes: 33 additions & 0 deletions troposphere/codestarconnections.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,36 @@ class Connection(AWSObject):
"ProviderType": (validate_connection_providertype, False),
"Tags": (Tags, False),
}


class RepositoryLink(AWSObject):
"""
`RepositoryLink <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-codestarconnections-repositorylink.html>`__
"""

resource_type = "AWS::CodeStarConnections::RepositoryLink"

props: PropsDictType = {
"ConnectionArn": (str, True),
"EncryptionKeyArn": (str, False),
"OwnerId": (str, True),
"RepositoryName": (str, True),
"Tags": (Tags, False),
}


class SyncConfiguration(AWSObject):
"""
`SyncConfiguration <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-codestarconnections-syncconfiguration.html>`__
"""

resource_type = "AWS::CodeStarConnections::SyncConfiguration"

props: PropsDictType = {
"Branch": (str, True),
"ConfigFile": (str, True),
"RepositoryLinkId": (str, True),
"ResourceName": (str, True),
"RoleArn": (str, True),
"SyncType": (str, True),
}
28 changes: 27 additions & 1 deletion troposphere/controltower.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,18 @@
# *** Do not modify - this file is autogenerated ***


from . import AWSObject, PropsDictType
from . import AWSObject, AWSProperty, PropsDictType, Tags


class EnabledControlParameter(AWSProperty):
"""
`EnabledControlParameter <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-controltower-enabledcontrol-enabledcontrolparameter.html>`__
"""

props: PropsDictType = {
"Key": (str, True),
"Value": (dict, True),
}


class EnabledControl(AWSObject):
Expand All @@ -18,5 +29,20 @@ class EnabledControl(AWSObject):

props: PropsDictType = {
"ControlIdentifier": (str, True),
"Parameters": ([EnabledControlParameter], False),
"TargetIdentifier": (str, True),
}


class LandingZone(AWSObject):
"""
`LandingZone <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-controltower-landingzone.html>`__
"""

resource_type = "AWS::ControlTower::LandingZone"

props: PropsDictType = {
"Manifest": (dict, True),
"Tags": (Tags, False),
"Version": (str, True),
}
Loading