{-# LANGUAGE DisambiguateRecordFields #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}
module Amazonka.TimeStreamQuery.Types
(
defaultService,
_AccessDeniedException,
_ConflictException,
_InternalServerException,
_InvalidEndpointException,
_QueryExecutionException,
_ResourceNotFoundException,
_ServiceQuotaExceededException,
_ThrottlingException,
_ValidationException,
DimensionValueType (..),
MeasureValueType (..),
S3EncryptionOption (..),
ScalarMeasureValueType (..),
ScalarType (..),
ScheduledQueryRunStatus (..),
ScheduledQueryState (..),
ColumnInfo (..),
newColumnInfo,
columnInfo_name,
columnInfo_type,
Datum (..),
newDatum,
datum_arrayValue,
datum_nullValue,
datum_rowValue,
datum_scalarValue,
datum_timeSeriesValue,
DimensionMapping (..),
newDimensionMapping,
dimensionMapping_name,
dimensionMapping_dimensionValueType,
Endpoint (..),
newEndpoint,
endpoint_address,
endpoint_cachePeriodInMinutes,
ErrorReportConfiguration (..),
newErrorReportConfiguration,
errorReportConfiguration_s3Configuration,
ErrorReportLocation (..),
newErrorReportLocation,
errorReportLocation_s3ReportLocation,
ExecutionStats (..),
newExecutionStats,
executionStats_bytesMetered,
executionStats_dataWrites,
executionStats_executionTimeInMillis,
executionStats_queryResultRows,
executionStats_recordsIngested,
MixedMeasureMapping (..),
newMixedMeasureMapping,
mixedMeasureMapping_measureName,
mixedMeasureMapping_multiMeasureAttributeMappings,
mixedMeasureMapping_sourceColumn,
mixedMeasureMapping_targetMeasureName,
mixedMeasureMapping_measureValueType,
MultiMeasureAttributeMapping (..),
newMultiMeasureAttributeMapping,
multiMeasureAttributeMapping_targetMultiMeasureAttributeName,
multiMeasureAttributeMapping_sourceColumn,
multiMeasureAttributeMapping_measureValueType,
MultiMeasureMappings (..),
newMultiMeasureMappings,
multiMeasureMappings_targetMultiMeasureName,
multiMeasureMappings_multiMeasureAttributeMappings,
NotificationConfiguration (..),
newNotificationConfiguration,
notificationConfiguration_snsConfiguration,
ParameterMapping (..),
newParameterMapping,
parameterMapping_name,
parameterMapping_type,
QueryStatus (..),
newQueryStatus,
queryStatus_cumulativeBytesMetered,
queryStatus_cumulativeBytesScanned,
queryStatus_progressPercentage,
Row (..),
newRow,
row_data,
S3Configuration (..),
newS3Configuration,
s3Configuration_encryptionOption,
s3Configuration_objectKeyPrefix,
s3Configuration_bucketName,
S3ReportLocation (..),
newS3ReportLocation,
s3ReportLocation_bucketName,
s3ReportLocation_objectKey,
ScheduleConfiguration (..),
newScheduleConfiguration,
scheduleConfiguration_scheduleExpression,
ScheduledQuery (..),
newScheduledQuery,
scheduledQuery_creationTime,
scheduledQuery_errorReportConfiguration,
scheduledQuery_lastRunStatus,
scheduledQuery_nextInvocationTime,
scheduledQuery_previousInvocationTime,
scheduledQuery_targetDestination,
scheduledQuery_arn,
scheduledQuery_name,
scheduledQuery_state,
ScheduledQueryDescription (..),
newScheduledQueryDescription,
scheduledQueryDescription_creationTime,
scheduledQueryDescription_errorReportConfiguration,
scheduledQueryDescription_kmsKeyId,
scheduledQueryDescription_lastRunSummary,
scheduledQueryDescription_nextInvocationTime,
scheduledQueryDescription_previousInvocationTime,
scheduledQueryDescription_recentlyFailedRuns,
scheduledQueryDescription_scheduledQueryExecutionRoleArn,
scheduledQueryDescription_targetConfiguration,
scheduledQueryDescription_arn,
scheduledQueryDescription_name,
scheduledQueryDescription_queryString,
scheduledQueryDescription_state,
scheduledQueryDescription_scheduleConfiguration,
scheduledQueryDescription_notificationConfiguration,
ScheduledQueryRunSummary (..),
newScheduledQueryRunSummary,
scheduledQueryRunSummary_errorReportLocation,
scheduledQueryRunSummary_executionStats,
scheduledQueryRunSummary_failureReason,
scheduledQueryRunSummary_invocationTime,
scheduledQueryRunSummary_runStatus,
scheduledQueryRunSummary_triggerTime,
SelectColumn (..),
newSelectColumn,
selectColumn_aliased,
selectColumn_databaseName,
selectColumn_name,
selectColumn_tableName,
selectColumn_type,
SnsConfiguration (..),
newSnsConfiguration,
snsConfiguration_topicArn,
Tag (..),
newTag,
tag_key,
tag_value,
TargetConfiguration (..),
newTargetConfiguration,
targetConfiguration_timestreamConfiguration,
TargetDestination (..),
newTargetDestination,
targetDestination_timestreamDestination,
TimeSeriesDataPoint (..),
newTimeSeriesDataPoint,
timeSeriesDataPoint_time,
timeSeriesDataPoint_value,
TimestreamConfiguration (..),
newTimestreamConfiguration,
timestreamConfiguration_measureNameColumn,
timestreamConfiguration_mixedMeasureMappings,
timestreamConfiguration_multiMeasureMappings,
timestreamConfiguration_databaseName,
timestreamConfiguration_tableName,
timestreamConfiguration_timeColumn,
timestreamConfiguration_dimensionMappings,
TimestreamDestination (..),
newTimestreamDestination,
timestreamDestination_databaseName,
timestreamDestination_tableName,
Type (..),
newType,
type_arrayColumnInfo,
type_rowColumnInfo,
type_scalarType,
type_timeSeriesMeasureValueColumnInfo,
)
where
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
import Amazonka.TimeStreamQuery.Types.ColumnInfo
import Amazonka.TimeStreamQuery.Types.Datum
import Amazonka.TimeStreamQuery.Types.DimensionMapping
import Amazonka.TimeStreamQuery.Types.DimensionValueType
import Amazonka.TimeStreamQuery.Types.Endpoint
import Amazonka.TimeStreamQuery.Types.ErrorReportConfiguration
import Amazonka.TimeStreamQuery.Types.ErrorReportLocation
import Amazonka.TimeStreamQuery.Types.ExecutionStats
import Amazonka.TimeStreamQuery.Types.MeasureValueType
import Amazonka.TimeStreamQuery.Types.MixedMeasureMapping
import Amazonka.TimeStreamQuery.Types.MultiMeasureAttributeMapping
import Amazonka.TimeStreamQuery.Types.MultiMeasureMappings
import Amazonka.TimeStreamQuery.Types.NotificationConfiguration
import Amazonka.TimeStreamQuery.Types.ParameterMapping
import Amazonka.TimeStreamQuery.Types.QueryStatus
import Amazonka.TimeStreamQuery.Types.Row
import Amazonka.TimeStreamQuery.Types.S3Configuration
import Amazonka.TimeStreamQuery.Types.S3EncryptionOption
import Amazonka.TimeStreamQuery.Types.S3ReportLocation
import Amazonka.TimeStreamQuery.Types.ScalarMeasureValueType
import Amazonka.TimeStreamQuery.Types.ScalarType
import Amazonka.TimeStreamQuery.Types.ScheduleConfiguration
import Amazonka.TimeStreamQuery.Types.ScheduledQuery
import Amazonka.TimeStreamQuery.Types.ScheduledQueryDescription
import Amazonka.TimeStreamQuery.Types.ScheduledQueryRunStatus
import Amazonka.TimeStreamQuery.Types.ScheduledQueryRunSummary
import Amazonka.TimeStreamQuery.Types.ScheduledQueryState
import Amazonka.TimeStreamQuery.Types.SelectColumn
import Amazonka.TimeStreamQuery.Types.SnsConfiguration
import Amazonka.TimeStreamQuery.Types.Tag
import Amazonka.TimeStreamQuery.Types.TargetConfiguration
import Amazonka.TimeStreamQuery.Types.TargetDestination
import Amazonka.TimeStreamQuery.Types.TimeSeriesDataPoint
import Amazonka.TimeStreamQuery.Types.TimestreamConfiguration
import Amazonka.TimeStreamQuery.Types.TimestreamDestination
import Amazonka.TimeStreamQuery.Types.Type
defaultService :: Core.Service
defaultService :: Service
defaultService =
Core.Service
{ $sel:abbrev:Service :: Abbrev
Core.abbrev = Abbrev
"TimeStreamQuery",
$sel:signer:Service :: Signer
Core.signer = Signer
Sign.v4,
$sel:endpointPrefix:Service :: ByteString
Core.endpointPrefix = ByteString
"query.timestream",
$sel:signingName:Service :: ByteString
Core.signingName = ByteString
"timestream",
$sel:version:Service :: ByteString
Core.version = ByteString
"2018-11-01",
$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
"TimeStreamQuery",
$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
_AccessDeniedException :: (Core.AsError a) => Lens.Fold a Core.ServiceError
_AccessDeniedException :: forall a. AsError a => Fold a ServiceError
_AccessDeniedException =
forall a. AsError a => Service -> ErrorCode -> Fold a ServiceError
Core._MatchServiceError
Service
defaultService
ErrorCode
"AccessDeniedException"
_ConflictException :: (Core.AsError a) => Lens.Fold a Core.ServiceError
_ConflictException :: forall a. AsError a => Fold a ServiceError
_ConflictException =
forall a. AsError a => Service -> ErrorCode -> Fold a ServiceError
Core._MatchServiceError
Service
defaultService
ErrorCode
"ConflictException"
_InternalServerException :: (Core.AsError a) => Lens.Fold a Core.ServiceError
_InternalServerException :: forall a. AsError a => Fold a ServiceError
_InternalServerException =
forall a. AsError a => Service -> ErrorCode -> Fold a ServiceError
Core._MatchServiceError
Service
defaultService
ErrorCode
"InternalServerException"
_InvalidEndpointException :: (Core.AsError a) => Lens.Fold a Core.ServiceError
_InvalidEndpointException :: forall a. AsError a => Fold a ServiceError
_InvalidEndpointException =
forall a. AsError a => Service -> ErrorCode -> Fold a ServiceError
Core._MatchServiceError
Service
defaultService
ErrorCode
"InvalidEndpointException"
_QueryExecutionException :: (Core.AsError a) => Lens.Fold a Core.ServiceError
_QueryExecutionException :: forall a. AsError a => Fold a ServiceError
_QueryExecutionException =
forall a. AsError a => Service -> ErrorCode -> Fold a ServiceError
Core._MatchServiceError
Service
defaultService
ErrorCode
"QueryExecutionException"
_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"
_ServiceQuotaExceededException :: (Core.AsError a) => Lens.Fold a Core.ServiceError
_ServiceQuotaExceededException :: forall a. AsError a => Fold a ServiceError
_ServiceQuotaExceededException =
forall a. AsError a => Service -> ErrorCode -> Fold a ServiceError
Core._MatchServiceError
Service
defaultService
ErrorCode
"ServiceQuotaExceededException"
_ThrottlingException :: (Core.AsError a) => Lens.Fold a Core.ServiceError
_ThrottlingException :: forall a. AsError a => Fold a ServiceError
_ThrottlingException =
forall a. AsError a => Service -> ErrorCode -> Fold a ServiceError
Core._MatchServiceError
Service
defaultService
ErrorCode
"ThrottlingException"
_ValidationException :: (Core.AsError a) => Lens.Fold a Core.ServiceError
_ValidationException :: forall a. AsError a => Fold a ServiceError
_ValidationException =
forall a. AsError a => Service -> ErrorCode -> Fold a ServiceError
Core._MatchServiceError
Service
defaultService
ErrorCode
"ValidationException"