{-# LANGUAGE DisambiguateRecordFields #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}
module Amazonka.Batch.Types
(
defaultService,
_ClientException,
_ServerException,
ArrayJobDependency (..),
AssignPublicIp (..),
CEState (..),
CEStatus (..),
CEType (..),
CRAllocationStrategy (..),
CRType (..),
CRUpdateAllocationStrategy (..),
DeviceCgroupPermission (..),
EFSAuthorizationConfigIAM (..),
EFSTransitEncryption (..),
JQState (..),
JQStatus (..),
JobDefinitionType (..),
JobStatus (..),
LogDriver (..),
OrchestrationType (..),
PlatformCapability (..),
ResourceType (..),
RetryAction (..),
ArrayProperties (..),
newArrayProperties,
arrayProperties_size,
ArrayPropertiesDetail (..),
newArrayPropertiesDetail,
arrayPropertiesDetail_index,
arrayPropertiesDetail_size,
arrayPropertiesDetail_statusSummary,
ArrayPropertiesSummary (..),
newArrayPropertiesSummary,
arrayPropertiesSummary_index,
arrayPropertiesSummary_size,
AttemptContainerDetail (..),
newAttemptContainerDetail,
attemptContainerDetail_containerInstanceArn,
attemptContainerDetail_exitCode,
attemptContainerDetail_logStreamName,
attemptContainerDetail_networkInterfaces,
attemptContainerDetail_reason,
attemptContainerDetail_taskArn,
AttemptDetail (..),
newAttemptDetail,
attemptDetail_container,
attemptDetail_startedAt,
attemptDetail_statusReason,
attemptDetail_stoppedAt,
ComputeEnvironmentDetail (..),
newComputeEnvironmentDetail,
computeEnvironmentDetail_computeResources,
computeEnvironmentDetail_containerOrchestrationType,
computeEnvironmentDetail_ecsClusterArn,
computeEnvironmentDetail_eksConfiguration,
computeEnvironmentDetail_serviceRole,
computeEnvironmentDetail_state,
computeEnvironmentDetail_status,
computeEnvironmentDetail_statusReason,
computeEnvironmentDetail_tags,
computeEnvironmentDetail_type,
computeEnvironmentDetail_unmanagedvCpus,
computeEnvironmentDetail_updatePolicy,
computeEnvironmentDetail_uuid,
computeEnvironmentDetail_computeEnvironmentName,
computeEnvironmentDetail_computeEnvironmentArn,
ComputeEnvironmentOrder (..),
newComputeEnvironmentOrder,
computeEnvironmentOrder_order,
computeEnvironmentOrder_computeEnvironment,
ComputeResource (..),
newComputeResource,
computeResource_allocationStrategy,
computeResource_bidPercentage,
computeResource_desiredvCpus,
computeResource_ec2Configuration,
computeResource_ec2KeyPair,
computeResource_imageId,
computeResource_instanceRole,
computeResource_instanceTypes,
computeResource_launchTemplate,
computeResource_minvCpus,
computeResource_placementGroup,
computeResource_securityGroupIds,
computeResource_spotIamFleetRole,
computeResource_tags,
computeResource_type,
computeResource_maxvCpus,
computeResource_subnets,
ComputeResourceUpdate (..),
newComputeResourceUpdate,
computeResourceUpdate_allocationStrategy,
computeResourceUpdate_bidPercentage,
computeResourceUpdate_desiredvCpus,
computeResourceUpdate_ec2Configuration,
computeResourceUpdate_ec2KeyPair,
computeResourceUpdate_imageId,
computeResourceUpdate_instanceRole,
computeResourceUpdate_instanceTypes,
computeResourceUpdate_launchTemplate,
computeResourceUpdate_maxvCpus,
computeResourceUpdate_minvCpus,
computeResourceUpdate_placementGroup,
computeResourceUpdate_securityGroupIds,
computeResourceUpdate_subnets,
computeResourceUpdate_tags,
computeResourceUpdate_type,
computeResourceUpdate_updateToLatestImageVersion,
ContainerDetail (..),
newContainerDetail,
containerDetail_command,
containerDetail_containerInstanceArn,
containerDetail_environment,
containerDetail_executionRoleArn,
containerDetail_exitCode,
containerDetail_fargatePlatformConfiguration,
containerDetail_image,
containerDetail_instanceType,
containerDetail_jobRoleArn,
containerDetail_linuxParameters,
containerDetail_logConfiguration,
containerDetail_logStreamName,
containerDetail_memory,
containerDetail_mountPoints,
containerDetail_networkConfiguration,
containerDetail_networkInterfaces,
containerDetail_privileged,
containerDetail_readonlyRootFilesystem,
containerDetail_reason,
containerDetail_resourceRequirements,
containerDetail_secrets,
containerDetail_taskArn,
containerDetail_ulimits,
containerDetail_user,
containerDetail_vcpus,
containerDetail_volumes,
ContainerOverrides (..),
newContainerOverrides,
containerOverrides_command,
containerOverrides_environment,
containerOverrides_instanceType,
containerOverrides_memory,
containerOverrides_resourceRequirements,
containerOverrides_vcpus,
ContainerProperties (..),
newContainerProperties,
containerProperties_command,
containerProperties_environment,
containerProperties_executionRoleArn,
containerProperties_fargatePlatformConfiguration,
containerProperties_image,
containerProperties_instanceType,
containerProperties_jobRoleArn,
containerProperties_linuxParameters,
containerProperties_logConfiguration,
containerProperties_memory,
containerProperties_mountPoints,
containerProperties_networkConfiguration,
containerProperties_privileged,
containerProperties_readonlyRootFilesystem,
containerProperties_resourceRequirements,
containerProperties_secrets,
containerProperties_ulimits,
containerProperties_user,
containerProperties_vcpus,
containerProperties_volumes,
ContainerSummary (..),
newContainerSummary,
containerSummary_exitCode,
containerSummary_reason,
Device (..),
newDevice,
device_containerPath,
device_permissions,
device_hostPath,
EFSAuthorizationConfig (..),
newEFSAuthorizationConfig,
eFSAuthorizationConfig_accessPointId,
eFSAuthorizationConfig_iam,
EFSVolumeConfiguration (..),
newEFSVolumeConfiguration,
eFSVolumeConfiguration_authorizationConfig,
eFSVolumeConfiguration_rootDirectory,
eFSVolumeConfiguration_transitEncryption,
eFSVolumeConfiguration_transitEncryptionPort,
eFSVolumeConfiguration_fileSystemId,
Ec2Configuration (..),
newEc2Configuration,
ec2Configuration_imageIdOverride,
ec2Configuration_imageKubernetesVersion,
ec2Configuration_imageType,
EksAttemptContainerDetail (..),
newEksAttemptContainerDetail,
eksAttemptContainerDetail_exitCode,
eksAttemptContainerDetail_reason,
EksAttemptDetail (..),
newEksAttemptDetail,
eksAttemptDetail_containers,
eksAttemptDetail_nodeName,
eksAttemptDetail_podName,
eksAttemptDetail_startedAt,
eksAttemptDetail_statusReason,
eksAttemptDetail_stoppedAt,
EksConfiguration (..),
newEksConfiguration,
eksConfiguration_eksClusterArn,
eksConfiguration_kubernetesNamespace,
EksContainer (..),
newEksContainer,
eksContainer_args,
eksContainer_command,
eksContainer_env,
eksContainer_imagePullPolicy,
eksContainer_name,
eksContainer_resources,
eksContainer_securityContext,
eksContainer_volumeMounts,
eksContainer_image,
EksContainerDetail (..),
newEksContainerDetail,
eksContainerDetail_args,
eksContainerDetail_command,
eksContainerDetail_env,
eksContainerDetail_exitCode,
eksContainerDetail_image,
eksContainerDetail_imagePullPolicy,
eksContainerDetail_name,
eksContainerDetail_reason,
eksContainerDetail_resources,
eksContainerDetail_securityContext,
eksContainerDetail_volumeMounts,
EksContainerEnvironmentVariable (..),
newEksContainerEnvironmentVariable,
eksContainerEnvironmentVariable_value,
eksContainerEnvironmentVariable_name,
EksContainerOverride (..),
newEksContainerOverride,
eksContainerOverride_args,
eksContainerOverride_command,
eksContainerOverride_env,
eksContainerOverride_image,
eksContainerOverride_resources,
EksContainerResourceRequirements (..),
newEksContainerResourceRequirements,
eksContainerResourceRequirements_limits,
eksContainerResourceRequirements_requests,
EksContainerSecurityContext (..),
newEksContainerSecurityContext,
eksContainerSecurityContext_privileged,
eksContainerSecurityContext_readOnlyRootFilesystem,
eksContainerSecurityContext_runAsGroup,
eksContainerSecurityContext_runAsNonRoot,
eksContainerSecurityContext_runAsUser,
EksContainerVolumeMount (..),
newEksContainerVolumeMount,
eksContainerVolumeMount_mountPath,
eksContainerVolumeMount_name,
eksContainerVolumeMount_readOnly,
EksEmptyDir (..),
newEksEmptyDir,
eksEmptyDir_medium,
eksEmptyDir_sizeLimit,
EksHostPath (..),
newEksHostPath,
eksHostPath_path,
EksPodProperties (..),
newEksPodProperties,
eksPodProperties_containers,
eksPodProperties_dnsPolicy,
eksPodProperties_hostNetwork,
eksPodProperties_serviceAccountName,
eksPodProperties_volumes,
EksPodPropertiesDetail (..),
newEksPodPropertiesDetail,
eksPodPropertiesDetail_containers,
eksPodPropertiesDetail_dnsPolicy,
eksPodPropertiesDetail_hostNetwork,
eksPodPropertiesDetail_nodeName,
eksPodPropertiesDetail_podName,
eksPodPropertiesDetail_serviceAccountName,
eksPodPropertiesDetail_volumes,
EksPodPropertiesOverride (..),
newEksPodPropertiesOverride,
eksPodPropertiesOverride_containers,
EksProperties (..),
newEksProperties,
eksProperties_podProperties,
EksPropertiesDetail (..),
newEksPropertiesDetail,
eksPropertiesDetail_podProperties,
EksPropertiesOverride (..),
newEksPropertiesOverride,
eksPropertiesOverride_podProperties,
EksSecret (..),
newEksSecret,
eksSecret_optional,
eksSecret_secretName,
EksVolume (..),
newEksVolume,
eksVolume_emptyDir,
eksVolume_hostPath,
eksVolume_secret,
eksVolume_name,
EvaluateOnExit (..),
newEvaluateOnExit,
evaluateOnExit_onExitCode,
evaluateOnExit_onReason,
evaluateOnExit_onStatusReason,
evaluateOnExit_action,
FairsharePolicy (..),
newFairsharePolicy,
fairsharePolicy_computeReservation,
fairsharePolicy_shareDecaySeconds,
fairsharePolicy_shareDistribution,
FargatePlatformConfiguration (..),
newFargatePlatformConfiguration,
fargatePlatformConfiguration_platformVersion,
Host (..),
newHost,
host_sourcePath,
JobDefinition (..),
newJobDefinition,
jobDefinition_containerOrchestrationType,
jobDefinition_containerProperties,
jobDefinition_eksProperties,
jobDefinition_nodeProperties,
jobDefinition_parameters,
jobDefinition_platformCapabilities,
jobDefinition_propagateTags,
jobDefinition_retryStrategy,
jobDefinition_schedulingPriority,
jobDefinition_status,
jobDefinition_tags,
jobDefinition_timeout,
jobDefinition_jobDefinitionName,
jobDefinition_jobDefinitionArn,
jobDefinition_revision,
jobDefinition_type,
JobDependency (..),
newJobDependency,
jobDependency_jobId,
jobDependency_type,
JobDetail (..),
newJobDetail,
jobDetail_arrayProperties,
jobDetail_attempts,
jobDetail_container,
jobDetail_createdAt,
jobDetail_dependsOn,
jobDetail_eksAttempts,
jobDetail_eksProperties,
jobDetail_isCancelled,
jobDetail_isTerminated,
jobDetail_jobArn,
jobDetail_nodeDetails,
jobDetail_nodeProperties,
jobDetail_parameters,
jobDetail_platformCapabilities,
jobDetail_propagateTags,
jobDetail_retryStrategy,
jobDetail_schedulingPriority,
jobDetail_shareIdentifier,
jobDetail_startedAt,
jobDetail_statusReason,
jobDetail_stoppedAt,
jobDetail_tags,
jobDetail_timeout,
jobDetail_jobName,
jobDetail_jobId,
jobDetail_jobQueue,
jobDetail_status,
jobDetail_jobDefinition,
JobQueueDetail (..),
newJobQueueDetail,
jobQueueDetail_schedulingPolicyArn,
jobQueueDetail_status,
jobQueueDetail_statusReason,
jobQueueDetail_tags,
jobQueueDetail_jobQueueName,
jobQueueDetail_jobQueueArn,
jobQueueDetail_state,
jobQueueDetail_priority,
jobQueueDetail_computeEnvironmentOrder,
JobSummary (..),
newJobSummary,
jobSummary_arrayProperties,
jobSummary_container,
jobSummary_createdAt,
jobSummary_jobArn,
jobSummary_jobDefinition,
jobSummary_nodeProperties,
jobSummary_startedAt,
jobSummary_status,
jobSummary_statusReason,
jobSummary_stoppedAt,
jobSummary_jobId,
jobSummary_jobName,
JobTimeout (..),
newJobTimeout,
jobTimeout_attemptDurationSeconds,
KeyValuePair (..),
newKeyValuePair,
keyValuePair_name,
keyValuePair_value,
KeyValuesPair (..),
newKeyValuesPair,
keyValuesPair_name,
keyValuesPair_values,
LaunchTemplateSpecification (..),
newLaunchTemplateSpecification,
launchTemplateSpecification_launchTemplateId,
launchTemplateSpecification_launchTemplateName,
launchTemplateSpecification_version,
LinuxParameters (..),
newLinuxParameters,
linuxParameters_devices,
linuxParameters_initProcessEnabled,
linuxParameters_maxSwap,
linuxParameters_sharedMemorySize,
linuxParameters_swappiness,
linuxParameters_tmpfs,
LogConfiguration (..),
newLogConfiguration,
logConfiguration_options,
logConfiguration_secretOptions,
logConfiguration_logDriver,
MountPoint (..),
newMountPoint,
mountPoint_containerPath,
mountPoint_readOnly,
mountPoint_sourceVolume,
NetworkConfiguration (..),
newNetworkConfiguration,
networkConfiguration_assignPublicIp,
NetworkInterface (..),
newNetworkInterface,
networkInterface_attachmentId,
networkInterface_ipv6Address,
networkInterface_privateIpv4Address,
NodeDetails (..),
newNodeDetails,
nodeDetails_isMainNode,
nodeDetails_nodeIndex,
NodeOverrides (..),
newNodeOverrides,
nodeOverrides_nodePropertyOverrides,
nodeOverrides_numNodes,
NodeProperties (..),
newNodeProperties,
nodeProperties_numNodes,
nodeProperties_mainNode,
nodeProperties_nodeRangeProperties,
NodePropertiesSummary (..),
newNodePropertiesSummary,
nodePropertiesSummary_isMainNode,
nodePropertiesSummary_nodeIndex,
nodePropertiesSummary_numNodes,
NodePropertyOverride (..),
newNodePropertyOverride,
nodePropertyOverride_containerOverrides,
nodePropertyOverride_targetNodes,
NodeRangeProperty (..),
newNodeRangeProperty,
nodeRangeProperty_container,
nodeRangeProperty_targetNodes,
ResourceRequirement (..),
newResourceRequirement,
resourceRequirement_value,
resourceRequirement_type,
RetryStrategy (..),
newRetryStrategy,
retryStrategy_attempts,
retryStrategy_evaluateOnExit,
SchedulingPolicyDetail (..),
newSchedulingPolicyDetail,
schedulingPolicyDetail_fairsharePolicy,
schedulingPolicyDetail_tags,
schedulingPolicyDetail_name,
schedulingPolicyDetail_arn,
SchedulingPolicyListingDetail (..),
newSchedulingPolicyListingDetail,
schedulingPolicyListingDetail_arn,
Secret (..),
newSecret,
secret_name,
secret_valueFrom,
ShareAttributes (..),
newShareAttributes,
shareAttributes_weightFactor,
shareAttributes_shareIdentifier,
Tmpfs (..),
newTmpfs,
tmpfs_mountOptions,
tmpfs_containerPath,
tmpfs_size,
Ulimit (..),
newUlimit,
ulimit_hardLimit,
ulimit_name,
ulimit_softLimit,
UpdatePolicy (..),
newUpdatePolicy,
updatePolicy_jobExecutionTimeoutMinutes,
updatePolicy_terminateJobsOnUpdate,
Volume (..),
newVolume,
volume_efsVolumeConfiguration,
volume_host,
volume_name,
)
where
import Amazonka.Batch.Types.ArrayJobDependency
import Amazonka.Batch.Types.ArrayProperties
import Amazonka.Batch.Types.ArrayPropertiesDetail
import Amazonka.Batch.Types.ArrayPropertiesSummary
import Amazonka.Batch.Types.AssignPublicIp
import Amazonka.Batch.Types.AttemptContainerDetail
import Amazonka.Batch.Types.AttemptDetail
import Amazonka.Batch.Types.CEState
import Amazonka.Batch.Types.CEStatus
import Amazonka.Batch.Types.CEType
import Amazonka.Batch.Types.CRAllocationStrategy
import Amazonka.Batch.Types.CRType
import Amazonka.Batch.Types.CRUpdateAllocationStrategy
import Amazonka.Batch.Types.ComputeEnvironmentDetail
import Amazonka.Batch.Types.ComputeEnvironmentOrder
import Amazonka.Batch.Types.ComputeResource
import Amazonka.Batch.Types.ComputeResourceUpdate
import Amazonka.Batch.Types.ContainerDetail
import Amazonka.Batch.Types.ContainerOverrides
import Amazonka.Batch.Types.ContainerProperties
import Amazonka.Batch.Types.ContainerSummary
import Amazonka.Batch.Types.Device
import Amazonka.Batch.Types.DeviceCgroupPermission
import Amazonka.Batch.Types.EFSAuthorizationConfig
import Amazonka.Batch.Types.EFSAuthorizationConfigIAM
import Amazonka.Batch.Types.EFSTransitEncryption
import Amazonka.Batch.Types.EFSVolumeConfiguration
import Amazonka.Batch.Types.Ec2Configuration
import Amazonka.Batch.Types.EksAttemptContainerDetail
import Amazonka.Batch.Types.EksAttemptDetail
import Amazonka.Batch.Types.EksConfiguration
import Amazonka.Batch.Types.EksContainer
import Amazonka.Batch.Types.EksContainerDetail
import Amazonka.Batch.Types.EksContainerEnvironmentVariable
import Amazonka.Batch.Types.EksContainerOverride
import Amazonka.Batch.Types.EksContainerResourceRequirements
import Amazonka.Batch.Types.EksContainerSecurityContext
import Amazonka.Batch.Types.EksContainerVolumeMount
import Amazonka.Batch.Types.EksEmptyDir
import Amazonka.Batch.Types.EksHostPath
import Amazonka.Batch.Types.EksPodProperties
import Amazonka.Batch.Types.EksPodPropertiesDetail
import Amazonka.Batch.Types.EksPodPropertiesOverride
import Amazonka.Batch.Types.EksProperties
import Amazonka.Batch.Types.EksPropertiesDetail
import Amazonka.Batch.Types.EksPropertiesOverride
import Amazonka.Batch.Types.EksSecret
import Amazonka.Batch.Types.EksVolume
import Amazonka.Batch.Types.EvaluateOnExit
import Amazonka.Batch.Types.FairsharePolicy
import Amazonka.Batch.Types.FargatePlatformConfiguration
import Amazonka.Batch.Types.Host
import Amazonka.Batch.Types.JQState
import Amazonka.Batch.Types.JQStatus
import Amazonka.Batch.Types.JobDefinition
import Amazonka.Batch.Types.JobDefinitionType
import Amazonka.Batch.Types.JobDependency
import Amazonka.Batch.Types.JobDetail
import Amazonka.Batch.Types.JobQueueDetail
import Amazonka.Batch.Types.JobStatus
import Amazonka.Batch.Types.JobSummary
import Amazonka.Batch.Types.JobTimeout
import Amazonka.Batch.Types.KeyValuePair
import Amazonka.Batch.Types.KeyValuesPair
import Amazonka.Batch.Types.LaunchTemplateSpecification
import Amazonka.Batch.Types.LinuxParameters
import Amazonka.Batch.Types.LogConfiguration
import Amazonka.Batch.Types.LogDriver
import Amazonka.Batch.Types.MountPoint
import Amazonka.Batch.Types.NetworkConfiguration
import Amazonka.Batch.Types.NetworkInterface
import Amazonka.Batch.Types.NodeDetails
import Amazonka.Batch.Types.NodeOverrides
import Amazonka.Batch.Types.NodeProperties
import Amazonka.Batch.Types.NodePropertiesSummary
import Amazonka.Batch.Types.NodePropertyOverride
import Amazonka.Batch.Types.NodeRangeProperty
import Amazonka.Batch.Types.OrchestrationType
import Amazonka.Batch.Types.PlatformCapability
import Amazonka.Batch.Types.ResourceRequirement
import Amazonka.Batch.Types.ResourceType
import Amazonka.Batch.Types.RetryAction
import Amazonka.Batch.Types.RetryStrategy
import Amazonka.Batch.Types.SchedulingPolicyDetail
import Amazonka.Batch.Types.SchedulingPolicyListingDetail
import Amazonka.Batch.Types.Secret
import Amazonka.Batch.Types.ShareAttributes
import Amazonka.Batch.Types.Tmpfs
import Amazonka.Batch.Types.Ulimit
import Amazonka.Batch.Types.UpdatePolicy
import Amazonka.Batch.Types.Volume
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
"Batch",
$sel:signer:Service :: Signer
Core.signer = Signer
Sign.v4,
$sel:endpointPrefix:Service :: ByteString
Core.endpointPrefix = ByteString
"batch",
$sel:signingName:Service :: ByteString
Core.signingName = ByteString
"batch",
$sel:version:Service :: ByteString
Core.version = ByteString
"2016-08-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
"Batch",
$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
_ClientException :: (Core.AsError a) => Lens.Fold a Core.ServiceError
_ClientException :: forall a. AsError a => Fold a ServiceError
_ClientException =
forall a. AsError a => Service -> ErrorCode -> Fold a ServiceError
Core._MatchServiceError
Service
defaultService
ErrorCode
"ClientException"
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
_ServerException :: (Core.AsError a) => Lens.Fold a Core.ServiceError
_ServerException :: forall a. AsError a => Fold a ServiceError
_ServerException =
forall a. AsError a => Service -> ErrorCode -> Fold a ServiceError
Core._MatchServiceError
Service
defaultService
ErrorCode
"ServerException"
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