# Copyright (c) 2012-2025, 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
from .validators import double


class AssociatedAlarm(AWSProperty):
    """
    `AssociatedAlarm <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-arcregionswitch-plan-associatedalarm.html>`__
    """

    props: PropsDictType = {
        "AlarmType": (str, True),
        "CrossAccountRole": (str, False),
        "ExternalId": (str, False),
        "ResourceIdentifier": (str, True),
    }


class S3ReportOutputConfiguration(AWSProperty):
    """
    `S3ReportOutputConfiguration <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-arcregionswitch-plan-s3reportoutputconfiguration.html>`__
    """

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


class ReportOutputConfiguration(AWSProperty):
    """
    `ReportOutputConfiguration <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-arcregionswitch-plan-reportoutputconfiguration.html>`__
    """

    props: PropsDictType = {
        "S3Configuration": (S3ReportOutputConfiguration, True),
    }


class ReportConfiguration(AWSProperty):
    """
    `ReportConfiguration <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-arcregionswitch-plan-reportconfiguration.html>`__
    """

    props: PropsDictType = {
        "ReportOutput": ([ReportOutputConfiguration], False),
    }


class TriggerCondition(AWSProperty):
    """
    `TriggerCondition <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-arcregionswitch-plan-triggercondition.html>`__
    """

    props: PropsDictType = {
        "AssociatedAlarmName": (str, True),
        "Condition": (str, True),
    }


class Trigger(AWSProperty):
    """
    `Trigger <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-arcregionswitch-plan-trigger.html>`__
    """

    props: PropsDictType = {
        "Action": (str, True),
        "Conditions": ([TriggerCondition], True),
        "Description": (str, False),
        "MinDelayMinutesBetweenExecutions": (double, True),
        "TargetRegion": (str, True),
    }


class ArcRoutingControlConfiguration(AWSProperty):
    """
    `ArcRoutingControlConfiguration <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-arcregionswitch-plan-arcroutingcontrolconfiguration.html>`__
    """

    props: PropsDictType = {
        "CrossAccountRole": (str, False),
        "ExternalId": (str, False),
        "RegionAndRoutingControls": (dict, True),
        "TimeoutMinutes": (double, False),
    }


class LambdaUngraceful(AWSProperty):
    """
    `LambdaUngraceful <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-arcregionswitch-plan-lambdaungraceful.html>`__
    """

    props: PropsDictType = {
        "Behavior": (dict, False),
    }


class Lambdas(AWSProperty):
    """
    `Lambdas <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-arcregionswitch-plan-lambdas.html>`__
    """

    props: PropsDictType = {
        "Arn": (str, False),
        "CrossAccountRole": (str, False),
        "ExternalId": (str, False),
    }


class CustomActionLambdaConfiguration(AWSProperty):
    """
    `CustomActionLambdaConfiguration <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-arcregionswitch-plan-customactionlambdaconfiguration.html>`__
    """

    props: PropsDictType = {
        "Lambdas": ([Lambdas], True),
        "RegionToRun": (str, True),
        "RetryIntervalMinutes": (double, True),
        "TimeoutMinutes": (double, False),
        "Ungraceful": (LambdaUngraceful, False),
    }


class DocumentDbUngraceful(AWSProperty):
    """
    `DocumentDbUngraceful <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-arcregionswitch-plan-documentdbungraceful.html>`__
    """

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


class DocumentDbConfiguration(AWSProperty):
    """
    `DocumentDbConfiguration <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-arcregionswitch-plan-documentdbconfiguration.html>`__
    """

    props: PropsDictType = {
        "Behavior": (dict, True),
        "CrossAccountRole": (str, False),
        "DatabaseClusterArns": ([str], True),
        "ExternalId": (str, False),
        "GlobalClusterIdentifier": (str, True),
        "TimeoutMinutes": (double, False),
        "Ungraceful": (DocumentDbUngraceful, False),
    }


class Asg(AWSProperty):
    """
    `Asg <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-arcregionswitch-plan-asg.html>`__
    """

    props: PropsDictType = {
        "Arn": (str, False),
        "CrossAccountRole": (str, False),
        "ExternalId": (str, False),
    }


class Ec2Ungraceful(AWSProperty):
    """
    `Ec2Ungraceful <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-arcregionswitch-plan-ec2ungraceful.html>`__
    """

    props: PropsDictType = {
        "MinimumSuccessPercentage": (double, True),
    }


class Ec2AsgCapacityIncreaseConfiguration(AWSProperty):
    """
    `Ec2AsgCapacityIncreaseConfiguration <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-arcregionswitch-plan-ec2asgcapacityincreaseconfiguration.html>`__
    """

    props: PropsDictType = {
        "Asgs": ([Asg], True),
        "CapacityMonitoringApproach": (dict, False),
        "TargetPercent": (double, False),
        "TimeoutMinutes": (double, False),
        "Ungraceful": (Ec2Ungraceful, False),
    }


class EcsUngraceful(AWSProperty):
    """
    `EcsUngraceful <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-arcregionswitch-plan-ecsungraceful.html>`__
    """

    props: PropsDictType = {
        "MinimumSuccessPercentage": (double, True),
    }


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

    props: PropsDictType = {
        "ClusterArn": (str, False),
        "CrossAccountRole": (str, False),
        "ExternalId": (str, False),
        "ServiceArn": (str, False),
    }


class EcsCapacityIncreaseConfiguration(AWSProperty):
    """
    `EcsCapacityIncreaseConfiguration <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-arcregionswitch-plan-ecscapacityincreaseconfiguration.html>`__
    """

    props: PropsDictType = {
        "CapacityMonitoringApproach": (dict, False),
        "Services": ([Service], True),
        "TargetPercent": (double, False),
        "TimeoutMinutes": (double, False),
        "Ungraceful": (EcsUngraceful, False),
    }


class EksCluster(AWSProperty):
    """
    `EksCluster <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-arcregionswitch-plan-ekscluster.html>`__
    """

    props: PropsDictType = {
        "ClusterArn": (str, True),
        "CrossAccountRole": (str, False),
        "ExternalId": (str, False),
    }


class EksResourceScalingUngraceful(AWSProperty):
    """
    `EksResourceScalingUngraceful <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-arcregionswitch-plan-eksresourcescalingungraceful.html>`__
    """

    props: PropsDictType = {
        "MinimumSuccessPercentage": (double, True),
    }


class KubernetesResourceType(AWSProperty):
    """
    `KubernetesResourceType <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-arcregionswitch-plan-kubernetesresourcetype.html>`__
    """

    props: PropsDictType = {
        "ApiVersion": (str, True),
        "Kind": (str, True),
    }


class EksResourceScalingConfiguration(AWSProperty):
    """
    `EksResourceScalingConfiguration <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-arcregionswitch-plan-eksresourcescalingconfiguration.html>`__
    """

    props: PropsDictType = {
        "CapacityMonitoringApproach": (dict, False),
        "EksClusters": ([EksCluster], False),
        "KubernetesResourceType": (KubernetesResourceType, True),
        "ScalingResources": (dict, False),
        "TargetPercent": (double, False),
        "TimeoutMinutes": (double, False),
        "Ungraceful": (EksResourceScalingUngraceful, False),
    }


class ExecutionApprovalConfiguration(AWSProperty):
    """
    `ExecutionApprovalConfiguration <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-arcregionswitch-plan-executionapprovalconfiguration.html>`__
    """

    props: PropsDictType = {
        "ApprovalRole": (str, True),
        "TimeoutMinutes": (double, False),
    }


class GlobalAuroraUngraceful(AWSProperty):
    """
    `GlobalAuroraUngraceful <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-arcregionswitch-plan-globalauroraungraceful.html>`__
    """

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


class GlobalAuroraConfiguration(AWSProperty):
    """
    `GlobalAuroraConfiguration <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-arcregionswitch-plan-globalauroraconfiguration.html>`__
    """

    props: PropsDictType = {
        "Behavior": (dict, True),
        "CrossAccountRole": (str, False),
        "DatabaseClusterArns": ([str], True),
        "ExternalId": (str, False),
        "GlobalClusterIdentifier": (str, True),
        "TimeoutMinutes": (double, False),
        "Ungraceful": (GlobalAuroraUngraceful, False),
    }


class ParallelExecutionBlockConfiguration(AWSProperty):
    """
    `ParallelExecutionBlockConfiguration <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-arcregionswitch-plan-parallelexecutionblockconfiguration.html>`__
    """

    props: PropsDictType = {
        "Steps": ([object], True),
    }


class RegionSwitchPlanConfiguration(AWSProperty):
    """
    `RegionSwitchPlanConfiguration <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-arcregionswitch-plan-regionswitchplanconfiguration.html>`__
    """

    props: PropsDictType = {
        "Arn": (str, True),
        "CrossAccountRole": (str, False),
        "ExternalId": (str, False),
    }


class Route53ResourceRecordSet(AWSProperty):
    """
    `Route53ResourceRecordSet <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-arcregionswitch-plan-route53resourcerecordset.html>`__
    """

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


class Route53HealthCheckConfiguration(AWSProperty):
    """
    `Route53HealthCheckConfiguration <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-arcregionswitch-plan-route53healthcheckconfiguration.html>`__
    """

    props: PropsDictType = {
        "CrossAccountRole": (str, False),
        "ExternalId": (str, False),
        "HostedZoneId": (str, True),
        "RecordName": (str, True),
        "RecordSets": ([Route53ResourceRecordSet], False),
        "TimeoutMinutes": (double, False),
    }


class ExecutionBlockConfiguration(AWSProperty):
    """
    `ExecutionBlockConfiguration <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-arcregionswitch-plan-executionblockconfiguration.html>`__
    """

    props: PropsDictType = {
        "ArcRoutingControlConfig": (ArcRoutingControlConfiguration, False),
        "CustomActionLambdaConfig": (CustomActionLambdaConfiguration, False),
        "DocumentDbConfig": (DocumentDbConfiguration, False),
        "Ec2AsgCapacityIncreaseConfig": (Ec2AsgCapacityIncreaseConfiguration, False),
        "EcsCapacityIncreaseConfig": (EcsCapacityIncreaseConfiguration, False),
        "EksResourceScalingConfig": (EksResourceScalingConfiguration, False),
        "ExecutionApprovalConfig": (ExecutionApprovalConfiguration, False),
        "GlobalAuroraConfig": (GlobalAuroraConfiguration, False),
        "ParallelConfig": (ParallelExecutionBlockConfiguration, False),
        "RegionSwitchPlanConfig": (RegionSwitchPlanConfiguration, False),
        "Route53HealthCheckConfig": (Route53HealthCheckConfiguration, False),
    }


class Step(AWSProperty):
    """
    `Step <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-arcregionswitch-plan-step.html>`__
    """

    props: PropsDictType = {
        "Description": (str, False),
        "ExecutionBlockConfiguration": (ExecutionBlockConfiguration, True),
        "ExecutionBlockType": (str, True),
        "Name": (str, True),
    }


class Workflow(AWSProperty):
    """
    `Workflow <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-arcregionswitch-plan-workflow.html>`__
    """

    props: PropsDictType = {
        "Steps": ([Step], False),
        "WorkflowDescription": (str, False),
        "WorkflowTargetAction": (str, True),
        "WorkflowTargetRegion": (str, False),
    }


class Plan(AWSObject):
    """
    `Plan <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-arcregionswitch-plan.html>`__
    """

    resource_type = "AWS::ARCRegionSwitch::Plan"

    props: PropsDictType = {
        "AssociatedAlarms": (dict, False),
        "Description": (str, False),
        "ExecutionRole": (str, True),
        "Name": (str, True),
        "PrimaryRegion": (str, False),
        "RecoveryApproach": (str, True),
        "RecoveryTimeObjectiveMinutes": (double, False),
        "Regions": ([str], True),
        "ReportConfiguration": (ReportConfiguration, False),
        "Tags": (dict, False),
        "Triggers": ([Trigger], False),
        "Workflows": ([Workflow], True),
    }
