{-# LANGUAGE DisambiguateRecordFields #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}
module Amazonka.CloudWatchLogs.Types
(
defaultService,
_DataAlreadyAcceptedException,
_InvalidOperationException,
_InvalidParameterException,
_InvalidSequenceTokenException,
_LimitExceededException,
_MalformedQueryException,
_OperationAbortedException,
_ResourceAlreadyExistsException,
_ResourceNotFoundException,
_ServiceUnavailableException,
_TooManyTagsException,
_UnrecognizedClientException,
DataProtectionStatus (..),
Distribution (..),
ExportTaskStatusCode (..),
OrderBy (..),
QueryStatus (..),
StandardUnit (..),
Destination (..),
newDestination,
destination_accessPolicy,
destination_arn,
destination_creationTime,
destination_destinationName,
destination_roleArn,
destination_targetArn,
ExportTask (..),
newExportTask,
exportTask_destination,
exportTask_destinationPrefix,
exportTask_executionInfo,
exportTask_from,
exportTask_logGroupName,
exportTask_status,
exportTask_taskId,
exportTask_taskName,
exportTask_to,
ExportTaskExecutionInfo (..),
newExportTaskExecutionInfo,
exportTaskExecutionInfo_completionTime,
exportTaskExecutionInfo_creationTime,
ExportTaskStatus (..),
newExportTaskStatus,
exportTaskStatus_code,
exportTaskStatus_message,
FilteredLogEvent (..),
newFilteredLogEvent,
filteredLogEvent_eventId,
filteredLogEvent_ingestionTime,
filteredLogEvent_logStreamName,
filteredLogEvent_message,
filteredLogEvent_timestamp,
InputLogEvent (..),
newInputLogEvent,
inputLogEvent_timestamp,
inputLogEvent_message,
LogGroup (..),
newLogGroup,
logGroup_arn,
logGroup_creationTime,
logGroup_dataProtectionStatus,
logGroup_kmsKeyId,
logGroup_logGroupName,
logGroup_metricFilterCount,
logGroup_retentionInDays,
logGroup_storedBytes,
LogGroupField (..),
newLogGroupField,
logGroupField_name,
logGroupField_percent,
LogStream (..),
newLogStream,
logStream_arn,
logStream_creationTime,
logStream_firstEventTimestamp,
logStream_lastEventTimestamp,
logStream_lastIngestionTime,
logStream_logStreamName,
logStream_storedBytes,
logStream_uploadSequenceToken,
MetricFilter (..),
newMetricFilter,
metricFilter_creationTime,
metricFilter_filterName,
metricFilter_filterPattern,
metricFilter_logGroupName,
metricFilter_metricTransformations,
MetricFilterMatchRecord (..),
newMetricFilterMatchRecord,
metricFilterMatchRecord_eventMessage,
metricFilterMatchRecord_eventNumber,
metricFilterMatchRecord_extractedValues,
MetricTransformation (..),
newMetricTransformation,
metricTransformation_defaultValue,
metricTransformation_dimensions,
metricTransformation_unit,
metricTransformation_metricName,
metricTransformation_metricNamespace,
metricTransformation_metricValue,
OutputLogEvent (..),
newOutputLogEvent,
outputLogEvent_ingestionTime,
outputLogEvent_message,
outputLogEvent_timestamp,
QueryDefinition (..),
newQueryDefinition,
queryDefinition_lastModified,
queryDefinition_logGroupNames,
queryDefinition_name,
queryDefinition_queryDefinitionId,
queryDefinition_queryString,
QueryInfo (..),
newQueryInfo,
queryInfo_createTime,
queryInfo_logGroupName,
queryInfo_queryId,
queryInfo_queryString,
queryInfo_status,
QueryStatistics (..),
newQueryStatistics,
queryStatistics_bytesScanned,
queryStatistics_recordsMatched,
queryStatistics_recordsScanned,
RejectedLogEventsInfo (..),
newRejectedLogEventsInfo,
rejectedLogEventsInfo_expiredLogEventEndIndex,
rejectedLogEventsInfo_tooNewLogEventStartIndex,
rejectedLogEventsInfo_tooOldLogEventEndIndex,
ResourcePolicy (..),
newResourcePolicy,
resourcePolicy_lastUpdatedTime,
resourcePolicy_policyDocument,
resourcePolicy_policyName,
ResultField (..),
newResultField,
resultField_field,
resultField_value,
SearchedLogStream (..),
newSearchedLogStream,
searchedLogStream_logStreamName,
searchedLogStream_searchedCompletely,
SubscriptionFilter (..),
newSubscriptionFilter,
subscriptionFilter_creationTime,
subscriptionFilter_destinationArn,
subscriptionFilter_distribution,
subscriptionFilter_filterName,
subscriptionFilter_filterPattern,
subscriptionFilter_logGroupName,
subscriptionFilter_roleArn,
)
where
import Amazonka.CloudWatchLogs.Types.DataProtectionStatus
import Amazonka.CloudWatchLogs.Types.Destination
import Amazonka.CloudWatchLogs.Types.Distribution
import Amazonka.CloudWatchLogs.Types.ExportTask
import Amazonka.CloudWatchLogs.Types.ExportTaskExecutionInfo
import Amazonka.CloudWatchLogs.Types.ExportTaskStatus
import Amazonka.CloudWatchLogs.Types.ExportTaskStatusCode
import Amazonka.CloudWatchLogs.Types.FilteredLogEvent
import Amazonka.CloudWatchLogs.Types.InputLogEvent
import Amazonka.CloudWatchLogs.Types.LogGroup
import Amazonka.CloudWatchLogs.Types.LogGroupField
import Amazonka.CloudWatchLogs.Types.LogStream
import Amazonka.CloudWatchLogs.Types.MetricFilter
import Amazonka.CloudWatchLogs.Types.MetricFilterMatchRecord
import Amazonka.CloudWatchLogs.Types.MetricTransformation
import Amazonka.CloudWatchLogs.Types.OrderBy
import Amazonka.CloudWatchLogs.Types.OutputLogEvent
import Amazonka.CloudWatchLogs.Types.QueryDefinition
import Amazonka.CloudWatchLogs.Types.QueryInfo
import Amazonka.CloudWatchLogs.Types.QueryStatistics
import Amazonka.CloudWatchLogs.Types.QueryStatus
import Amazonka.CloudWatchLogs.Types.RejectedLogEventsInfo
import Amazonka.CloudWatchLogs.Types.ResourcePolicy
import Amazonka.CloudWatchLogs.Types.ResultField
import Amazonka.CloudWatchLogs.Types.SearchedLogStream
import Amazonka.CloudWatchLogs.Types.StandardUnit
import Amazonka.CloudWatchLogs.Types.SubscriptionFilter
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Sign.V4 as Sign
defaultService :: Core.Service
defaultService :: Service
defaultService =
Core.Service
{ $sel:abbrev:Service :: Abbrev
Core.abbrev = Abbrev
"CloudWatchLogs",
$sel:signer:Service :: Signer
Core.signer = Signer
Sign.v4,
$sel:endpointPrefix:Service :: ByteString
Core.endpointPrefix = ByteString
"logs",
$sel:signingName:Service :: ByteString
Core.signingName = ByteString
"logs",
$sel:version:Service :: ByteString
Core.version = ByteString
"2014-03-28",
$sel:s3AddressingStyle:Service :: S3AddressingStyle
Core.s3AddressingStyle = S3AddressingStyle
Core.S3AddressingStyleAuto,
$sel:endpoint:Service :: Region -> Endpoint
Core.endpoint = Service -> Region -> Endpoint
Core.defaultEndpoint Service
defaultService,
$sel:timeout:Service :: Maybe Seconds
Core.timeout = forall a. a -> Maybe a
Prelude.Just Seconds
70,
$sel:check:Service :: Status -> Bool
Core.check = Status -> Bool
Core.statusSuccess,
$sel:error:Service :: Status -> [Header] -> ByteStringLazy -> Error
Core.error = Abbrev -> Status -> [Header] -> ByteStringLazy -> Error
Core.parseJSONError Abbrev
"CloudWatchLogs",
$sel:retry:Service :: Retry
Core.retry = Retry
retry
}
where
retry :: Retry
retry =
Core.Exponential
{ $sel:base:Exponential :: Double
Core.base = Double
5.0e-2,
$sel:growth:Exponential :: Int
Core.growth = Int
2,
$sel:attempts:Exponential :: Int
Core.attempts = Int
5,
$sel:check:Exponential :: ServiceError -> Maybe Text
Core.check = forall {a}. IsString a => ServiceError -> Maybe a
check
}
check :: ServiceError -> Maybe a
check ServiceError
e
| forall s a. Getting Any s a -> s -> Bool
Lens.has (forall (f :: * -> *) (p :: * -> * -> *).
(Applicative f, Choice p) =>
Int -> Optic' p f ServiceError ServiceError
Core.hasStatus Int
502) ServiceError
e =
forall a. a -> Maybe a
Prelude.Just a
"bad_gateway"
| forall s a. Getting Any s a -> s -> Bool
Lens.has (forall (f :: * -> *) (p :: * -> * -> *).
(Applicative f, Choice p) =>
Int -> Optic' p f ServiceError ServiceError
Core.hasStatus Int
504) ServiceError
e =
forall a. a -> Maybe a
Prelude.Just a
"gateway_timeout"
| forall s a. Getting Any s a -> s -> Bool
Lens.has (forall (f :: * -> *) (p :: * -> * -> *).
(Applicative f, Choice p) =>
Int -> Optic' p f ServiceError ServiceError
Core.hasStatus Int
500) ServiceError
e =
forall a. a -> Maybe a
Prelude.Just a
"general_server_error"
| forall s a. Getting Any s a -> s -> Bool
Lens.has (forall (f :: * -> *) (p :: * -> * -> *).
(Applicative f, Choice p) =>
Int -> Optic' p f ServiceError ServiceError
Core.hasStatus Int
509) ServiceError
e =
forall a. a -> Maybe a
Prelude.Just a
"limit_exceeded"
| forall s a. Getting Any s a -> s -> Bool
Lens.has
( forall (f :: * -> *) (p :: * -> * -> *).
(Applicative f, Choice p) =>
ErrorCode -> Optic' p f ServiceError ServiceError
Core.hasCode ErrorCode
"RequestThrottledException"
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (p :: * -> * -> *).
(Applicative f, Choice p) =>
Int -> Optic' p f ServiceError ServiceError
Core.hasStatus Int
400
)
ServiceError
e =
forall a. a -> Maybe a
Prelude.Just a
"request_throttled_exception"
| forall s a. Getting Any s a -> s -> Bool
Lens.has (forall (f :: * -> *) (p :: * -> * -> *).
(Applicative f, Choice p) =>
Int -> Optic' p f ServiceError ServiceError
Core.hasStatus Int
503) ServiceError
e =
forall a. a -> Maybe a
Prelude.Just a
"service_unavailable"
| forall s a. Getting Any s a -> s -> Bool
Lens.has
( forall (f :: * -> *) (p :: * -> * -> *).
(Applicative f, Choice p) =>
ErrorCode -> Optic' p f ServiceError ServiceError
Core.hasCode ErrorCode
"ThrottledException"
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (p :: * -> * -> *).
(Applicative f, Choice p) =>
Int -> Optic' p f ServiceError ServiceError
Core.hasStatus Int
400
)
ServiceError
e =
forall a. a -> Maybe a
Prelude.Just a
"throttled_exception"
| forall s a. Getting Any s a -> s -> Bool
Lens.has
( forall (f :: * -> *) (p :: * -> * -> *).
(Applicative f, Choice p) =>
ErrorCode -> Optic' p f ServiceError ServiceError
Core.hasCode ErrorCode
"Throttling"
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (p :: * -> * -> *).
(Applicative f, Choice p) =>
Int -> Optic' p f ServiceError ServiceError
Core.hasStatus Int
400
)
ServiceError
e =
forall a. a -> Maybe a
Prelude.Just a
"throttling"
| forall s a. Getting Any s a -> s -> Bool
Lens.has
( forall (f :: * -> *) (p :: * -> * -> *).
(Applicative f, Choice p) =>
ErrorCode -> Optic' p f ServiceError ServiceError
Core.hasCode ErrorCode
"ThrottlingException"
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (p :: * -> * -> *).
(Applicative f, Choice p) =>
Int -> Optic' p f ServiceError ServiceError
Core.hasStatus Int
400
)
ServiceError
e =
forall a. a -> Maybe a
Prelude.Just a
"throttling_exception"
| forall s a. Getting Any s a -> s -> Bool
Lens.has
( forall (f :: * -> *) (p :: * -> * -> *).
(Applicative f, Choice p) =>
ErrorCode -> Optic' p f ServiceError ServiceError
Core.hasCode
ErrorCode
"ProvisionedThroughputExceededException"
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (p :: * -> * -> *).
(Applicative f, Choice p) =>
Int -> Optic' p f ServiceError ServiceError
Core.hasStatus Int
400
)
ServiceError
e =
forall a. a -> Maybe a
Prelude.Just a
"throughput_exceeded"
| forall s a. Getting Any s a -> s -> Bool
Lens.has (forall (f :: * -> *) (p :: * -> * -> *).
(Applicative f, Choice p) =>
Int -> Optic' p f ServiceError ServiceError
Core.hasStatus Int
429) ServiceError
e =
forall a. a -> Maybe a
Prelude.Just a
"too_many_requests"
| Bool
Prelude.otherwise = forall a. Maybe a
Prelude.Nothing
_DataAlreadyAcceptedException :: (Core.AsError a) => Lens.Fold a Core.ServiceError
_DataAlreadyAcceptedException :: forall a. AsError a => Fold a ServiceError
_DataAlreadyAcceptedException =
forall a. AsError a => Service -> ErrorCode -> Fold a ServiceError
Core._MatchServiceError
Service
defaultService
ErrorCode
"DataAlreadyAcceptedException"
_InvalidOperationException :: (Core.AsError a) => Lens.Fold a Core.ServiceError
_InvalidOperationException :: forall a. AsError a => Fold a ServiceError
_InvalidOperationException =
forall a. AsError a => Service -> ErrorCode -> Fold a ServiceError
Core._MatchServiceError
Service
defaultService
ErrorCode
"InvalidOperationException"
_InvalidParameterException :: (Core.AsError a) => Lens.Fold a Core.ServiceError
_InvalidParameterException :: forall a. AsError a => Fold a ServiceError
_InvalidParameterException =
forall a. AsError a => Service -> ErrorCode -> Fold a ServiceError
Core._MatchServiceError
Service
defaultService
ErrorCode
"InvalidParameterException"
_InvalidSequenceTokenException :: (Core.AsError a) => Lens.Fold a Core.ServiceError
_InvalidSequenceTokenException :: forall a. AsError a => Fold a ServiceError
_InvalidSequenceTokenException =
forall a. AsError a => Service -> ErrorCode -> Fold a ServiceError
Core._MatchServiceError
Service
defaultService
ErrorCode
"InvalidSequenceTokenException"
_LimitExceededException :: (Core.AsError a) => Lens.Fold a Core.ServiceError
_LimitExceededException :: forall a. AsError a => Fold a ServiceError
_LimitExceededException =
forall a. AsError a => Service -> ErrorCode -> Fold a ServiceError
Core._MatchServiceError
Service
defaultService
ErrorCode
"LimitExceededException"
_MalformedQueryException :: (Core.AsError a) => Lens.Fold a Core.ServiceError
_MalformedQueryException :: forall a. AsError a => Fold a ServiceError
_MalformedQueryException =
forall a. AsError a => Service -> ErrorCode -> Fold a ServiceError
Core._MatchServiceError
Service
defaultService
ErrorCode
"MalformedQueryException"
_OperationAbortedException :: (Core.AsError a) => Lens.Fold a Core.ServiceError
_OperationAbortedException :: forall a. AsError a => Fold a ServiceError
_OperationAbortedException =
forall a. AsError a => Service -> ErrorCode -> Fold a ServiceError
Core._MatchServiceError
Service
defaultService
ErrorCode
"OperationAbortedException"
_ResourceAlreadyExistsException :: (Core.AsError a) => Lens.Fold a Core.ServiceError
_ResourceAlreadyExistsException :: forall a. AsError a => Fold a ServiceError
_ResourceAlreadyExistsException =
forall a. AsError a => Service -> ErrorCode -> Fold a ServiceError
Core._MatchServiceError
Service
defaultService
ErrorCode
"ResourceAlreadyExistsException"
_ResourceNotFoundException :: (Core.AsError a) => Lens.Fold a Core.ServiceError
_ResourceNotFoundException :: forall a. AsError a => Fold a ServiceError
_ResourceNotFoundException =
forall a. AsError a => Service -> ErrorCode -> Fold a ServiceError
Core._MatchServiceError
Service
defaultService
ErrorCode
"ResourceNotFoundException"
_ServiceUnavailableException :: (Core.AsError a) => Lens.Fold a Core.ServiceError
_ServiceUnavailableException :: forall a. AsError a => Fold a ServiceError
_ServiceUnavailableException =
forall a. AsError a => Service -> ErrorCode -> Fold a ServiceError
Core._MatchServiceError
Service
defaultService
ErrorCode
"ServiceUnavailableException"
_TooManyTagsException :: (Core.AsError a) => Lens.Fold a Core.ServiceError
_TooManyTagsException :: forall a. AsError a => Fold a ServiceError
_TooManyTagsException =
forall a. AsError a => Service -> ErrorCode -> Fold a ServiceError
Core._MatchServiceError
Service
defaultService
ErrorCode
"TooManyTagsException"
_UnrecognizedClientException :: (Core.AsError a) => Lens.Fold a Core.ServiceError
_UnrecognizedClientException :: forall a. AsError a => Fold a ServiceError
_UnrecognizedClientException =
forall a. AsError a => Service -> ErrorCode -> Fold a ServiceError
Core._MatchServiceError
Service
defaultService
ErrorCode
"UnrecognizedClientException"