{-# LANGUAGE DisambiguateRecordFields #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}
module Amazonka.FIS.Types
(
defaultService,
_ConflictException,
_ResourceNotFoundException,
_ServiceQuotaExceededException,
_ValidationException,
ExperimentActionStatus (..),
ExperimentStatus (..),
Action (..),
newAction,
action_description,
action_id,
action_parameters,
action_tags,
action_targets,
ActionParameter (..),
newActionParameter,
actionParameter_description,
actionParameter_required,
ActionSummary (..),
newActionSummary,
actionSummary_description,
actionSummary_id,
actionSummary_tags,
actionSummary_targets,
ActionTarget (..),
newActionTarget,
actionTarget_resourceType,
CreateExperimentTemplateActionInput (..),
newCreateExperimentTemplateActionInput,
createExperimentTemplateActionInput_description,
createExperimentTemplateActionInput_parameters,
createExperimentTemplateActionInput_startAfter,
createExperimentTemplateActionInput_targets,
createExperimentTemplateActionInput_actionId,
CreateExperimentTemplateLogConfigurationInput (..),
newCreateExperimentTemplateLogConfigurationInput,
createExperimentTemplateLogConfigurationInput_cloudWatchLogsConfiguration,
createExperimentTemplateLogConfigurationInput_s3Configuration,
createExperimentTemplateLogConfigurationInput_logSchemaVersion,
CreateExperimentTemplateStopConditionInput (..),
newCreateExperimentTemplateStopConditionInput,
createExperimentTemplateStopConditionInput_value,
createExperimentTemplateStopConditionInput_source,
CreateExperimentTemplateTargetInput (..),
newCreateExperimentTemplateTargetInput,
createExperimentTemplateTargetInput_filters,
createExperimentTemplateTargetInput_parameters,
createExperimentTemplateTargetInput_resourceArns,
createExperimentTemplateTargetInput_resourceTags,
createExperimentTemplateTargetInput_resourceType,
createExperimentTemplateTargetInput_selectionMode,
Experiment (..),
newExperiment,
experiment_actions,
experiment_creationTime,
experiment_endTime,
experiment_experimentTemplateId,
experiment_id,
experiment_logConfiguration,
experiment_roleArn,
experiment_startTime,
experiment_state,
experiment_stopConditions,
experiment_tags,
experiment_targets,
ExperimentAction (..),
newExperimentAction,
experimentAction_actionId,
experimentAction_description,
experimentAction_endTime,
experimentAction_parameters,
experimentAction_startAfter,
experimentAction_startTime,
experimentAction_state,
experimentAction_targets,
ExperimentActionState (..),
newExperimentActionState,
experimentActionState_reason,
experimentActionState_status,
ExperimentCloudWatchLogsLogConfiguration (..),
newExperimentCloudWatchLogsLogConfiguration,
experimentCloudWatchLogsLogConfiguration_logGroupArn,
ExperimentLogConfiguration (..),
newExperimentLogConfiguration,
experimentLogConfiguration_cloudWatchLogsConfiguration,
experimentLogConfiguration_logSchemaVersion,
experimentLogConfiguration_s3Configuration,
ExperimentS3LogConfiguration (..),
newExperimentS3LogConfiguration,
experimentS3LogConfiguration_bucketName,
experimentS3LogConfiguration_prefix,
ExperimentState (..),
newExperimentState,
experimentState_reason,
experimentState_status,
ExperimentStopCondition (..),
newExperimentStopCondition,
experimentStopCondition_source,
experimentStopCondition_value,
ExperimentSummary (..),
newExperimentSummary,
experimentSummary_creationTime,
experimentSummary_experimentTemplateId,
experimentSummary_id,
experimentSummary_state,
experimentSummary_tags,
ExperimentTarget (..),
newExperimentTarget,
experimentTarget_filters,
experimentTarget_parameters,
experimentTarget_resourceArns,
experimentTarget_resourceTags,
experimentTarget_resourceType,
experimentTarget_selectionMode,
ExperimentTargetFilter (..),
newExperimentTargetFilter,
experimentTargetFilter_path,
experimentTargetFilter_values,
ExperimentTemplate (..),
newExperimentTemplate,
experimentTemplate_actions,
experimentTemplate_creationTime,
experimentTemplate_description,
experimentTemplate_id,
experimentTemplate_lastUpdateTime,
experimentTemplate_logConfiguration,
experimentTemplate_roleArn,
experimentTemplate_stopConditions,
experimentTemplate_tags,
experimentTemplate_targets,
ExperimentTemplateAction (..),
newExperimentTemplateAction,
experimentTemplateAction_actionId,
experimentTemplateAction_description,
experimentTemplateAction_parameters,
experimentTemplateAction_startAfter,
experimentTemplateAction_targets,
ExperimentTemplateCloudWatchLogsLogConfiguration (..),
newExperimentTemplateCloudWatchLogsLogConfiguration,
experimentTemplateCloudWatchLogsLogConfiguration_logGroupArn,
ExperimentTemplateCloudWatchLogsLogConfigurationInput (..),
newExperimentTemplateCloudWatchLogsLogConfigurationInput,
experimentTemplateCloudWatchLogsLogConfigurationInput_logGroupArn,
ExperimentTemplateLogConfiguration (..),
newExperimentTemplateLogConfiguration,
experimentTemplateLogConfiguration_cloudWatchLogsConfiguration,
experimentTemplateLogConfiguration_logSchemaVersion,
experimentTemplateLogConfiguration_s3Configuration,
ExperimentTemplateS3LogConfiguration (..),
newExperimentTemplateS3LogConfiguration,
experimentTemplateS3LogConfiguration_bucketName,
experimentTemplateS3LogConfiguration_prefix,
ExperimentTemplateS3LogConfigurationInput (..),
newExperimentTemplateS3LogConfigurationInput,
experimentTemplateS3LogConfigurationInput_prefix,
experimentTemplateS3LogConfigurationInput_bucketName,
ExperimentTemplateStopCondition (..),
newExperimentTemplateStopCondition,
experimentTemplateStopCondition_source,
experimentTemplateStopCondition_value,
ExperimentTemplateSummary (..),
newExperimentTemplateSummary,
experimentTemplateSummary_creationTime,
experimentTemplateSummary_description,
experimentTemplateSummary_id,
experimentTemplateSummary_lastUpdateTime,
experimentTemplateSummary_tags,
ExperimentTemplateTarget (..),
newExperimentTemplateTarget,
experimentTemplateTarget_filters,
experimentTemplateTarget_parameters,
experimentTemplateTarget_resourceArns,
experimentTemplateTarget_resourceTags,
experimentTemplateTarget_resourceType,
experimentTemplateTarget_selectionMode,
ExperimentTemplateTargetFilter (..),
newExperimentTemplateTargetFilter,
experimentTemplateTargetFilter_path,
experimentTemplateTargetFilter_values,
ExperimentTemplateTargetInputFilter (..),
newExperimentTemplateTargetInputFilter,
experimentTemplateTargetInputFilter_path,
experimentTemplateTargetInputFilter_values,
TargetResourceType (..),
newTargetResourceType,
targetResourceType_description,
targetResourceType_parameters,
targetResourceType_resourceType,
TargetResourceTypeParameter (..),
newTargetResourceTypeParameter,
targetResourceTypeParameter_description,
targetResourceTypeParameter_required,
TargetResourceTypeSummary (..),
newTargetResourceTypeSummary,
targetResourceTypeSummary_description,
targetResourceTypeSummary_resourceType,
UpdateExperimentTemplateActionInputItem (..),
newUpdateExperimentTemplateActionInputItem,
updateExperimentTemplateActionInputItem_actionId,
updateExperimentTemplateActionInputItem_description,
updateExperimentTemplateActionInputItem_parameters,
updateExperimentTemplateActionInputItem_startAfter,
updateExperimentTemplateActionInputItem_targets,
UpdateExperimentTemplateLogConfigurationInput (..),
newUpdateExperimentTemplateLogConfigurationInput,
updateExperimentTemplateLogConfigurationInput_cloudWatchLogsConfiguration,
updateExperimentTemplateLogConfigurationInput_logSchemaVersion,
updateExperimentTemplateLogConfigurationInput_s3Configuration,
UpdateExperimentTemplateStopConditionInput (..),
newUpdateExperimentTemplateStopConditionInput,
updateExperimentTemplateStopConditionInput_value,
updateExperimentTemplateStopConditionInput_source,
UpdateExperimentTemplateTargetInput (..),
newUpdateExperimentTemplateTargetInput,
updateExperimentTemplateTargetInput_filters,
updateExperimentTemplateTargetInput_parameters,
updateExperimentTemplateTargetInput_resourceArns,
updateExperimentTemplateTargetInput_resourceTags,
updateExperimentTemplateTargetInput_resourceType,
updateExperimentTemplateTargetInput_selectionMode,
)
where
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import Amazonka.FIS.Types.Action
import Amazonka.FIS.Types.ActionParameter
import Amazonka.FIS.Types.ActionSummary
import Amazonka.FIS.Types.ActionTarget
import Amazonka.FIS.Types.CreateExperimentTemplateActionInput
import Amazonka.FIS.Types.CreateExperimentTemplateLogConfigurationInput
import Amazonka.FIS.Types.CreateExperimentTemplateStopConditionInput
import Amazonka.FIS.Types.CreateExperimentTemplateTargetInput
import Amazonka.FIS.Types.Experiment
import Amazonka.FIS.Types.ExperimentAction
import Amazonka.FIS.Types.ExperimentActionState
import Amazonka.FIS.Types.ExperimentActionStatus
import Amazonka.FIS.Types.ExperimentCloudWatchLogsLogConfiguration
import Amazonka.FIS.Types.ExperimentLogConfiguration
import Amazonka.FIS.Types.ExperimentS3LogConfiguration
import Amazonka.FIS.Types.ExperimentState
import Amazonka.FIS.Types.ExperimentStatus
import Amazonka.FIS.Types.ExperimentStopCondition
import Amazonka.FIS.Types.ExperimentSummary
import Amazonka.FIS.Types.ExperimentTarget
import Amazonka.FIS.Types.ExperimentTargetFilter
import Amazonka.FIS.Types.ExperimentTemplate
import Amazonka.FIS.Types.ExperimentTemplateAction
import Amazonka.FIS.Types.ExperimentTemplateCloudWatchLogsLogConfiguration
import Amazonka.FIS.Types.ExperimentTemplateCloudWatchLogsLogConfigurationInput
import Amazonka.FIS.Types.ExperimentTemplateLogConfiguration
import Amazonka.FIS.Types.ExperimentTemplateS3LogConfiguration
import Amazonka.FIS.Types.ExperimentTemplateS3LogConfigurationInput
import Amazonka.FIS.Types.ExperimentTemplateStopCondition
import Amazonka.FIS.Types.ExperimentTemplateSummary
import Amazonka.FIS.Types.ExperimentTemplateTarget
import Amazonka.FIS.Types.ExperimentTemplateTargetFilter
import Amazonka.FIS.Types.ExperimentTemplateTargetInputFilter
import Amazonka.FIS.Types.TargetResourceType
import Amazonka.FIS.Types.TargetResourceTypeParameter
import Amazonka.FIS.Types.TargetResourceTypeSummary
import Amazonka.FIS.Types.UpdateExperimentTemplateActionInputItem
import Amazonka.FIS.Types.UpdateExperimentTemplateLogConfigurationInput
import Amazonka.FIS.Types.UpdateExperimentTemplateStopConditionInput
import Amazonka.FIS.Types.UpdateExperimentTemplateTargetInput
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
"FIS",
$sel:signer:Service :: Signer
Core.signer = Signer
Sign.v4,
$sel:endpointPrefix:Service :: ByteString
Core.endpointPrefix = ByteString
"fis",
$sel:signingName:Service :: ByteString
Core.signingName = ByteString
"fis",
$sel:version:Service :: ByteString
Core.version = ByteString
"2020-12-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
"FIS",
$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
_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
_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
_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