module Network.AWS.StorageGateway.Types
(
storageGateway
, _InvalidGatewayRequestException
, _InternalServerError
, CachediSCSIVolume
, cachediSCSIVolume
, cscsivVolumeiSCSIAttributes
, cscsivVolumeStatus
, cscsivSourceSnapshotId
, cscsivVolumeARN
, cscsivVolumeProgress
, cscsivVolumeSizeInBytes
, cscsivVolumeId
, cscsivVolumeType
, ChapInfo
, chapInfo
, ciTargetARN
, ciSecretToAuthenticateInitiator
, ciInitiatorName
, ciSecretToAuthenticateTarget
, DeviceiSCSIAttributes
, deviceiSCSIAttributes
, dscsiaTargetARN
, dscsiaChapEnabled
, dscsiaNetworkInterfaceId
, dscsiaNetworkInterfacePort
, Disk
, disk
, dDiskAllocationResource
, dDiskAllocationType
, dDiskNode
, dDiskPath
, dDiskSizeInBytes
, dDiskStatus
, dDiskId
, GatewayInfo
, gatewayInfo
, giGatewayARN
, giGatewayOperationalState
, giGatewayName
, giGatewayType
, NetworkInterface
, networkInterface
, niIPv6Address
, niMACAddress
, niIPv4Address
, StorediSCSIVolume
, storediSCSIVolume
, sscsivVolumeiSCSIAttributes
, sscsivVolumeStatus
, sscsivSourceSnapshotId
, sscsivPreservedExistingData
, sscsivVolumeARN
, sscsivVolumeProgress
, sscsivVolumeSizeInBytes
, sscsivVolumeId
, sscsivVolumeDiskId
, sscsivVolumeType
, Tag
, tag
, tagKey
, tagValue
, Tape
, tape
, tTapeBarcode
, tTapeStatus
, tTapeARN
, tProgress
, tTapeSizeInBytes
, tVTLDevice
, TapeArchive
, tapeArchive
, taTapeBarcode
, taTapeStatus
, taTapeARN
, taTapeSizeInBytes
, taCompletionTime
, taRetrievedTo
, TapeRecoveryPointInfo
, tapeRecoveryPointInfo
, trpiTapeStatus
, trpiTapeRecoveryPointTime
, trpiTapeARN
, trpiTapeSizeInBytes
, VTLDevice
, vTLDevice
, vtldDeviceiSCSIAttributes
, vtldVTLDeviceVendor
, vtldVTLDeviceARN
, vtldVTLDeviceType
, vtldVTLDeviceProductIdentifier
, VolumeInfo
, volumeInfo
, viVolumeARN
, viVolumeType
, VolumeRecoveryPointInfo
, volumeRecoveryPointInfo
, vrpiVolumeRecoveryPointTime
, vrpiVolumeARN
, vrpiVolumeSizeInBytes
, vrpiVolumeUsageInBytes
, VolumeiSCSIAttributes
, volumeiSCSIAttributes
, vscsiaLunNumber
, vscsiaTargetARN
, vscsiaChapEnabled
, vscsiaNetworkInterfaceId
, vscsiaNetworkInterfacePort
) where
import Network.AWS.Lens
import Network.AWS.Prelude
import Network.AWS.Sign.V4
import Network.AWS.StorageGateway.Types.Product
import Network.AWS.StorageGateway.Types.Sum
storageGateway :: Service
storageGateway =
Service
{ _svcAbbrev = "StorageGateway"
, _svcSigner = v4
, _svcPrefix = "storagegateway"
, _svcVersion = "2013-06-30"
, _svcEndpoint = defaultEndpoint storageGateway
, _svcTimeout = Just 70
, _svcCheck = statusSuccess
, _svcError = parseJSONError "StorageGateway"
, _svcRetry = retry
}
where
retry =
Exponential
{ _retryBase = 5.0e-2
, _retryGrowth = 2
, _retryAttempts = 5
, _retryCheck = check
}
check e
| 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 (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
_InvalidGatewayRequestException :: AsError a => Getting (First ServiceError) a ServiceError
_InvalidGatewayRequestException =
_ServiceError . hasCode "InvalidGatewayRequestException"
_InternalServerError :: AsError a => Getting (First ServiceError) a ServiceError
_InternalServerError = _ServiceError . hasCode "InternalServerError"