{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}
module Amazonka.GuardDuty.Types
(
defaultService,
_InternalServerErrorException,
_BadRequestException,
AdminStatus (..),
DataSource (..),
DataSourceStatus (..),
DestinationType (..),
DetectorStatus (..),
Feedback (..),
FilterAction (..),
FindingPublishingFrequency (..),
FindingStatisticType (..),
IpSetFormat (..),
IpSetStatus (..),
OrderBy (..),
PublishingStatus (..),
ThreatIntelSetFormat (..),
ThreatIntelSetStatus (..),
UsageStatisticType (..),
AccessControlList (..),
newAccessControlList,
accessControlList_allowsPublicWriteAccess,
accessControlList_allowsPublicReadAccess,
AccessKeyDetails (..),
newAccessKeyDetails,
accessKeyDetails_principalId,
accessKeyDetails_userName,
accessKeyDetails_accessKeyId,
accessKeyDetails_userType,
AccountDetail (..),
newAccountDetail,
accountDetail_accountId,
accountDetail_email,
AccountLevelPermissions (..),
newAccountLevelPermissions,
accountLevelPermissions_blockPublicAccess,
Action (..),
newAction,
action_networkConnectionAction,
action_portProbeAction,
action_actionType,
action_dnsRequestAction,
action_awsApiCallAction,
AdminAccount (..),
newAdminAccount,
adminAccount_adminAccountId,
adminAccount_adminStatus,
AwsApiCallAction (..),
newAwsApiCallAction,
awsApiCallAction_remoteIpDetails,
awsApiCallAction_callerType,
awsApiCallAction_domainDetails,
awsApiCallAction_serviceName,
awsApiCallAction_errorCode,
awsApiCallAction_api,
BlockPublicAccess (..),
newBlockPublicAccess,
blockPublicAccess_ignorePublicAcls,
blockPublicAccess_blockPublicAcls,
blockPublicAccess_restrictPublicBuckets,
blockPublicAccess_blockPublicPolicy,
BucketLevelPermissions (..),
newBucketLevelPermissions,
bucketLevelPermissions_accessControlList,
bucketLevelPermissions_blockPublicAccess,
bucketLevelPermissions_bucketPolicy,
BucketPolicy (..),
newBucketPolicy,
bucketPolicy_allowsPublicWriteAccess,
bucketPolicy_allowsPublicReadAccess,
City (..),
newCity,
city_cityName,
CloudTrailConfigurationResult (..),
newCloudTrailConfigurationResult,
cloudTrailConfigurationResult_status,
Condition (..),
newCondition,
condition_eq,
condition_lessThan,
condition_lte,
condition_greaterThanOrEqual,
condition_lessThanOrEqual,
condition_gt,
condition_equals,
condition_neq,
condition_notEquals,
condition_lt,
condition_gte,
condition_greaterThan,
Country (..),
newCountry,
country_countryName,
country_countryCode,
DNSLogsConfigurationResult (..),
newDNSLogsConfigurationResult,
dNSLogsConfigurationResult_status,
DataSourceConfigurations (..),
newDataSourceConfigurations,
dataSourceConfigurations_s3Logs,
DataSourceConfigurationsResult (..),
newDataSourceConfigurationsResult,
dataSourceConfigurationsResult_cloudTrail,
dataSourceConfigurationsResult_dNSLogs,
dataSourceConfigurationsResult_flowLogs,
dataSourceConfigurationsResult_s3Logs,
DefaultServerSideEncryption (..),
newDefaultServerSideEncryption,
defaultServerSideEncryption_encryptionType,
defaultServerSideEncryption_kmsMasterKeyArn,
Destination (..),
newDestination,
destination_destinationId,
destination_destinationType,
destination_status,
DestinationProperties (..),
newDestinationProperties,
destinationProperties_kmsKeyArn,
destinationProperties_destinationArn,
DnsRequestAction (..),
newDnsRequestAction,
dnsRequestAction_domain,
DomainDetails (..),
newDomainDetails,
domainDetails_domain,
Evidence (..),
newEvidence,
evidence_threatIntelligenceDetails,
Finding (..),
newFinding,
finding_service,
finding_confidence,
finding_partition,
finding_title,
finding_description,
finding_accountId,
finding_arn,
finding_createdAt,
finding_id,
finding_region,
finding_resource,
finding_schemaVersion,
finding_severity,
finding_type,
finding_updatedAt,
FindingCriteria (..),
newFindingCriteria,
findingCriteria_criterion,
FindingStatistics (..),
newFindingStatistics,
findingStatistics_countBySeverity,
FlowLogsConfigurationResult (..),
newFlowLogsConfigurationResult,
flowLogsConfigurationResult_status,
GeoLocation (..),
newGeoLocation,
geoLocation_lat,
geoLocation_lon,
IamInstanceProfile (..),
newIamInstanceProfile,
iamInstanceProfile_arn,
iamInstanceProfile_id,
InstanceDetails (..),
newInstanceDetails,
instanceDetails_instanceId,
instanceDetails_platform,
instanceDetails_launchTime,
instanceDetails_networkInterfaces,
instanceDetails_outpostArn,
instanceDetails_instanceType,
instanceDetails_availabilityZone,
instanceDetails_iamInstanceProfile,
instanceDetails_imageId,
instanceDetails_productCodes,
instanceDetails_instanceState,
instanceDetails_tags,
instanceDetails_imageDescription,
Invitation (..),
newInvitation,
invitation_invitedAt,
invitation_relationshipStatus,
invitation_invitationId,
invitation_accountId,
LocalIpDetails (..),
newLocalIpDetails,
localIpDetails_ipAddressV4,
LocalPortDetails (..),
newLocalPortDetails,
localPortDetails_portName,
localPortDetails_port,
Master (..),
newMaster,
master_invitedAt,
master_relationshipStatus,
master_invitationId,
master_accountId,
Member (..),
newMember,
member_invitedAt,
member_detectorId,
member_accountId,
member_masterId,
member_email,
member_relationshipStatus,
member_updatedAt,
MemberDataSourceConfiguration (..),
newMemberDataSourceConfiguration,
memberDataSourceConfiguration_accountId,
memberDataSourceConfiguration_dataSources,
NetworkConnectionAction (..),
newNetworkConnectionAction,
networkConnectionAction_remoteIpDetails,
networkConnectionAction_protocol,
networkConnectionAction_localIpDetails,
networkConnectionAction_remotePortDetails,
networkConnectionAction_blocked,
networkConnectionAction_connectionDirection,
networkConnectionAction_localPortDetails,
NetworkInterface (..),
newNetworkInterface,
networkInterface_privateIpAddresses,
networkInterface_publicDnsName,
networkInterface_securityGroups,
networkInterface_vpcId,
networkInterface_networkInterfaceId,
networkInterface_subnetId,
networkInterface_privateIpAddress,
networkInterface_publicIp,
networkInterface_privateDnsName,
networkInterface_ipv6Addresses,
Organization (..),
newOrganization,
organization_org,
organization_asnOrg,
organization_asn,
organization_isp,
OrganizationDataSourceConfigurations (..),
newOrganizationDataSourceConfigurations,
organizationDataSourceConfigurations_s3Logs,
OrganizationDataSourceConfigurationsResult (..),
newOrganizationDataSourceConfigurationsResult,
organizationDataSourceConfigurationsResult_s3Logs,
OrganizationS3LogsConfiguration (..),
newOrganizationS3LogsConfiguration,
organizationS3LogsConfiguration_autoEnable,
OrganizationS3LogsConfigurationResult (..),
newOrganizationS3LogsConfigurationResult,
organizationS3LogsConfigurationResult_autoEnable,
Owner (..),
newOwner,
owner_id,
PermissionConfiguration (..),
newPermissionConfiguration,
permissionConfiguration_bucketLevelPermissions,
permissionConfiguration_accountLevelPermissions,
PortProbeAction (..),
newPortProbeAction,
portProbeAction_portProbeDetails,
portProbeAction_blocked,
PortProbeDetail (..),
newPortProbeDetail,
portProbeDetail_remoteIpDetails,
portProbeDetail_localIpDetails,
portProbeDetail_localPortDetails,
PrivateIpAddressDetails (..),
newPrivateIpAddressDetails,
privateIpAddressDetails_privateIpAddress,
privateIpAddressDetails_privateDnsName,
ProductCode (..),
newProductCode,
productCode_productType,
productCode_code,
PublicAccess (..),
newPublicAccess,
publicAccess_permissionConfiguration,
publicAccess_effectivePermission,
RemoteIpDetails (..),
newRemoteIpDetails,
remoteIpDetails_country,
remoteIpDetails_city,
remoteIpDetails_ipAddressV4,
remoteIpDetails_geoLocation,
remoteIpDetails_organization,
RemotePortDetails (..),
newRemotePortDetails,
remotePortDetails_portName,
remotePortDetails_port,
Resource (..),
newResource,
resource_resourceType,
resource_s3BucketDetails,
resource_instanceDetails,
resource_accessKeyDetails,
S3BucketDetail (..),
newS3BucketDetail,
s3BucketDetail_arn,
s3BucketDetail_createdAt,
s3BucketDetail_owner,
s3BucketDetail_name,
s3BucketDetail_defaultServerSideEncryption,
s3BucketDetail_publicAccess,
s3BucketDetail_type,
s3BucketDetail_tags,
S3LogsConfiguration (..),
newS3LogsConfiguration,
s3LogsConfiguration_enable,
S3LogsConfigurationResult (..),
newS3LogsConfigurationResult,
s3LogsConfigurationResult_status,
SecurityGroup (..),
newSecurityGroup,
securityGroup_groupId,
securityGroup_groupName,
ServiceInfo (..),
newServiceInfo,
serviceInfo_count,
serviceInfo_eventFirstSeen,
serviceInfo_action,
serviceInfo_detectorId,
serviceInfo_serviceName,
serviceInfo_userFeedback,
serviceInfo_evidence,
serviceInfo_eventLastSeen,
serviceInfo_resourceRole,
serviceInfo_archived,
SortCriteria (..),
newSortCriteria,
sortCriteria_orderBy,
sortCriteria_attributeName,
Tag (..),
newTag,
tag_value,
tag_key,
ThreatIntelligenceDetail (..),
newThreatIntelligenceDetail,
threatIntelligenceDetail_threatNames,
threatIntelligenceDetail_threatListName,
Total (..),
newTotal,
total_amount,
total_unit,
UnprocessedAccount (..),
newUnprocessedAccount,
unprocessedAccount_accountId,
unprocessedAccount_result,
UsageAccountResult (..),
newUsageAccountResult,
usageAccountResult_accountId,
usageAccountResult_total,
UsageCriteria (..),
newUsageCriteria,
usageCriteria_accountIds,
usageCriteria_resources,
usageCriteria_dataSources,
UsageDataSourceResult (..),
newUsageDataSourceResult,
usageDataSourceResult_total,
usageDataSourceResult_dataSource,
UsageResourceResult (..),
newUsageResourceResult,
usageResourceResult_total,
usageResourceResult_resource,
UsageStatistics (..),
newUsageStatistics,
usageStatistics_topResources,
usageStatistics_sumByResource,
usageStatistics_sumByDataSource,
usageStatistics_sumByAccount,
)
where
import qualified Amazonka.Core as Core
import Amazonka.GuardDuty.Types.AccessControlList
import Amazonka.GuardDuty.Types.AccessKeyDetails
import Amazonka.GuardDuty.Types.AccountDetail
import Amazonka.GuardDuty.Types.AccountLevelPermissions
import Amazonka.GuardDuty.Types.Action
import Amazonka.GuardDuty.Types.AdminAccount
import Amazonka.GuardDuty.Types.AdminStatus
import Amazonka.GuardDuty.Types.AwsApiCallAction
import Amazonka.GuardDuty.Types.BlockPublicAccess
import Amazonka.GuardDuty.Types.BucketLevelPermissions
import Amazonka.GuardDuty.Types.BucketPolicy
import Amazonka.GuardDuty.Types.City
import Amazonka.GuardDuty.Types.CloudTrailConfigurationResult
import Amazonka.GuardDuty.Types.Condition
import Amazonka.GuardDuty.Types.Country
import Amazonka.GuardDuty.Types.DNSLogsConfigurationResult
import Amazonka.GuardDuty.Types.DataSource
import Amazonka.GuardDuty.Types.DataSourceConfigurations
import Amazonka.GuardDuty.Types.DataSourceConfigurationsResult
import Amazonka.GuardDuty.Types.DataSourceStatus
import Amazonka.GuardDuty.Types.DefaultServerSideEncryption
import Amazonka.GuardDuty.Types.Destination
import Amazonka.GuardDuty.Types.DestinationProperties
import Amazonka.GuardDuty.Types.DestinationType
import Amazonka.GuardDuty.Types.DetectorStatus
import Amazonka.GuardDuty.Types.DnsRequestAction
import Amazonka.GuardDuty.Types.DomainDetails
import Amazonka.GuardDuty.Types.Evidence
import Amazonka.GuardDuty.Types.Feedback
import Amazonka.GuardDuty.Types.FilterAction
import Amazonka.GuardDuty.Types.Finding
import Amazonka.GuardDuty.Types.FindingCriteria
import Amazonka.GuardDuty.Types.FindingPublishingFrequency
import Amazonka.GuardDuty.Types.FindingStatisticType
import Amazonka.GuardDuty.Types.FindingStatistics
import Amazonka.GuardDuty.Types.FlowLogsConfigurationResult
import Amazonka.GuardDuty.Types.GeoLocation
import Amazonka.GuardDuty.Types.IamInstanceProfile
import Amazonka.GuardDuty.Types.InstanceDetails
import Amazonka.GuardDuty.Types.Invitation
import Amazonka.GuardDuty.Types.IpSetFormat
import Amazonka.GuardDuty.Types.IpSetStatus
import Amazonka.GuardDuty.Types.LocalIpDetails
import Amazonka.GuardDuty.Types.LocalPortDetails
import Amazonka.GuardDuty.Types.Master
import Amazonka.GuardDuty.Types.Member
import Amazonka.GuardDuty.Types.MemberDataSourceConfiguration
import Amazonka.GuardDuty.Types.NetworkConnectionAction
import Amazonka.GuardDuty.Types.NetworkInterface
import Amazonka.GuardDuty.Types.OrderBy
import Amazonka.GuardDuty.Types.Organization
import Amazonka.GuardDuty.Types.OrganizationDataSourceConfigurations
import Amazonka.GuardDuty.Types.OrganizationDataSourceConfigurationsResult
import Amazonka.GuardDuty.Types.OrganizationS3LogsConfiguration
import Amazonka.GuardDuty.Types.OrganizationS3LogsConfigurationResult
import Amazonka.GuardDuty.Types.Owner
import Amazonka.GuardDuty.Types.PermissionConfiguration
import Amazonka.GuardDuty.Types.PortProbeAction
import Amazonka.GuardDuty.Types.PortProbeDetail
import Amazonka.GuardDuty.Types.PrivateIpAddressDetails
import Amazonka.GuardDuty.Types.ProductCode
import Amazonka.GuardDuty.Types.PublicAccess
import Amazonka.GuardDuty.Types.PublishingStatus
import Amazonka.GuardDuty.Types.RemoteIpDetails
import Amazonka.GuardDuty.Types.RemotePortDetails
import Amazonka.GuardDuty.Types.Resource
import Amazonka.GuardDuty.Types.S3BucketDetail
import Amazonka.GuardDuty.Types.S3LogsConfiguration
import Amazonka.GuardDuty.Types.S3LogsConfigurationResult
import Amazonka.GuardDuty.Types.SecurityGroup
import Amazonka.GuardDuty.Types.ServiceInfo
import Amazonka.GuardDuty.Types.SortCriteria
import Amazonka.GuardDuty.Types.Tag
import Amazonka.GuardDuty.Types.ThreatIntelSetFormat
import Amazonka.GuardDuty.Types.ThreatIntelSetStatus
import Amazonka.GuardDuty.Types.ThreatIntelligenceDetail
import Amazonka.GuardDuty.Types.Total
import Amazonka.GuardDuty.Types.UnprocessedAccount
import Amazonka.GuardDuty.Types.UsageAccountResult
import Amazonka.GuardDuty.Types.UsageCriteria
import Amazonka.GuardDuty.Types.UsageDataSourceResult
import Amazonka.GuardDuty.Types.UsageResourceResult
import Amazonka.GuardDuty.Types.UsageStatisticType
import Amazonka.GuardDuty.Types.UsageStatistics
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Sign.V4 as Sign
defaultService :: Core.Service
defaultService :: Service
defaultService =
Service :: Abbrev
-> Signer
-> ByteString
-> ByteString
-> ByteString
-> (Region -> Endpoint)
-> Maybe Seconds
-> (Status -> Bool)
-> (Status -> [Header] -> ByteStringLazy -> Error)
-> Retry
-> Service
Core.Service
{ $sel:_serviceAbbrev:Service :: Abbrev
Core._serviceAbbrev = Abbrev
"GuardDuty",
$sel:_serviceSigner:Service :: Signer
Core._serviceSigner = Signer
Sign.v4,
$sel:_serviceEndpointPrefix:Service :: ByteString
Core._serviceEndpointPrefix = ByteString
"guardduty",
$sel:_serviceSigningName:Service :: ByteString
Core._serviceSigningName = ByteString
"guardduty",
$sel:_serviceVersion:Service :: ByteString
Core._serviceVersion = ByteString
"2017-11-28",
$sel:_serviceEndpoint:Service :: Region -> Endpoint
Core._serviceEndpoint =
Service -> Region -> Endpoint
Core.defaultEndpoint Service
defaultService,
$sel:_serviceTimeout:Service :: Maybe Seconds
Core._serviceTimeout = Seconds -> Maybe Seconds
forall a. a -> Maybe a
Prelude.Just Seconds
70,
$sel:_serviceCheck:Service :: Status -> Bool
Core._serviceCheck = Status -> Bool
Core.statusSuccess,
$sel:_serviceError:Service :: Status -> [Header] -> ByteStringLazy -> Error
Core._serviceError = Abbrev -> Status -> [Header] -> ByteStringLazy -> Error
Core.parseJSONError Abbrev
"GuardDuty",
$sel:_serviceRetry:Service :: Retry
Core._serviceRetry = Retry
retry
}
where
retry :: Retry
retry =
Exponential :: Double -> Int -> Int -> (ServiceError -> Maybe Text) -> Retry
Core.Exponential
{ $sel:_retryBase:Exponential :: Double
Core._retryBase = Double
5.0e-2,
$sel:_retryGrowth:Exponential :: Int
Core._retryGrowth = Int
2,
$sel:_retryAttempts:Exponential :: Int
Core._retryAttempts = Int
5,
$sel:_retryCheck:Exponential :: ServiceError -> Maybe Text
Core._retryCheck = ServiceError -> Maybe Text
forall a. IsString a => ServiceError -> Maybe a
check
}
check :: ServiceError -> Maybe a
check ServiceError
e
| Getting Any ServiceError ServiceError -> ServiceError -> Bool
forall s a. Getting Any s a -> s -> Bool
Lens.has
( ErrorCode -> Getting Any ServiceError ServiceError
forall (f :: * -> *) (p :: * -> * -> *).
(Applicative f, Choice p) =>
ErrorCode -> Optic' p f ServiceError ServiceError
Core.hasCode ErrorCode
"ThrottledException"
Getting Any ServiceError ServiceError
-> Getting Any ServiceError ServiceError
-> Getting Any ServiceError ServiceError
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. Int -> Getting Any ServiceError ServiceError
forall (f :: * -> *) (p :: * -> * -> *).
(Applicative f, Choice p) =>
Int -> Optic' p f ServiceError ServiceError
Core.hasStatus Int
400
)
ServiceError
e =
a -> Maybe a
forall a. a -> Maybe a
Prelude.Just a
"throttled_exception"
| Getting Any ServiceError ServiceError -> ServiceError -> Bool
forall s a. Getting Any s a -> s -> Bool
Lens.has (Int -> Getting Any ServiceError ServiceError
forall (f :: * -> *) (p :: * -> * -> *).
(Applicative f, Choice p) =>
Int -> Optic' p f ServiceError ServiceError
Core.hasStatus Int
429) ServiceError
e =
a -> Maybe a
forall a. a -> Maybe a
Prelude.Just a
"too_many_requests"
| Getting Any ServiceError ServiceError -> ServiceError -> Bool
forall s a. Getting Any s a -> s -> Bool
Lens.has
( ErrorCode -> Getting Any ServiceError ServiceError
forall (f :: * -> *) (p :: * -> * -> *).
(Applicative f, Choice p) =>
ErrorCode -> Optic' p f ServiceError ServiceError
Core.hasCode ErrorCode
"ThrottlingException"
Getting Any ServiceError ServiceError
-> Getting Any ServiceError ServiceError
-> Getting Any ServiceError ServiceError
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. Int -> Getting Any ServiceError ServiceError
forall (f :: * -> *) (p :: * -> * -> *).
(Applicative f, Choice p) =>
Int -> Optic' p f ServiceError ServiceError
Core.hasStatus Int
400
)
ServiceError
e =
a -> Maybe a
forall a. a -> Maybe a
Prelude.Just a
"throttling_exception"
| Getting Any ServiceError ServiceError -> ServiceError -> Bool
forall s a. Getting Any s a -> s -> Bool
Lens.has
( ErrorCode -> Getting Any ServiceError ServiceError
forall (f :: * -> *) (p :: * -> * -> *).
(Applicative f, Choice p) =>
ErrorCode -> Optic' p f ServiceError ServiceError
Core.hasCode ErrorCode
"Throttling"
Getting Any ServiceError ServiceError
-> Getting Any ServiceError ServiceError
-> Getting Any ServiceError ServiceError
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. Int -> Getting Any ServiceError ServiceError
forall (f :: * -> *) (p :: * -> * -> *).
(Applicative f, Choice p) =>
Int -> Optic' p f ServiceError ServiceError
Core.hasStatus Int
400
)
ServiceError
e =
a -> Maybe a
forall a. a -> Maybe a
Prelude.Just a
"throttling"
| Getting Any ServiceError ServiceError -> ServiceError -> Bool
forall s a. Getting Any s a -> s -> Bool
Lens.has
( ErrorCode -> Getting Any ServiceError ServiceError
forall (f :: * -> *) (p :: * -> * -> *).
(Applicative f, Choice p) =>
ErrorCode -> Optic' p f ServiceError ServiceError
Core.hasCode
ErrorCode
"ProvisionedThroughputExceededException"
Getting Any ServiceError ServiceError
-> Getting Any ServiceError ServiceError
-> Getting Any ServiceError ServiceError
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. Int -> Getting Any ServiceError ServiceError
forall (f :: * -> *) (p :: * -> * -> *).
(Applicative f, Choice p) =>
Int -> Optic' p f ServiceError ServiceError
Core.hasStatus Int
400
)
ServiceError
e =
a -> Maybe a
forall a. a -> Maybe a
Prelude.Just a
"throughput_exceeded"
| Getting Any ServiceError ServiceError -> ServiceError -> Bool
forall s a. Getting Any s a -> s -> Bool
Lens.has (Int -> Getting Any ServiceError ServiceError
forall (f :: * -> *) (p :: * -> * -> *).
(Applicative f, Choice p) =>
Int -> Optic' p f ServiceError ServiceError
Core.hasStatus Int
504) ServiceError
e =
a -> Maybe a
forall a. a -> Maybe a
Prelude.Just a
"gateway_timeout"
| Getting Any ServiceError ServiceError -> ServiceError -> Bool
forall s a. Getting Any s a -> s -> Bool
Lens.has
( ErrorCode -> Getting Any ServiceError ServiceError
forall (f :: * -> *) (p :: * -> * -> *).
(Applicative f, Choice p) =>
ErrorCode -> Optic' p f ServiceError ServiceError
Core.hasCode ErrorCode
"RequestThrottledException"
Getting Any ServiceError ServiceError
-> Getting Any ServiceError ServiceError
-> Getting Any ServiceError ServiceError
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. Int -> Getting Any ServiceError ServiceError
forall (f :: * -> *) (p :: * -> * -> *).
(Applicative f, Choice p) =>
Int -> Optic' p f ServiceError ServiceError
Core.hasStatus Int
400
)
ServiceError
e =
a -> Maybe a
forall a. a -> Maybe a
Prelude.Just a
"request_throttled_exception"
| Getting Any ServiceError ServiceError -> ServiceError -> Bool
forall s a. Getting Any s a -> s -> Bool
Lens.has (Int -> Getting Any ServiceError ServiceError
forall (f :: * -> *) (p :: * -> * -> *).
(Applicative f, Choice p) =>
Int -> Optic' p f ServiceError ServiceError
Core.hasStatus Int
502) ServiceError
e =
a -> Maybe a
forall a. a -> Maybe a
Prelude.Just a
"bad_gateway"
| Getting Any ServiceError ServiceError -> ServiceError -> Bool
forall s a. Getting Any s a -> s -> Bool
Lens.has (Int -> Getting Any ServiceError ServiceError
forall (f :: * -> *) (p :: * -> * -> *).
(Applicative f, Choice p) =>
Int -> Optic' p f ServiceError ServiceError
Core.hasStatus Int
503) ServiceError
e =
a -> Maybe a
forall a. a -> Maybe a
Prelude.Just a
"service_unavailable"
| Getting Any ServiceError ServiceError -> ServiceError -> Bool
forall s a. Getting Any s a -> s -> Bool
Lens.has (Int -> Getting Any ServiceError ServiceError
forall (f :: * -> *) (p :: * -> * -> *).
(Applicative f, Choice p) =>
Int -> Optic' p f ServiceError ServiceError
Core.hasStatus Int
500) ServiceError
e =
a -> Maybe a
forall a. a -> Maybe a
Prelude.Just a
"general_server_error"
| Getting Any ServiceError ServiceError -> ServiceError -> Bool
forall s a. Getting Any s a -> s -> Bool
Lens.has (Int -> Getting Any ServiceError ServiceError
forall (f :: * -> *) (p :: * -> * -> *).
(Applicative f, Choice p) =>
Int -> Optic' p f ServiceError ServiceError
Core.hasStatus Int
509) ServiceError
e =
a -> Maybe a
forall a. a -> Maybe a
Prelude.Just a
"limit_exceeded"
| Bool
Prelude.otherwise = Maybe a
forall a. Maybe a
Prelude.Nothing
_InternalServerErrorException :: Core.AsError a => Lens.Getting (Prelude.First Core.ServiceError) a Core.ServiceError
_InternalServerErrorException :: Getting (First ServiceError) a ServiceError
_InternalServerErrorException =
Service -> ErrorCode -> Getting (First ServiceError) a ServiceError
forall a.
AsError a =>
Service -> ErrorCode -> Getting (First ServiceError) a ServiceError
Core._MatchServiceError
Service
defaultService
ErrorCode
"InternalServerErrorException"
Getting (First ServiceError) a ServiceError
-> ((ServiceError -> Const (First ServiceError) ServiceError)
-> ServiceError -> Const (First ServiceError) ServiceError)
-> Getting (First ServiceError) a ServiceError
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. Int
-> (ServiceError -> Const (First ServiceError) ServiceError)
-> ServiceError
-> Const (First ServiceError) ServiceError
forall (f :: * -> *) (p :: * -> * -> *).
(Applicative f, Choice p) =>
Int -> Optic' p f ServiceError ServiceError
Core.hasStatus Int
500
_BadRequestException :: Core.AsError a => Lens.Getting (Prelude.First Core.ServiceError) a Core.ServiceError
_BadRequestException :: Getting (First ServiceError) a ServiceError
_BadRequestException =
Service -> ErrorCode -> Getting (First ServiceError) a ServiceError
forall a.
AsError a =>
Service -> ErrorCode -> Getting (First ServiceError) a ServiceError
Core._MatchServiceError
Service
defaultService
ErrorCode
"BadRequestException"
Getting (First ServiceError) a ServiceError
-> ((ServiceError -> Const (First ServiceError) ServiceError)
-> ServiceError -> Const (First ServiceError) ServiceError)
-> Getting (First ServiceError) a ServiceError
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. Int
-> (ServiceError -> Const (First ServiceError) ServiceError)
-> ServiceError
-> Const (First ServiceError) ServiceError
forall (f :: * -> *) (p :: * -> * -> *).
(Applicative f, Choice p) =>
Int -> Optic' p f ServiceError ServiceError
Core.hasStatus Int
400