{-# LANGUAGE OverloadedStrings #-}
module Network.AWS.AppStream.Types
(
appStream
, _InvalidRoleException
, _ResourceAlreadyExistsException
, _OperationNotPermittedException
, _ResourceNotFoundException
, _ResourceNotAvailableException
, _LimitExceededException
, _ResourceInUseException
, FleetErrorCode (..)
, FleetState (..)
, ImageState (..)
, ImageStateChangeReasonCode (..)
, PlatformType (..)
, SessionState (..)
, VisibilityType (..)
, Application
, application
, aEnabled
, aLaunchPath
, aLaunchParameters
, aName
, aDisplayName
, aMetadata
, aIconURL
, ComputeCapacity
, computeCapacity
, ccDesiredInstances
, ComputeCapacityStatus
, computeCapacityStatus
, ccsInUse
, ccsRunning
, ccsAvailable
, ccsDesired
, Fleet
, fleet
, fDisconnectTimeoutInSeconds
, fMaxUserDurationInSeconds
, fCreatedTime
, fVPCConfig
, fFleetErrors
, fDisplayName
, fDescription
, fARN
, fName
, fImageName
, fInstanceType
, fComputeCapacityStatus
, fState
, FleetError
, fleetError
, feErrorCode
, feErrorMessage
, Image
, image
, iState
, iPlatform
, iStateChangeReason
, iARN
, iCreatedTime
, iVisibility
, iBaseImageARN
, iDisplayName
, iDescription
, iApplications
, iName
, ImageStateChangeReason
, imageStateChangeReason
, iscrCode
, iscrMessage
, Session
, session
, sId
, sUserId
, sStackName
, sFleetName
, sState
, Stack
, stack
, sARN
, sCreatedTime
, sDisplayName
, sDescription
, sName
, VPCConfig
, vpcConfig
, vcSubnetIds
) where
import Network.AWS.AppStream.Types.Product
import Network.AWS.AppStream.Types.Sum
import Network.AWS.Lens
import Network.AWS.Prelude
import Network.AWS.Sign.V4
appStream :: Service
appStream =
Service
{ _svcAbbrev = "AppStream"
, _svcSigner = v4
, _svcPrefix = "appstream2"
, _svcVersion = "2016-12-01"
, _svcEndpoint = defaultEndpoint appStream
, _svcTimeout = Just 70
, _svcCheck = statusSuccess
, _svcError = parseJSONError "AppStream"
, _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
_InvalidRoleException :: AsError a => Getting (First ServiceError) a ServiceError
_InvalidRoleException = _ServiceError . hasCode "InvalidRoleException"
_ResourceAlreadyExistsException :: AsError a => Getting (First ServiceError) a ServiceError
_ResourceAlreadyExistsException =
_ServiceError . hasCode "ResourceAlreadyExistsException"
_OperationNotPermittedException :: AsError a => Getting (First ServiceError) a ServiceError
_OperationNotPermittedException =
_ServiceError . hasCode "OperationNotPermittedException"
_ResourceNotFoundException :: AsError a => Getting (First ServiceError) a ServiceError
_ResourceNotFoundException =
_ServiceError . hasCode "ResourceNotFoundException"
_ResourceNotAvailableException :: AsError a => Getting (First ServiceError) a ServiceError
_ResourceNotAvailableException =
_ServiceError . hasCode "ResourceNotAvailableException"
_LimitExceededException :: AsError a => Getting (First ServiceError) a ServiceError
_LimitExceededException = _ServiceError . hasCode "LimitExceededException"
_ResourceInUseException :: AsError a => Getting (First ServiceError) a ServiceError
_ResourceInUseException = _ServiceError . hasCode "ResourceInUseException"