# Copyright (c) 2012-2022, Mark Peek <mark@peek.org>
# All rights reserved.
#
# See LICENSE file for full license.
#
# *** Do not modify - this file is autogenerated ***
from . import AWSObject, AWSProperty, PropsDictType, Tags
from .validators import boolean, integer
from .validators.dlm import (
validate_interval,
validate_interval_unit,
validate_state,
validate_tags_or_list,
)
[docs]class Exclusions(AWSProperty):
"""
`Exclusions <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-dlm-lifecyclepolicy-exclusions.html>`__
"""
props: PropsDictType = {
"ExcludeBootVolumes": (boolean, False),
"ExcludeTags": ([], False),
"ExcludeVolumeTypes": ([], False),
}
[docs]class CrossRegionCopyRetainRule(AWSProperty):
"""
`CrossRegionCopyRetainRule <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-dlm-lifecyclepolicy-crossregioncopyretainrule.html>`__
"""
props: PropsDictType = {
"Interval": (integer, True),
"IntervalUnit": (str, True),
}
[docs]class EncryptionConfiguration(AWSProperty):
"""
`EncryptionConfiguration <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-dlm-lifecyclepolicy-encryptionconfiguration.html>`__
"""
props: PropsDictType = {
"CmkArn": (str, False),
"Encrypted": (boolean, True),
}
[docs]class CrossRegionCopyAction(AWSProperty):
"""
`CrossRegionCopyAction <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-dlm-lifecyclepolicy-crossregioncopyaction.html>`__
"""
props: PropsDictType = {
"EncryptionConfiguration": (EncryptionConfiguration, True),
"RetainRule": (CrossRegionCopyRetainRule, False),
"Target": (str, True),
}
[docs]class Action(AWSProperty):
"""
`Action <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-dlm-lifecyclepolicy-action.html>`__
"""
props: PropsDictType = {
"CrossRegionCopy": ([CrossRegionCopyAction], True),
"Name": (str, True),
}
[docs]class EventParameters(AWSProperty):
"""
`EventParameters <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-dlm-lifecyclepolicy-eventparameters.html>`__
"""
props: PropsDictType = {
"DescriptionRegex": (str, False),
"EventType": (str, True),
"SnapshotOwner": ([str], True),
}
[docs]class EventSource(AWSProperty):
"""
`EventSource <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-dlm-lifecyclepolicy-eventsource.html>`__
"""
props: PropsDictType = {
"Parameters": (EventParameters, False),
"Type": (str, True),
}
[docs]class Parameters(AWSProperty):
"""
`Parameters <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-dlm-lifecyclepolicy-parameters.html>`__
"""
props: PropsDictType = {
"ExcludeBootVolume": (boolean, False),
"ExcludeDataVolumeTags": (Tags, False),
"NoReboot": (boolean, False),
}
[docs]class RetentionArchiveTier(AWSProperty):
"""
`RetentionArchiveTier <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-dlm-lifecyclepolicy-retentionarchivetier.html>`__
"""
props: PropsDictType = {
"Count": (integer, False),
"Interval": (integer, False),
"IntervalUnit": (str, False),
}
[docs]class ArchiveRetainRule(AWSProperty):
"""
`ArchiveRetainRule <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-dlm-lifecyclepolicy-archiveretainrule.html>`__
"""
props: PropsDictType = {
"RetentionArchiveTier": (RetentionArchiveTier, True),
}
[docs]class ArchiveRule(AWSProperty):
"""
`ArchiveRule <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-dlm-lifecyclepolicy-archiverule.html>`__
"""
props: PropsDictType = {
"RetainRule": (ArchiveRetainRule, True),
}
[docs]class Script(AWSProperty):
"""
`Script <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-dlm-lifecyclepolicy-script.html>`__
"""
props: PropsDictType = {
"ExecuteOperationOnScriptFailure": (boolean, False),
"ExecutionHandler": (str, False),
"ExecutionHandlerService": (str, False),
"ExecutionTimeout": (integer, False),
"MaximumRetryCount": (integer, False),
"Stages": ([str], False),
}
[docs]class CreateRule(AWSProperty):
"""
`CreateRule <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-dlm-lifecyclepolicy-createrule.html>`__
"""
props: PropsDictType = {
"CronExpression": (str, False),
"Interval": (validate_interval, False),
"IntervalUnit": (validate_interval_unit, False),
"Location": (str, False),
"Scripts": ([Script], False),
"Times": ([str], False),
}
[docs]class CrossRegionCopyDeprecateRule(AWSProperty):
"""
`CrossRegionCopyDeprecateRule <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-dlm-lifecyclepolicy-crossregioncopydeprecaterule.html>`__
"""
props: PropsDictType = {
"Interval": (integer, True),
"IntervalUnit": (str, True),
}
[docs]class CrossRegionCopyRule(AWSProperty):
"""
`CrossRegionCopyRule <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-dlm-lifecyclepolicy-crossregioncopyrule.html>`__
"""
props: PropsDictType = {
"CmkArn": (str, False),
"CopyTags": (boolean, False),
"DeprecateRule": (CrossRegionCopyDeprecateRule, False),
"Encrypted": (boolean, True),
"RetainRule": (CrossRegionCopyRetainRule, False),
"Target": (str, False),
"TargetRegion": (str, False),
}
[docs]class DeprecateRule(AWSProperty):
"""
`DeprecateRule <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-dlm-lifecyclepolicy-deprecaterule.html>`__
"""
props: PropsDictType = {
"Count": (integer, False),
"Interval": (integer, False),
"IntervalUnit": (str, False),
}
[docs]class FastRestoreRule(AWSProperty):
"""
`FastRestoreRule <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-dlm-lifecyclepolicy-fastrestorerule.html>`__
"""
props: PropsDictType = {
"AvailabilityZones": ([str], False),
"Count": (integer, False),
"Interval": (integer, False),
"IntervalUnit": (str, False),
}
[docs]class RetainRule(AWSProperty):
"""
`RetainRule <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-dlm-lifecyclepolicy-retainrule.html>`__
"""
props: PropsDictType = {
"Count": (integer, False),
"Interval": (integer, False),
"IntervalUnit": (str, False),
}
[docs]class ShareRule(AWSProperty):
"""
`ShareRule <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-dlm-lifecyclepolicy-sharerule.html>`__
"""
props: PropsDictType = {
"TargetAccounts": ([str], False),
"UnshareInterval": (integer, False),
"UnshareIntervalUnit": (str, False),
}
[docs]class Schedule(AWSProperty):
"""
`Schedule <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-dlm-lifecyclepolicy-schedule.html>`__
"""
props: PropsDictType = {
"ArchiveRule": (ArchiveRule, False),
"CopyTags": (boolean, False),
"CreateRule": (CreateRule, False),
"CrossRegionCopyRules": ([CrossRegionCopyRule], False),
"DeprecateRule": (DeprecateRule, False),
"FastRestoreRule": (FastRestoreRule, False),
"Name": (str, False),
"RetainRule": (RetainRule, False),
"ShareRules": ([ShareRule], False),
"TagsToAdd": (validate_tags_or_list, False),
"VariableTags": (Tags, False),
}
[docs]class PolicyDetails(AWSProperty):
"""
`PolicyDetails <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-dlm-lifecyclepolicy-policydetails.html>`__
"""
props: PropsDictType = {
"Actions": ([Action], False),
"CopyTags": (boolean, False),
"CreateInterval": (integer, False),
"CrossRegionCopyTargets": ([], False),
"EventSource": (EventSource, False),
"Exclusions": (Exclusions, False),
"ExtendDeletion": (boolean, False),
"Parameters": (Parameters, False),
"PolicyLanguage": (str, False),
"PolicyType": (str, False),
"ResourceLocations": ([str], False),
"ResourceType": (str, False),
"ResourceTypes": ([str], False),
"RetainInterval": (integer, False),
"Schedules": ([Schedule], False),
"TargetTags": (validate_tags_or_list, False),
}
[docs]class LifecyclePolicy(AWSObject):
"""
`LifecyclePolicy <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-dlm-lifecyclepolicy.html>`__
"""
resource_type = "AWS::DLM::LifecyclePolicy"
props: PropsDictType = {
"CopyTags": (boolean, False),
"CreateInterval": (integer, False),
"CrossRegionCopyTargets": ([], False),
"DefaultPolicy": (str, False),
"Description": (str, False),
"Exclusions": (Exclusions, False),
"ExecutionRoleArn": (str, False),
"ExtendDeletion": (boolean, False),
"PolicyDetails": (PolicyDetails, False),
"RetainInterval": (integer, False),
"State": (validate_state, False),
"Tags": (validate_tags_or_list, False),
}
[docs]class CrossRegionCopyTarget(AWSProperty):
"""
`CrossRegionCopyTarget <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-dlm-lifecyclepolicy-crossregioncopytarget.html>`__
"""
props: PropsDictType = {
"TargetRegion": (str, False),
}