# 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, Tags
from .validators import integer


class LogsBackupConfiguration(AWSProperty):
    """
    `LogsBackupConfiguration <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-observabilityadmin-organizationcentralizationrule-logsbackupconfiguration.html>`__
    """

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


class LogsEncryptionConfiguration(AWSProperty):
    """
    `LogsEncryptionConfiguration <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-observabilityadmin-organizationcentralizationrule-logsencryptionconfiguration.html>`__
    """

    props: PropsDictType = {
        "EncryptionConflictResolutionStrategy": (str, False),
        "EncryptionStrategy": (str, True),
        "KmsKeyArn": (str, False),
    }


class DestinationLogsConfiguration(AWSProperty):
    """
    `DestinationLogsConfiguration <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-observabilityadmin-organizationcentralizationrule-destinationlogsconfiguration.html>`__
    """

    props: PropsDictType = {
        "BackupConfiguration": (LogsBackupConfiguration, False),
        "LogsEncryptionConfiguration": (LogsEncryptionConfiguration, False),
    }


class CentralizationRuleDestination(AWSProperty):
    """
    `CentralizationRuleDestination <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-observabilityadmin-organizationcentralizationrule-centralizationruledestination.html>`__
    """

    props: PropsDictType = {
        "Account": (str, False),
        "DestinationLogsConfiguration": (DestinationLogsConfiguration, False),
        "Region": (str, True),
    }


class SourceLogsConfiguration(AWSProperty):
    """
    `SourceLogsConfiguration <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-observabilityadmin-organizationcentralizationrule-sourcelogsconfiguration.html>`__
    """

    props: PropsDictType = {
        "EncryptedLogGroupStrategy": (str, True),
        "LogGroupSelectionCriteria": (str, True),
    }


class CentralizationRuleSource(AWSProperty):
    """
    `CentralizationRuleSource <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-observabilityadmin-organizationcentralizationrule-centralizationrulesource.html>`__
    """

    props: PropsDictType = {
        "Regions": ([str], True),
        "Scope": (str, False),
        "SourceLogsConfiguration": (SourceLogsConfiguration, False),
    }


class CentralizationRule(AWSProperty):
    """
    `CentralizationRule <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-observabilityadmin-organizationcentralizationrule-centralizationrule.html>`__
    """

    props: PropsDictType = {
        "Destination": (CentralizationRuleDestination, True),
        "Source": (CentralizationRuleSource, True),
    }


class OrganizationCentralizationRule(AWSObject):
    """
    `OrganizationCentralizationRule <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-observabilityadmin-organizationcentralizationrule.html>`__
    """

    resource_type = "AWS::ObservabilityAdmin::OrganizationCentralizationRule"

    props: PropsDictType = {
        "Rule": (CentralizationRule, True),
        "RuleName": (str, True),
        "Tags": (Tags, False),
    }


class VPCFlowLogParameters(AWSProperty):
    """
    `VPCFlowLogParameters <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-observabilityadmin-telemetryrule-vpcflowlogparameters.html>`__
    """

    props: PropsDictType = {
        "LogFormat": (str, False),
        "MaxAggregationInterval": (integer, False),
        "TrafficType": (str, False),
    }


class TelemetryDestinationConfiguration(AWSProperty):
    """
    `TelemetryDestinationConfiguration <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-observabilityadmin-telemetryrule-telemetrydestinationconfiguration.html>`__
    """

    props: PropsDictType = {
        "DestinationPattern": (str, False),
        "DestinationType": (str, False),
        "RetentionInDays": (integer, False),
        "VPCFlowLogParameters": (VPCFlowLogParameters, False),
    }


class TelemetryRuleProperty(AWSProperty):
    """
    `TelemetryRuleProperty <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-observabilityadmin-telemetryrule-telemetryrule.html>`__
    """

    props: PropsDictType = {
        "DestinationConfiguration": (TelemetryDestinationConfiguration, False),
        "ResourceType": (str, True),
        "SelectionCriteria": (str, False),
        "TelemetryType": (str, True),
    }


class OrganizationTelemetryRule(AWSObject):
    """
    `OrganizationTelemetryRule <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-observabilityadmin-organizationtelemetryrule.html>`__
    """

    resource_type = "AWS::ObservabilityAdmin::OrganizationTelemetryRule"

    props: PropsDictType = {
        "Rule": (TelemetryRuleProperty, True),
        "RuleName": (str, True),
        "Tags": (Tags, False),
    }


class TelemetryRule(AWSObject):
    """
    `TelemetryRule <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-observabilityadmin-telemetryrule.html>`__
    """

    resource_type = "AWS::ObservabilityAdmin::TelemetryRule"

    props: PropsDictType = {
        "Rule": (TelemetryRuleProperty, True),
        "RuleName": (str, True),
        "Tags": (Tags, False),
    }
