# 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 boolean, double, integer


class IgnoreNearExpected(AWSProperty):
    """
    `IgnoreNearExpected <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-aps-anomalydetector-ignorenearexpected.html>`__
    """

    props: PropsDictType = {
        "Amount": (double, False),
        "Ratio": (double, False),
    }


class RandomCutForestConfiguration(AWSProperty):
    """
    `RandomCutForestConfiguration <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-aps-anomalydetector-randomcutforestconfiguration.html>`__
    """

    props: PropsDictType = {
        "IgnoreNearExpectedFromAbove": (IgnoreNearExpected, False),
        "IgnoreNearExpectedFromBelow": (IgnoreNearExpected, False),
        "Query": (str, True),
        "SampleSize": (integer, False),
        "ShingleSize": (integer, False),
    }


class AnomalyDetectorConfiguration(AWSProperty):
    """
    `AnomalyDetectorConfiguration <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-aps-anomalydetector-anomalydetectorconfiguration.html>`__
    """

    props: PropsDictType = {
        "RandomCutForest": (RandomCutForestConfiguration, True),
    }


class Label(AWSProperty):
    """
    `Label <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-aps-workspace-label.html>`__
    """

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


class MissingDataAction(AWSProperty):
    """
    `MissingDataAction <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-aps-anomalydetector-missingdataaction.html>`__
    """

    props: PropsDictType = {
        "MarkAsAnomaly": (boolean, False),
        "Skip": (boolean, False),
    }


class AnomalyDetector(AWSObject):
    """
    `AnomalyDetector <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-aps-anomalydetector.html>`__
    """

    resource_type = "AWS::APS::AnomalyDetector"

    props: PropsDictType = {
        "Alias": (str, True),
        "Configuration": (AnomalyDetectorConfiguration, True),
        "EvaluationIntervalInSeconds": (integer, False),
        "Labels": ([Label], False),
        "MissingDataAction": (MissingDataAction, False),
        "Tags": (Tags, False),
        "Workspace": (str, True),
    }


class ResourcePolicy(AWSObject):
    """
    `ResourcePolicy <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-aps-resourcepolicy.html>`__
    """

    resource_type = "AWS::APS::ResourcePolicy"

    props: PropsDictType = {
        "PolicyDocument": (str, True),
        "WorkspaceArn": (str, True),
    }


class RuleGroupsNamespace(AWSObject):
    """
    `RuleGroupsNamespace <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-aps-rulegroupsnamespace.html>`__
    """

    resource_type = "AWS::APS::RuleGroupsNamespace"

    props: PropsDictType = {
        "Data": (str, True),
        "Name": (str, True),
        "Tags": (Tags, False),
        "Workspace": (str, True),
    }


class AmpConfiguration(AWSProperty):
    """
    `AmpConfiguration <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-aps-scraper-ampconfiguration.html>`__
    """

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


class Destination(AWSProperty):
    """
    `Destination <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-aps-scraper-destination.html>`__
    """

    props: PropsDictType = {
        "AmpConfiguration": (AmpConfiguration, True),
    }


class RoleConfiguration(AWSProperty):
    """
    `RoleConfiguration <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-aps-scraper-roleconfiguration.html>`__
    """

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


class ScrapeConfiguration(AWSProperty):
    """
    `ScrapeConfiguration <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-aps-scraper-scrapeconfiguration.html>`__
    """

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


class ComponentConfig(AWSProperty):
    """
    `ComponentConfig <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-aps-scraper-componentconfig.html>`__
    """

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


class ScraperComponent(AWSProperty):
    """
    `ScraperComponent <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-aps-scraper-scrapercomponent.html>`__
    """

    props: PropsDictType = {
        "Config": (ComponentConfig, False),
        "Type": (str, True),
    }


class CloudWatchLogDestination(AWSProperty):
    """
    `CloudWatchLogDestination <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-aps-workspace-cloudwatchlogdestination.html>`__
    """

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


class ScraperLoggingDestination(AWSProperty):
    """
    `ScraperLoggingDestination <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-aps-scraper-scraperloggingdestination.html>`__
    """

    props: PropsDictType = {
        "CloudWatchLogs": (CloudWatchLogDestination, False),
    }


class ScraperLoggingConfiguration(AWSProperty):
    """
    `ScraperLoggingConfiguration <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-aps-scraper-scraperloggingconfiguration.html>`__
    """

    props: PropsDictType = {
        "LoggingDestination": (ScraperLoggingDestination, True),
        "ScraperComponents": ([ScraperComponent], True),
    }


class EksConfiguration(AWSProperty):
    """
    `EksConfiguration <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-aps-scraper-eksconfiguration.html>`__
    """

    props: PropsDictType = {
        "ClusterArn": (str, True),
        "SecurityGroupIds": ([str], False),
        "SubnetIds": ([str], True),
    }


class VpcConfiguration(AWSProperty):
    """
    `VpcConfiguration <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-aps-scraper-vpcconfiguration.html>`__
    """

    props: PropsDictType = {
        "SecurityGroupIds": ([str], True),
        "SubnetIds": ([str], True),
    }


class Source(AWSProperty):
    """
    `Source <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-aps-scraper-source.html>`__
    """

    props: PropsDictType = {
        "EksConfiguration": (EksConfiguration, False),
        "VpcConfiguration": (VpcConfiguration, False),
    }


class Scraper(AWSObject):
    """
    `Scraper <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-aps-scraper.html>`__
    """

    resource_type = "AWS::APS::Scraper"

    props: PropsDictType = {
        "Alias": (str, False),
        "Destination": (Destination, True),
        "RoleConfiguration": (RoleConfiguration, False),
        "ScrapeConfiguration": (ScrapeConfiguration, True),
        "ScraperLoggingConfiguration": (ScraperLoggingConfiguration, False),
        "Source": (Source, True),
        "Tags": (Tags, False),
    }


class LoggingConfiguration(AWSProperty):
    """
    `LoggingConfiguration <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-aps-workspace-loggingconfiguration.html>`__
    """

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


class LoggingFilter(AWSProperty):
    """
    `LoggingFilter <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-aps-workspace-loggingfilter.html>`__
    """

    props: PropsDictType = {
        "QspThreshold": (integer, True),
    }


class LoggingDestination(AWSProperty):
    """
    `LoggingDestination <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-aps-workspace-loggingdestination.html>`__
    """

    props: PropsDictType = {
        "CloudWatchLogs": (CloudWatchLogDestination, True),
        "Filters": (LoggingFilter, True),
    }


class QueryLoggingConfiguration(AWSProperty):
    """
    `QueryLoggingConfiguration <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-aps-workspace-queryloggingconfiguration.html>`__
    """

    props: PropsDictType = {
        "Destinations": ([LoggingDestination], True),
    }


class LimitsPerLabelSetEntry(AWSProperty):
    """
    `LimitsPerLabelSetEntry <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-aps-workspace-limitsperlabelsetentry.html>`__
    """

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


class LimitsPerLabelSet(AWSProperty):
    """
    `LimitsPerLabelSet <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-aps-workspace-limitsperlabelset.html>`__
    """

    props: PropsDictType = {
        "LabelSet": ([Label], True),
        "Limits": (LimitsPerLabelSetEntry, True),
    }


class WorkspaceConfiguration(AWSProperty):
    """
    `WorkspaceConfiguration <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-aps-workspace-workspaceconfiguration.html>`__
    """

    props: PropsDictType = {
        "LimitsPerLabelSets": ([LimitsPerLabelSet], False),
        "RetentionPeriodInDays": (integer, False),
    }


class Workspace(AWSObject):
    """
    `Workspace <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-aps-workspace.html>`__
    """

    resource_type = "AWS::APS::Workspace"

    props: PropsDictType = {
        "AlertManagerDefinition": (str, False),
        "Alias": (str, False),
        "KmsKeyArn": (str, False),
        "LoggingConfiguration": (LoggingConfiguration, False),
        "QueryLoggingConfiguration": (QueryLoggingConfiguration, False),
        "Tags": (Tags, False),
        "WorkspaceConfiguration": (WorkspaceConfiguration, False),
    }
