Source code for troposphere.logs

# 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
from .validators.logs import policytypes  # noqa: F401
from .validators.logs import (
    validate_loggroup_retention_in_days,
    validate_resource_policy,
)


[docs]class AccountPolicy(AWSObject): """ `AccountPolicy <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-logs-accountpolicy.html>`__ """ resource_type = "AWS::Logs::AccountPolicy" props: PropsDictType = { "PolicyDocument": (str, True), "PolicyName": (str, True), "PolicyType": (str, True), "Scope": (str, False), "SelectionCriteria": (str, False), }
[docs]class Delivery(AWSObject): """ `Delivery <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-logs-delivery.html>`__ """ resource_type = "AWS::Logs::Delivery" props: PropsDictType = { "DeliveryDestinationArn": (str, True), "DeliverySourceName": (str, True), "FieldDelimiter": (str, False), "RecordFields": ([str], False), "S3EnableHiveCompatiblePath": (boolean, False), "S3SuffixPath": (str, False), "Tags": (Tags, False), }
[docs]class DestinationPolicy(AWSProperty): """ `DestinationPolicy <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-logs-deliverydestination-destinationpolicy.html>`__ """ props: PropsDictType = { "DeliveryDestinationName": (str, False), "DeliveryDestinationPolicy": (dict, False), }
[docs]class DeliveryDestination(AWSObject): """ `DeliveryDestination <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-logs-deliverydestination.html>`__ """ resource_type = "AWS::Logs::DeliveryDestination" props: PropsDictType = { "DeliveryDestinationPolicy": (DestinationPolicy, False), "DeliveryDestinationType": (str, False), "DestinationResourceArn": (str, False), "Name": (str, True), "OutputFormat": (str, False), "Tags": (Tags, False), }
[docs]class DeliverySource(AWSObject): """ `DeliverySource <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-logs-deliverysource.html>`__ """ resource_type = "AWS::Logs::DeliverySource" props: PropsDictType = { "LogType": (str, False), "Name": (str, True), "ResourceArn": (str, False), "Tags": (Tags, False), }
[docs]class Destination(AWSObject): """ `Destination <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-logs-destination.html>`__ """ resource_type = "AWS::Logs::Destination" props: PropsDictType = { "DestinationName": (str, True), "DestinationPolicy": (str, False), "RoleArn": (str, True), "Tags": (Tags, False), "TargetArn": (str, True), }
[docs]class OpenSearchResourceConfig(AWSProperty): """ `OpenSearchResourceConfig <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-logs-integration-opensearchresourceconfig.html>`__ """ props: PropsDictType = { "ApplicationARN": (str, False), "DashboardViewerPrincipals": ([str], True), "DataSourceRoleArn": (str, True), "KmsKeyArn": (str, False), "RetentionDays": (integer, False), }
[docs]class ResourceConfig(AWSProperty): """ `ResourceConfig <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-logs-integration-resourceconfig.html>`__ """ props: PropsDictType = { "OpenSearchResourceConfig": (OpenSearchResourceConfig, False), }
[docs]class Integration(AWSObject): """ `Integration <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-logs-integration.html>`__ """ resource_type = "AWS::Logs::Integration" props: PropsDictType = { "IntegrationName": (str, True), "IntegrationType": (str, True), "ResourceConfig": (ResourceConfig, True), }
[docs]class LogAnomalyDetector(AWSObject): """ `LogAnomalyDetector <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-logs-loganomalydetector.html>`__ """ resource_type = "AWS::Logs::LogAnomalyDetector" props: PropsDictType = { "AccountId": (str, False), "AnomalyVisibilityTime": (double, False), "DetectorName": (str, False), "EvaluationFrequency": (str, False), "FilterPattern": (str, False), "KmsKeyId": (str, False), "LogGroupArnList": ([str], False), }
[docs]class LogGroup(AWSObject): """ `LogGroup <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-logs-loggroup.html>`__ """ resource_type = "AWS::Logs::LogGroup" props: PropsDictType = { "BearerTokenAuthenticationEnabled": (boolean, False), "DataProtectionPolicy": (dict, False), "DeletionProtectionEnabled": (boolean, False), "FieldIndexPolicies": (Tags, False), "KmsKeyId": (str, False), "LogGroupClass": (str, False), "LogGroupName": (str, False), "ResourcePolicyDocument": (dict, False), "RetentionInDays": (validate_loggroup_retention_in_days, False), "Tags": (Tags, False), }
[docs]class LogStream(AWSObject): """ `LogStream <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-logs-logstream.html>`__ """ resource_type = "AWS::Logs::LogStream" props: PropsDictType = { "LogGroupName": (str, True), "LogStreamName": (str, False), }
[docs]class Dimension(AWSProperty): """ `Dimension <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-logs-metricfilter-dimension.html>`__ """ props: PropsDictType = { "Key": (str, True), "Value": (str, True), }
[docs]class MetricTransformation(AWSProperty): """ `MetricTransformation <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-logs-metricfilter-metrictransformation.html>`__ """ props: PropsDictType = { "DefaultValue": (double, False), "Dimensions": ([Dimension], False), "MetricName": (str, True), "MetricNamespace": (str, True), "MetricValue": (str, True), "Unit": (str, False), }
[docs]class MetricFilter(AWSObject): """ `MetricFilter <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-logs-metricfilter.html>`__ """ resource_type = "AWS::Logs::MetricFilter" props: PropsDictType = { "ApplyOnTransformedLogs": (boolean, False), "EmitSystemFieldDimensions": ([str], False), "FieldSelectionCriteria": (str, False), "FilterName": (str, False), "FilterPattern": (str, True), "LogGroupName": (str, True), "MetricTransformations": ([MetricTransformation], True), }
[docs]class QueryParameter(AWSProperty): """ `QueryParameter <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-logs-querydefinition-queryparameter.html>`__ """ props: PropsDictType = { "DefaultValue": (str, False), "Description": (str, False), "Name": (str, True), }
[docs]class QueryDefinition(AWSObject): """ `QueryDefinition <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-logs-querydefinition.html>`__ """ resource_type = "AWS::Logs::QueryDefinition" props: PropsDictType = { "LogGroupNames": ([str], False), "Name": (str, True), "Parameters": ([QueryParameter], False), "QueryLanguage": (str, False), "QueryString": (str, True), }
[docs]class ResourcePolicy(AWSObject): """ `ResourcePolicy <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-logs-resourcepolicy.html>`__ """ resource_type = "AWS::Logs::ResourcePolicy" props: PropsDictType = { "PolicyDocument": (validate_resource_policy, True), "PolicyName": (str, True), }
[docs]class S3Configuration(AWSProperty): """ `S3Configuration <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-logs-scheduledquery-s3configuration.html>`__ """ props: PropsDictType = { "DestinationIdentifier": (str, True), "RoleArn": (str, True), }
[docs]class DestinationConfiguration(AWSProperty): """ `DestinationConfiguration <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-logs-scheduledquery-destinationconfiguration.html>`__ """ props: PropsDictType = { "S3Configuration": (S3Configuration, False), }
[docs]class TagsItems(AWSProperty): """ `TagsItems <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-logs-scheduledquery-tagsitems.html>`__ """ props: PropsDictType = { "Key": (str, True), "Value": (str, True), }
[docs]class ScheduledQuery(AWSObject): """ `ScheduledQuery <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-logs-scheduledquery.html>`__ """ resource_type = "AWS::Logs::ScheduledQuery" props: PropsDictType = { "Description": (str, False), "DestinationConfiguration": (DestinationConfiguration, False), "ExecutionRoleArn": (str, True), "LogGroupIdentifiers": ([str], False), "Name": (str, True), "QueryLanguage": (str, True), "QueryString": (str, True), "ScheduleEndTime": (double, False), "ScheduleExpression": (str, True), "ScheduleStartTime": (double, False), "StartTimeOffset": (integer, False), "State": (str, False), "Tags": ([TagsItems], False), "Timezone": (str, False), }
[docs]class SubscriptionFilter(AWSObject): """ `SubscriptionFilter <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-logs-subscriptionfilter.html>`__ """ resource_type = "AWS::Logs::SubscriptionFilter" props: PropsDictType = { "ApplyOnTransformedLogs": (boolean, False), "DestinationArn": (str, True), "Distribution": (str, False), "EmitSystemFields": ([str], False), "FieldSelectionCriteria": (str, False), "FilterName": (str, False), "FilterPattern": (str, True), "LogGroupName": (str, True), "RoleArn": (str, False), }
[docs]class AddKeyEntry(AWSProperty): """ `AddKeyEntry <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-logs-transformer-addkeyentry.html>`__ """ props: PropsDictType = { "Key": (str, True), "OverwriteIfExists": (boolean, False), "Value": (str, True), }
[docs]class AddKeys(AWSProperty): """ `AddKeys <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-logs-transformer-addkeys.html>`__ """ props: PropsDictType = { "Entries": ([AddKeyEntry], True), }
[docs]class CopyValueEntry(AWSProperty): """ `CopyValueEntry <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-logs-transformer-copyvalueentry.html>`__ """ props: PropsDictType = { "OverwriteIfExists": (boolean, False), "Source": (str, True), "Target": (str, True), }
[docs]class CopyValue(AWSProperty): """ `CopyValue <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-logs-transformer-copyvalue.html>`__ """ props: PropsDictType = { "Entries": ([CopyValueEntry], True), }
[docs]class Csv(AWSProperty): """ `Csv <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-logs-transformer-csv.html>`__ """ props: PropsDictType = { "Columns": ([str], False), "Delimiter": (str, False), "QuoteCharacter": (str, False), "Source": (str, False), }
[docs]class DateTimeConverter(AWSProperty): """ `DateTimeConverter <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-logs-transformer-datetimeconverter.html>`__ """ props: PropsDictType = { "Locale": (str, False), "MatchPatterns": ([str], True), "Source": (str, True), "SourceTimezone": (str, False), "Target": (str, True), "TargetFormat": (str, False), "TargetTimezone": (str, False), }
[docs]class DeleteKeys(AWSProperty): """ `DeleteKeys <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-logs-transformer-deletekeys.html>`__ """ props: PropsDictType = { "WithKeys": ([str], True), }
[docs]class Grok(AWSProperty): """ `Grok <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-logs-transformer-grok.html>`__ """ props: PropsDictType = { "Match": (str, True), "Source": (str, False), }
[docs]class ListToMap(AWSProperty): """ `ListToMap <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-logs-transformer-listtomap.html>`__ """ props: PropsDictType = { "Flatten": (boolean, False), "FlattenedElement": (str, False), "Key": (str, True), "Source": (str, True), "Target": (str, False), "ValueKey": (str, False), }
[docs]class LowerCaseString(AWSProperty): """ `LowerCaseString <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-logs-transformer-lowercasestring.html>`__ """ props: PropsDictType = { "WithKeys": ([str], True), }
[docs]class MoveKeyEntry(AWSProperty): """ `MoveKeyEntry <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-logs-transformer-movekeyentry.html>`__ """ props: PropsDictType = { "OverwriteIfExists": (boolean, False), "Source": (str, True), "Target": (str, True), }
[docs]class MoveKeys(AWSProperty): """ `MoveKeys <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-logs-transformer-movekeys.html>`__ """ props: PropsDictType = { "Entries": ([MoveKeyEntry], True), }
[docs]class ParseCloudfront(AWSProperty): """ `ParseCloudfront <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-logs-transformer-parsecloudfront.html>`__ """ props: PropsDictType = { "Source": (str, False), }
[docs]class ParseJSON(AWSProperty): """ `ParseJSON <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-logs-transformer-parsejson.html>`__ """ props: PropsDictType = { "Destination": (str, False), "Source": (str, False), }
[docs]class ParseKeyValue(AWSProperty): """ `ParseKeyValue <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-logs-transformer-parsekeyvalue.html>`__ """ props: PropsDictType = { "Destination": (str, False), "FieldDelimiter": (str, False), "KeyPrefix": (str, False), "KeyValueDelimiter": (str, False), "NonMatchValue": (str, False), "OverwriteIfExists": (boolean, False), "Source": (str, False), }
[docs]class ParsePostgres(AWSProperty): """ `ParsePostgres <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-logs-transformer-parsepostgres.html>`__ """ props: PropsDictType = { "Source": (str, False), }
[docs]class ParseRoute53(AWSProperty): """ `ParseRoute53 <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-logs-transformer-parseroute53.html>`__ """ props: PropsDictType = { "Source": (str, False), }
[docs]class ParseToOCSF(AWSProperty): """ `ParseToOCSF <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-logs-transformer-parsetoocsf.html>`__ """ props: PropsDictType = { "EventSource": (str, True), "MappingVersion": (str, False), "OcsfVersion": (str, True), "Source": (str, False), }
[docs]class ParseVPC(AWSProperty): """ `ParseVPC <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-logs-transformer-parsevpc.html>`__ """ props: PropsDictType = { "Source": (str, False), }
[docs]class ParseWAF(AWSProperty): """ `ParseWAF <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-logs-transformer-parsewaf.html>`__ """ props: PropsDictType = { "Source": (str, False), }
[docs]class RenameKeyEntry(AWSProperty): """ `RenameKeyEntry <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-logs-transformer-renamekeyentry.html>`__ """ props: PropsDictType = { "Key": (str, True), "OverwriteIfExists": (boolean, False), "RenameTo": (str, True), }
[docs]class RenameKeys(AWSProperty): """ `RenameKeys <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-logs-transformer-renamekeys.html>`__ """ props: PropsDictType = { "Entries": ([RenameKeyEntry], True), }
[docs]class SplitStringEntry(AWSProperty): """ `SplitStringEntry <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-logs-transformer-splitstringentry.html>`__ """ props: PropsDictType = { "Delimiter": (str, True), "Source": (str, True), }
[docs]class SplitString(AWSProperty): """ `SplitString <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-logs-transformer-splitstring.html>`__ """ props: PropsDictType = { "Entries": ([SplitStringEntry], True), }
[docs]class SubstituteStringEntry(AWSProperty): """ `SubstituteStringEntry <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-logs-transformer-substitutestringentry.html>`__ """ props: PropsDictType = { "From": (str, True), "Source": (str, True), "To": (str, True), }
[docs]class SubstituteString(AWSProperty): """ `SubstituteString <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-logs-transformer-substitutestring.html>`__ """ props: PropsDictType = { "Entries": ([SubstituteStringEntry], True), }
[docs]class TrimString(AWSProperty): """ `TrimString <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-logs-transformer-trimstring.html>`__ """ props: PropsDictType = { "WithKeys": ([str], True), }
[docs]class TypeConverterEntry(AWSProperty): """ `TypeConverterEntry <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-logs-transformer-typeconverterentry.html>`__ """ props: PropsDictType = { "Key": (str, True), "Type": (str, True), }
[docs]class TypeConverter(AWSProperty): """ `TypeConverter <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-logs-transformer-typeconverter.html>`__ """ props: PropsDictType = { "Entries": ([TypeConverterEntry], True), }
[docs]class UpperCaseString(AWSProperty): """ `UpperCaseString <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-logs-transformer-uppercasestring.html>`__ """ props: PropsDictType = { "WithKeys": ([str], True), }
[docs]class Processor(AWSProperty): """ `Processor <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-logs-transformer-processor.html>`__ """ props: PropsDictType = { "AddKeys": (AddKeys, False), "CopyValue": (CopyValue, False), "Csv": (Csv, False), "DateTimeConverter": (DateTimeConverter, False), "DeleteKeys": (DeleteKeys, False), "Grok": (Grok, False), "ListToMap": (ListToMap, False), "LowerCaseString": (LowerCaseString, False), "MoveKeys": (MoveKeys, False), "ParseCloudfront": (ParseCloudfront, False), "ParseJSON": (ParseJSON, False), "ParseKeyValue": (ParseKeyValue, False), "ParsePostgres": (ParsePostgres, False), "ParseRoute53": (ParseRoute53, False), "ParseToOCSF": (ParseToOCSF, False), "ParseVPC": (ParseVPC, False), "ParseWAF": (ParseWAF, False), "RenameKeys": (RenameKeys, False), "SplitString": (SplitString, False), "SubstituteString": (SubstituteString, False), "TrimString": (TrimString, False), "TypeConverter": (TypeConverter, False), "UpperCaseString": (UpperCaseString, False), }
[docs]class Transformer(AWSObject): """ `Transformer <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-logs-transformer.html>`__ """ resource_type = "AWS::Logs::Transformer" props: PropsDictType = { "LogGroupIdentifier": (str, True), "TransformerConfig": ([Processor], True), }