module Network.AWS.Lightsail.Types
(
lightsail
, _AccessDeniedException
, _AccountSetupInProgressException
, _NotFoundException
, _OperationFailureException
, _ServiceException
, _UnauthenticatedException
, _InvalidInputException
, AccessDirection (..)
, BlueprintType (..)
, InstanceAccessProtocol (..)
, InstanceMetricName (..)
, InstancePlatform (..)
, InstanceSnapshotState (..)
, MetricStatistic (..)
, MetricUnit (..)
, NetworkProtocol (..)
, OperationStatus (..)
, OperationType (..)
, PortAccessType (..)
, PortState (..)
, RegionName (..)
, ResourceType (..)
, AvailabilityZone
, availabilityZone
, azState
, azZoneName
, Blueprint
, blueprint
, bVersionCode
, bPlatform
, bGroup
, bMinPower
, bProductURL
, bLicenseURL
, bName
, bVersion
, bBlueprintId
, bType
, bIsActive
, bDescription
, Bundle
, bundle
, bunCpuCount
, bunTransferPerMonthInGb
, bunBundleId
, bunInstanceType
, bunName
, bunPower
, bunDiskSizeInGb
, bunSupportedPlatforms
, bunPrice
, bunIsActive
, bunRamSizeInGb
, Disk
, disk
, dResourceType
, dArn
, dPath
, dCreatedAt
, dLocation
, dIops
, dIsAttached
, dAttachmentState
, dName
, dSizeInGb
, dSupportCode
, dIsSystemDisk
, dAttachedTo
, dGbInUse
, Domain
, domain
, domResourceType
, domDomainEntries
, domArn
, domCreatedAt
, domLocation
, domName
, domSupportCode
, DomainEntry
, domainEntry
, deName
, deId
, deOptions
, deType
, deTarget
, Instance
, instance'
, iState
, iIpv6Address
, iResourceType
, iArn
, iCreatedAt
, iLocation
, iSshKeyName
, iUsername
, iNetworking
, iBundleId
, iName
, iSupportCode
, iBlueprintId
, iPrivateIPAddress
, iBlueprintName
, iIsStaticIP
, iPublicIPAddress
, iHardware
, InstanceAccessDetails
, instanceAccessDetails
, iadCertKey
, iadIpAddress
, iadPrivateKey
, iadExpiresAt
, iadUsername
, iadProtocol
, iadPasswordData
, iadPassword
, iadInstanceName
, InstanceHardware
, instanceHardware
, ihCpuCount
, ihDisks
, ihRamSizeInGb
, InstanceNetworking
, instanceNetworking
, inMonthlyTransfer
, inPorts
, InstancePortInfo
, instancePortInfo
, ipiFromPort
, ipiCommonName
, ipiProtocol
, ipiAccessDirection
, ipiAccessType
, ipiToPort
, ipiAccessFrom
, InstancePortState
, instancePortState
, ipsFromPort
, ipsState
, ipsProtocol
, ipsToPort
, InstanceSnapshot
, instanceSnapshot
, insFromBlueprintId
, insState
, insResourceType
, insArn
, insCreatedAt
, insLocation
, insProgress
, insName
, insFromBundleId
, insSizeInGb
, insSupportCode
, insFromInstanceARN
, insFromInstanceName
, InstanceState
, instanceState
, isName
, isCode
, KeyPair
, keyPair
, kpResourceType
, kpArn
, kpCreatedAt
, kpLocation
, kpFingerprint
, kpName
, kpSupportCode
, MetricDatapoint
, metricDatapoint
, mdSampleCount
, mdMaximum
, mdAverage
, mdMinimum
, mdSum
, mdTimestamp
, mdUnit
, MonthlyTransfer
, monthlyTransfer
, mtGbPerMonthAllocated
, Operation
, operation
, oStatus
, oOperationDetails
, oResourceType
, oCreatedAt
, oResourceName
, oLocation
, oStatusChangedAt
, oErrorDetails
, oErrorCode
, oId
, oOperationType
, oIsTerminal
, PasswordData
, passwordData
, pdKeyPairName
, pdCiphertext
, PortInfo
, portInfo
, piFromPort
, piProtocol
, piToPort
, RegionInfo
, regionInfo
, riAvailabilityZones
, riName
, riDisplayName
, riContinentCode
, riDescription
, ResourceLocation
, resourceLocation
, rlRegionName
, rlAvailabilityZone
, StaticIP
, staticIP
, siIpAddress
, siResourceType
, siArn
, siCreatedAt
, siLocation
, siIsAttached
, siName
, siSupportCode
, siAttachedTo
) where
import Network.AWS.Lens
import Network.AWS.Lightsail.Types.Product
import Network.AWS.Lightsail.Types.Sum
import Network.AWS.Prelude
import Network.AWS.Sign.V4
lightsail :: Service
lightsail =
Service
{ _svcAbbrev = "Lightsail"
, _svcSigner = v4
, _svcPrefix = "lightsail"
, _svcVersion = "2016-11-28"
, _svcEndpoint = defaultEndpoint lightsail
, _svcTimeout = Just 70
, _svcCheck = statusSuccess
, _svcError = parseJSONError "Lightsail"
, _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 (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
_AccessDeniedException :: AsError a => Getting (First ServiceError) a ServiceError
_AccessDeniedException = _MatchServiceError lightsail "AccessDeniedException"
_AccountSetupInProgressException :: AsError a => Getting (First ServiceError) a ServiceError
_AccountSetupInProgressException =
_MatchServiceError lightsail "AccountSetupInProgressException"
_NotFoundException :: AsError a => Getting (First ServiceError) a ServiceError
_NotFoundException = _MatchServiceError lightsail "NotFoundException"
_OperationFailureException :: AsError a => Getting (First ServiceError) a ServiceError
_OperationFailureException =
_MatchServiceError lightsail "OperationFailureException"
_ServiceException :: AsError a => Getting (First ServiceError) a ServiceError
_ServiceException = _MatchServiceError lightsail "ServiceException"
_UnauthenticatedException :: AsError a => Getting (First ServiceError) a ServiceError
_UnauthenticatedException =
_MatchServiceError lightsail "UnauthenticatedException"
_InvalidInputException :: AsError a => Getting (First ServiceError) a ServiceError
_InvalidInputException = _MatchServiceError lightsail "InvalidInputException"