{-# LANGUAGE DisambiguateRecordFields #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}
module Amazonka.AWSHealth.Types
(
defaultService,
_ConcurrentModificationException,
_InvalidPaginationToken,
_UnsupportedLocale,
EntityStatusCode (..),
EventAggregateField (..),
EventScopeCode (..),
EventStatusCode (..),
EventTypeCategory (..),
AffectedEntity (..),
newAffectedEntity,
affectedEntity_awsAccountId,
affectedEntity_entityArn,
affectedEntity_entityUrl,
affectedEntity_entityValue,
affectedEntity_eventArn,
affectedEntity_lastUpdatedTime,
affectedEntity_statusCode,
affectedEntity_tags,
DateTimeRange (..),
newDateTimeRange,
dateTimeRange_from,
dateTimeRange_to,
EntityAggregate (..),
newEntityAggregate,
entityAggregate_count,
entityAggregate_eventArn,
EntityFilter (..),
newEntityFilter,
entityFilter_entityArns,
entityFilter_entityValues,
entityFilter_lastUpdatedTimes,
entityFilter_statusCodes,
entityFilter_tags,
entityFilter_eventArns,
Event (..),
newEvent,
event_arn,
event_availabilityZone,
event_endTime,
event_eventScopeCode,
event_eventTypeCategory,
event_eventTypeCode,
event_lastUpdatedTime,
event_region,
event_service,
event_startTime,
event_statusCode,
EventAccountFilter (..),
newEventAccountFilter,
eventAccountFilter_awsAccountId,
eventAccountFilter_eventArn,
EventAggregate (..),
newEventAggregate,
eventAggregate_aggregateValue,
eventAggregate_count,
EventDescription (..),
newEventDescription,
eventDescription_latestDescription,
EventDetails (..),
newEventDetails,
eventDetails_event,
eventDetails_eventDescription,
eventDetails_eventMetadata,
EventDetailsErrorItem (..),
newEventDetailsErrorItem,
eventDetailsErrorItem_errorMessage,
eventDetailsErrorItem_errorName,
eventDetailsErrorItem_eventArn,
EventFilter (..),
newEventFilter,
eventFilter_availabilityZones,
eventFilter_endTimes,
eventFilter_entityArns,
eventFilter_entityValues,
eventFilter_eventArns,
eventFilter_eventStatusCodes,
eventFilter_eventTypeCategories,
eventFilter_eventTypeCodes,
eventFilter_lastUpdatedTimes,
eventFilter_regions,
eventFilter_services,
eventFilter_startTimes,
eventFilter_tags,
EventType (..),
newEventType,
eventType_category,
eventType_code,
eventType_service,
EventTypeFilter (..),
newEventTypeFilter,
eventTypeFilter_eventTypeCategories,
eventTypeFilter_eventTypeCodes,
eventTypeFilter_services,
OrganizationAffectedEntitiesErrorItem (..),
newOrganizationAffectedEntitiesErrorItem,
organizationAffectedEntitiesErrorItem_awsAccountId,
organizationAffectedEntitiesErrorItem_errorMessage,
organizationAffectedEntitiesErrorItem_errorName,
organizationAffectedEntitiesErrorItem_eventArn,
OrganizationEvent (..),
newOrganizationEvent,
organizationEvent_arn,
organizationEvent_endTime,
organizationEvent_eventScopeCode,
organizationEvent_eventTypeCategory,
organizationEvent_eventTypeCode,
organizationEvent_lastUpdatedTime,
organizationEvent_region,
organizationEvent_service,
organizationEvent_startTime,
organizationEvent_statusCode,
OrganizationEventDetails (..),
newOrganizationEventDetails,
organizationEventDetails_awsAccountId,
organizationEventDetails_event,
organizationEventDetails_eventDescription,
organizationEventDetails_eventMetadata,
OrganizationEventDetailsErrorItem (..),
newOrganizationEventDetailsErrorItem,
organizationEventDetailsErrorItem_awsAccountId,
organizationEventDetailsErrorItem_errorMessage,
organizationEventDetailsErrorItem_errorName,
organizationEventDetailsErrorItem_eventArn,
OrganizationEventFilter (..),
newOrganizationEventFilter,
organizationEventFilter_awsAccountIds,
organizationEventFilter_endTime,
organizationEventFilter_entityArns,
organizationEventFilter_entityValues,
organizationEventFilter_eventStatusCodes,
organizationEventFilter_eventTypeCategories,
organizationEventFilter_eventTypeCodes,
organizationEventFilter_lastUpdatedTime,
organizationEventFilter_regions,
organizationEventFilter_services,
organizationEventFilter_startTime,
)
where
import Amazonka.AWSHealth.Types.AffectedEntity
import Amazonka.AWSHealth.Types.DateTimeRange
import Amazonka.AWSHealth.Types.EntityAggregate
import Amazonka.AWSHealth.Types.EntityFilter
import Amazonka.AWSHealth.Types.EntityStatusCode
import Amazonka.AWSHealth.Types.Event
import Amazonka.AWSHealth.Types.EventAccountFilter
import Amazonka.AWSHealth.Types.EventAggregate
import Amazonka.AWSHealth.Types.EventAggregateField
import Amazonka.AWSHealth.Types.EventDescription
import Amazonka.AWSHealth.Types.EventDetails
import Amazonka.AWSHealth.Types.EventDetailsErrorItem
import Amazonka.AWSHealth.Types.EventFilter
import Amazonka.AWSHealth.Types.EventScopeCode
import Amazonka.AWSHealth.Types.EventStatusCode
import Amazonka.AWSHealth.Types.EventType
import Amazonka.AWSHealth.Types.EventTypeCategory
import Amazonka.AWSHealth.Types.EventTypeFilter
import Amazonka.AWSHealth.Types.OrganizationAffectedEntitiesErrorItem
import Amazonka.AWSHealth.Types.OrganizationEvent
import Amazonka.AWSHealth.Types.OrganizationEventDetails
import Amazonka.AWSHealth.Types.OrganizationEventDetailsErrorItem
import Amazonka.AWSHealth.Types.OrganizationEventFilter
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
"AWSHealth",
$sel:signer:Service :: Signer
Core.signer = Signer
Sign.v4,
$sel:endpointPrefix:Service :: ByteString
Core.endpointPrefix = ByteString
"health",
$sel:signingName:Service :: ByteString
Core.signingName = ByteString
"health",
$sel:version:Service :: ByteString
Core.version = ByteString
"2016-08-04",
$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
"AWSHealth",
$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
_ConcurrentModificationException :: (Core.AsError a) => Lens.Fold a Core.ServiceError
_ConcurrentModificationException :: forall a. AsError a => Fold a ServiceError
_ConcurrentModificationException =
forall a. AsError a => Service -> ErrorCode -> Fold a ServiceError
Core._MatchServiceError
Service
defaultService
ErrorCode
"ConcurrentModificationException"
_InvalidPaginationToken :: (Core.AsError a) => Lens.Fold a Core.ServiceError
=
forall a. AsError a => Service -> ErrorCode -> Fold a ServiceError
Core._MatchServiceError
Service
defaultService
ErrorCode
"InvalidPaginationToken"
_UnsupportedLocale :: (Core.AsError a) => Lens.Fold a Core.ServiceError
_UnsupportedLocale :: forall a. AsError a => Fold a ServiceError
_UnsupportedLocale =
forall a. AsError a => Service -> ErrorCode -> Fold a ServiceError
Core._MatchServiceError
Service
defaultService
ErrorCode
"UnsupportedLocale"