{-# LANGUAGE OverloadedStrings #-}
module Network.AWS.Snowball.Types
(
snowball
, _InvalidResourceException
, _UnsupportedAddressException
, _KMSRequestFailedException
, _InvalidJobStateException
, _InvalidInputCombinationException
, _InvalidNextTokenException
, _InvalidAddressException
, _ClusterLimitExceededException
, ClusterState (..)
, JobState (..)
, JobType (..)
, ShippingOption (..)
, SnowballCapacity (..)
, SnowballType (..)
, Address
, address
, aIsRestricted
, aStreet3
, aLandmark
, aPostalCode
, aCountry
, aStateOrProvince
, aStreet2
, aAddressId
, aCity
, aPhoneNumber
, aCompany
, aName
, aPrefectureOrDistrict
, aStreet1
, ClusterListEntry
, clusterListEntry
, cleClusterState
, cleClusterId
, cleCreationDate
, cleDescription
, ClusterMetadata
, clusterMetadata
, cmJobType
, cmKMSKeyARN
, cmClusterState
, cmNotification
, cmForwardingAddressId
, cmAddressId
, cmSnowballType
, cmShippingOption
, cmResources
, cmClusterId
, cmCreationDate
, cmDescription
, cmRoleARN
, DataTransfer
, dataTransfer
, dtTotalObjects
, dtTotalBytes
, dtObjectsTransferred
, dtBytesTransferred
, EventTriggerDefinition
, eventTriggerDefinition
, etdEventResourceARN
, JobListEntry
, jobListEntry
, jleJobType
, jleJobId
, jleJobState
, jleSnowballType
, jleCreationDate
, jleDescription
, jleIsMaster
, JobLogs
, jobLogs
, jlJobFailureLogURI
, jlJobCompletionReportURI
, jlJobSuccessLogURI
, JobMetadata
, jobMetadata
, jmJobType
, jmKMSKeyARN
, jmJobId
, jmJobLogInfo
, jmNotification
, jmJobState
, jmForwardingAddressId
, jmShippingDetails
, jmAddressId
, jmSnowballType
, jmDataTransferProgress
, jmResources
, jmClusterId
, jmCreationDate
, jmDescription
, jmRoleARN
, jmSnowballCapacityPreference
, JobResource
, jobResource
, jrLambdaResources
, jrS3Resources
, KeyRange
, keyRange
, krEndMarker
, krBeginMarker
, LambdaResource
, lambdaResource
, lrEventTriggers
, lrLambdaARN
, Notification
, notification
, nNotifyAll
, nSNSTopicARN
, nJobStatesToNotify
, S3Resource
, s3Resource
, srKeyRange
, srBucketARN
, Shipment
, shipment
, sStatus
, sTrackingNumber
, ShippingDetails
, shippingDetails
, sdShippingOption
, sdOutboundShipment
, sdInboundShipment
) where
import Network.AWS.Lens
import Network.AWS.Prelude
import Network.AWS.Sign.V4
import Network.AWS.Snowball.Types.Product
import Network.AWS.Snowball.Types.Sum
snowball :: Service
snowball =
Service
{ _svcAbbrev = "Snowball"
, _svcSigner = v4
, _svcPrefix = "snowball"
, _svcVersion = "2016-06-30"
, _svcEndpoint = defaultEndpoint snowball
, _svcTimeout = Just 70
, _svcCheck = statusSuccess
, _svcError = parseJSONError "Snowball"
, _svcRetry = retry
}
where
retry =
Exponential
{ _retryBase = 5.0e-2
, _retryGrowth = 2
, _retryAttempts = 5
, _retryCheck = check
}
check e
| has (hasCode "ThrottledException" . hasStatus 400) e =
Just "throttled_exception"
| has (hasStatus 429) e = Just "too_many_requests"
| has (hasCode "ThrottlingException" . hasStatus 400) e =
Just "throttling_exception"
| has (hasCode "Throttling" . hasStatus 400) e = Just "throttling"
| has (hasStatus 504) e = Just "gateway_timeout"
| has (hasCode "RequestThrottledException" . hasStatus 400) e =
Just "request_throttled_exception"
| has (hasStatus 502) e = Just "bad_gateway"
| has (hasStatus 503) e = Just "service_unavailable"
| has (hasStatus 500) e = Just "general_server_error"
| has (hasStatus 509) e = Just "limit_exceeded"
| otherwise = Nothing
_InvalidResourceException :: AsError a => Getting (First ServiceError) a ServiceError
_InvalidResourceException =
_MatchServiceError snowball "InvalidResourceException"
_UnsupportedAddressException :: AsError a => Getting (First ServiceError) a ServiceError
_UnsupportedAddressException =
_MatchServiceError snowball "UnsupportedAddressException"
_KMSRequestFailedException :: AsError a => Getting (First ServiceError) a ServiceError
_KMSRequestFailedException =
_MatchServiceError snowball "KMSRequestFailedException"
_InvalidJobStateException :: AsError a => Getting (First ServiceError) a ServiceError
_InvalidJobStateException =
_MatchServiceError snowball "InvalidJobStateException"
_InvalidInputCombinationException :: AsError a => Getting (First ServiceError) a ServiceError
_InvalidInputCombinationException =
_MatchServiceError snowball "InvalidInputCombinationException"
_InvalidNextTokenException :: AsError a => Getting (First ServiceError) a ServiceError
_InvalidNextTokenException =
_MatchServiceError snowball "InvalidNextTokenException"
_InvalidAddressException :: AsError a => Getting (First ServiceError) a ServiceError
_InvalidAddressException = _MatchServiceError snowball "InvalidAddressException"
_ClusterLimitExceededException :: AsError a => Getting (First ServiceError) a ServiceError
_ClusterLimitExceededException =
_MatchServiceError snowball "ClusterLimitExceededException"