{-# LANGUAGE DisambiguateRecordFields #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}
module Amazonka.SSMIncidents.Types
(
defaultService,
_AccessDeniedException,
_ConflictException,
_InternalServerException,
_ResourceNotFoundException,
_ServiceQuotaExceededException,
_ThrottlingException,
_ValidationException,
IncidentRecordStatus (..),
ItemType (..),
RegionStatus (..),
ReplicationSetStatus (..),
SortOrder (..),
SsmTargetAccount (..),
TimelineEventSort (..),
VariableType (..),
Action (..),
newAction,
action_ssmAutomation,
AddRegionAction (..),
newAddRegionAction,
addRegionAction_sseKmsKeyId,
addRegionAction_regionName,
AttributeValueList (..),
newAttributeValueList,
attributeValueList_integerValues,
attributeValueList_stringValues,
AutomationExecution (..),
newAutomationExecution,
automationExecution_ssmExecutionArn,
ChatChannel (..),
newChatChannel,
chatChannel_chatbotSns,
chatChannel_empty,
Condition (..),
newCondition,
condition_after,
condition_before,
condition_equals,
DeleteRegionAction (..),
newDeleteRegionAction,
deleteRegionAction_regionName,
DynamicSsmParameterValue (..),
newDynamicSsmParameterValue,
dynamicSsmParameterValue_variable,
EmptyChatChannel (..),
newEmptyChatChannel,
EventReference (..),
newEventReference,
eventReference_relatedItemId,
eventReference_resource,
EventSummary (..),
newEventSummary,
eventSummary_eventReferences,
eventSummary_eventId,
eventSummary_eventTime,
eventSummary_eventType,
eventSummary_eventUpdatedTime,
eventSummary_incidentRecordArn,
Filter (..),
newFilter,
filter_condition,
filter_key,
IncidentRecord (..),
newIncidentRecord,
incidentRecord_automationExecutions,
incidentRecord_chatChannel,
incidentRecord_notificationTargets,
incidentRecord_resolvedTime,
incidentRecord_summary,
incidentRecord_arn,
incidentRecord_creationTime,
incidentRecord_dedupeString,
incidentRecord_impact,
incidentRecord_incidentRecordSource,
incidentRecord_lastModifiedBy,
incidentRecord_lastModifiedTime,
incidentRecord_status,
incidentRecord_title,
IncidentRecordSource (..),
newIncidentRecordSource,
incidentRecordSource_invokedBy,
incidentRecordSource_resourceArn,
incidentRecordSource_createdBy,
incidentRecordSource_source,
IncidentRecordSummary (..),
newIncidentRecordSummary,
incidentRecordSummary_resolvedTime,
incidentRecordSummary_arn,
incidentRecordSummary_creationTime,
incidentRecordSummary_impact,
incidentRecordSummary_incidentRecordSource,
incidentRecordSummary_status,
incidentRecordSummary_title,
IncidentTemplate (..),
newIncidentTemplate,
incidentTemplate_dedupeString,
incidentTemplate_incidentTags,
incidentTemplate_notificationTargets,
incidentTemplate_summary,
incidentTemplate_impact,
incidentTemplate_title,
Integration (..),
newIntegration,
integration_pagerDutyConfiguration,
ItemIdentifier (..),
newItemIdentifier,
itemIdentifier_type,
itemIdentifier_value,
ItemValue (..),
newItemValue,
itemValue_arn,
itemValue_metricDefinition,
itemValue_pagerDutyIncidentDetail,
itemValue_url,
NotificationTargetItem (..),
newNotificationTargetItem,
notificationTargetItem_snsTopicArn,
PagerDutyConfiguration (..),
newPagerDutyConfiguration,
pagerDutyConfiguration_name,
pagerDutyConfiguration_pagerDutyIncidentConfiguration,
pagerDutyConfiguration_secretId,
PagerDutyIncidentConfiguration (..),
newPagerDutyIncidentConfiguration,
pagerDutyIncidentConfiguration_serviceId,
PagerDutyIncidentDetail (..),
newPagerDutyIncidentDetail,
pagerDutyIncidentDetail_autoResolve,
pagerDutyIncidentDetail_secretId,
pagerDutyIncidentDetail_id,
RegionInfo (..),
newRegionInfo,
regionInfo_sseKmsKeyId,
regionInfo_statusMessage,
regionInfo_status,
regionInfo_statusUpdateDateTime,
RegionMapInputValue (..),
newRegionMapInputValue,
regionMapInputValue_sseKmsKeyId,
RelatedItem (..),
newRelatedItem,
relatedItem_generatedId,
relatedItem_title,
relatedItem_identifier,
RelatedItemsUpdate (..),
newRelatedItemsUpdate,
relatedItemsUpdate_itemToAdd,
relatedItemsUpdate_itemToRemove,
ReplicationSet (..),
newReplicationSet,
replicationSet_arn,
replicationSet_createdBy,
replicationSet_createdTime,
replicationSet_deletionProtected,
replicationSet_lastModifiedBy,
replicationSet_lastModifiedTime,
replicationSet_regionMap,
replicationSet_status,
ResourcePolicy (..),
newResourcePolicy,
resourcePolicy_policyDocument,
resourcePolicy_policyId,
resourcePolicy_ramResourceShareRegion,
ResponsePlanSummary (..),
newResponsePlanSummary,
responsePlanSummary_displayName,
responsePlanSummary_arn,
responsePlanSummary_name,
SsmAutomation (..),
newSsmAutomation,
ssmAutomation_documentVersion,
ssmAutomation_dynamicParameters,
ssmAutomation_parameters,
ssmAutomation_targetAccount,
ssmAutomation_documentName,
ssmAutomation_roleArn,
TimelineEvent (..),
newTimelineEvent,
timelineEvent_eventReferences,
timelineEvent_eventData,
timelineEvent_eventId,
timelineEvent_eventTime,
timelineEvent_eventType,
timelineEvent_eventUpdatedTime,
timelineEvent_incidentRecordArn,
TriggerDetails (..),
newTriggerDetails,
triggerDetails_rawData,
triggerDetails_triggerArn,
triggerDetails_source,
triggerDetails_timestamp,
UpdateReplicationSetAction (..),
newUpdateReplicationSetAction,
updateReplicationSetAction_addRegionAction,
updateReplicationSetAction_deleteRegionAction,
)
where
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Prelude as Prelude
import Amazonka.SSMIncidents.Types.Action
import Amazonka.SSMIncidents.Types.AddRegionAction
import Amazonka.SSMIncidents.Types.AttributeValueList
import Amazonka.SSMIncidents.Types.AutomationExecution
import Amazonka.SSMIncidents.Types.ChatChannel
import Amazonka.SSMIncidents.Types.Condition
import Amazonka.SSMIncidents.Types.DeleteRegionAction
import Amazonka.SSMIncidents.Types.DynamicSsmParameterValue
import Amazonka.SSMIncidents.Types.EmptyChatChannel
import Amazonka.SSMIncidents.Types.EventReference
import Amazonka.SSMIncidents.Types.EventSummary
import Amazonka.SSMIncidents.Types.Filter
import Amazonka.SSMIncidents.Types.IncidentRecord
import Amazonka.SSMIncidents.Types.IncidentRecordSource
import Amazonka.SSMIncidents.Types.IncidentRecordStatus
import Amazonka.SSMIncidents.Types.IncidentRecordSummary
import Amazonka.SSMIncidents.Types.IncidentTemplate
import Amazonka.SSMIncidents.Types.Integration
import Amazonka.SSMIncidents.Types.ItemIdentifier
import Amazonka.SSMIncidents.Types.ItemType
import Amazonka.SSMIncidents.Types.ItemValue
import Amazonka.SSMIncidents.Types.NotificationTargetItem
import Amazonka.SSMIncidents.Types.PagerDutyConfiguration
import Amazonka.SSMIncidents.Types.PagerDutyIncidentConfiguration
import Amazonka.SSMIncidents.Types.PagerDutyIncidentDetail
import Amazonka.SSMIncidents.Types.RegionInfo
import Amazonka.SSMIncidents.Types.RegionMapInputValue
import Amazonka.SSMIncidents.Types.RegionStatus
import Amazonka.SSMIncidents.Types.RelatedItem
import Amazonka.SSMIncidents.Types.RelatedItemsUpdate
import Amazonka.SSMIncidents.Types.ReplicationSet
import Amazonka.SSMIncidents.Types.ReplicationSetStatus
import Amazonka.SSMIncidents.Types.ResourcePolicy
import Amazonka.SSMIncidents.Types.ResponsePlanSummary
import Amazonka.SSMIncidents.Types.SortOrder
import Amazonka.SSMIncidents.Types.SsmAutomation
import Amazonka.SSMIncidents.Types.SsmTargetAccount
import Amazonka.SSMIncidents.Types.TimelineEvent
import Amazonka.SSMIncidents.Types.TimelineEventSort
import Amazonka.SSMIncidents.Types.TriggerDetails
import Amazonka.SSMIncidents.Types.UpdateReplicationSetAction
import Amazonka.SSMIncidents.Types.VariableType
import qualified Amazonka.Sign.V4 as Sign
defaultService :: Core.Service
defaultService :: Service
defaultService =
Core.Service
{ $sel:abbrev:Service :: Abbrev
Core.abbrev = Abbrev
"SSMIncidents",
$sel:signer:Service :: Signer
Core.signer = Signer
Sign.v4,
$sel:endpointPrefix:Service :: ByteString
Core.endpointPrefix = ByteString
"ssm-incidents",
$sel:signingName:Service :: ByteString
Core.signingName = ByteString
"ssm-incidents",
$sel:version:Service :: ByteString
Core.version = ByteString
"2018-05-10",
$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
"SSMIncidents",
$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"
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
403
_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"
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
409
_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"
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
500
_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"
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
404
_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"
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
402
_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"
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
429
_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"
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