{-# LANGUAGE OverloadedStrings #-}
module Network.AWS.ECS.Types
(
ecs
, _InvalidParameterException
, _ServerException
, _ClusterContainsServicesException
, _ClusterContainsContainerInstancesException
, _ServiceNotActiveException
, _ClusterNotFoundException
, _NoUpdateAvailableException
, _ServiceNotFoundException
, _MissingVersionException
, _UpdateInProgressException
, _ClientException
, AgentUpdateStatus (..)
, DesiredStatus (..)
, LogDriver (..)
, NetworkMode (..)
, SortOrder (..)
, TaskDefinitionFamilyStatus (..)
, TaskDefinitionStatus (..)
, TransportProtocol (..)
, UlimitName (..)
, Attribute
, attribute
, aValue
, aName
, Cluster
, cluster
, cStatus
, cClusterARN
, cRunningTasksCount
, cRegisteredContainerInstancesCount
, cPendingTasksCount
, cClusterName
, cActiveServicesCount
, Container
, container
, cNetworkBindings
, cContainerARN
, cTaskARN
, cLastStatus
, cReason
, cName
, cExitCode
, ContainerDefinition
, containerDefinition
, cdImage
, cdCommand
, cdHostname
, cdDockerSecurityOptions
, cdDisableNetworking
, cdVolumesFrom
, cdEnvironment
, cdEntryPoint
, cdWorkingDirectory
, cdUlimits
, cdPrivileged
, cdPortMappings
, cdDockerLabels
, cdExtraHosts
, cdMemory
, cdUser
, cdDnsSearchDomains
, cdLogConfiguration
, cdName
, cdDnsServers
, cdMountPoints
, cdLinks
, cdReadonlyRootFilesystem
, cdEssential
, cdCpu
, cdMemoryReservation
, ContainerInstance
, containerInstance
, ciStatus
, ciRunningTasksCount
, ciRemainingResources
, ciEc2InstanceId
, ciContainerInstanceARN
, ciAgentConnected
, ciVersionInfo
, ciAgentUpdateStatus
, ciAttributes
, ciVersion
, ciPendingTasksCount
, ciRegisteredResources
, ContainerOverride
, containerOverride
, coCommand
, coEnvironment
, coName
, ContainerService
, containerService
, csRunningCount
, csStatus
, csClusterARN
, csCreatedAt
, csDesiredCount
, csLoadBalancers
, csPendingCount
, csEvents
, csDeployments
, csServiceName
, csServiceARN
, csTaskDefinition
, csRoleARN
, csDeploymentConfiguration
, Deployment
, deployment
, dRunningCount
, dStatus
, dCreatedAt
, dDesiredCount
, dPendingCount
, dId
, dUpdatedAt
, dTaskDefinition
, DeploymentConfiguration
, deploymentConfiguration
, dcMinimumHealthyPercent
, dcMaximumPercent
, Failure
, failure
, fArn
, fReason
, HostEntry
, hostEntry
, heHostname
, heIpAddress
, HostVolumeProperties
, hostVolumeProperties
, hvpSourcePath
, KeyValuePair
, keyValuePair
, kvpValue
, kvpName
, LoadBalancer
, loadBalancer
, lbLoadBalancerName
, lbContainerName
, lbTargetGroupARN
, lbContainerPort
, LogConfiguration
, logConfiguration
, lcOptions
, lcLogDriver
, MountPoint
, mountPoint
, mpContainerPath
, mpSourceVolume
, mpReadOnly
, NetworkBinding
, networkBinding
, nbBindIP
, nbProtocol
, nbHostPort
, nbContainerPort
, PortMapping
, portMapping
, pmProtocol
, pmHostPort
, pmContainerPort
, Resource
, resource
, rStringSetValue
, rIntegerValue
, rDoubleValue
, rLongValue
, rName
, rType
, ServiceEvent
, serviceEvent
, seCreatedAt
, seId
, seMessage
, Task
, task
, tStoppedAt
, tDesiredStatus
, tOverrides
, tClusterARN
, tCreatedAt
, tTaskARN
, tContainerInstanceARN
, tLastStatus
, tContainers
, tStartedAt
, tVersion
, tStartedBy
, tStoppedReason
, tTaskDefinitionARN
, TaskDefinition
, taskDefinition
, tdStatus
, tdFamily
, tdContainerDefinitions
, tdTaskRoleARN
, tdNetworkMode
, tdTaskDefinitionARN
, tdRevision
, tdVolumes
, tdRequiresAttributes
, TaskOverride
, taskOverride
, toContainerOverrides
, toTaskRoleARN
, Ulimit
, ulimit
, uName
, uSoftLimit
, uHardLimit
, VersionInfo
, versionInfo
, viAgentHash
, viAgentVersion
, viDockerVersion
, Volume
, volume
, vName
, vHost
, VolumeFrom
, volumeFrom
, vfSourceContainer
, vfReadOnly
) where
import Network.AWS.ECS.Types.Product
import Network.AWS.ECS.Types.Sum
import Network.AWS.Lens
import Network.AWS.Prelude
import Network.AWS.Sign.V4
ecs :: Service
ecs =
Service
{ _svcAbbrev = "ECS"
, _svcSigner = v4
, _svcPrefix = "ecs"
, _svcVersion = "2014-11-13"
, _svcEndpoint = defaultEndpoint ecs
, _svcTimeout = Just 70
, _svcCheck = statusSuccess
, _svcError = parseJSONError "ECS"
, _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
_InvalidParameterException :: AsError a => Getting (First ServiceError) a ServiceError
_InvalidParameterException =
_ServiceError . hasCode "InvalidParameterException"
_ServerException :: AsError a => Getting (First ServiceError) a ServiceError
_ServerException = _ServiceError . hasCode "ServerException"
_ClusterContainsServicesException :: AsError a => Getting (First ServiceError) a ServiceError
_ClusterContainsServicesException =
_ServiceError . hasCode "ClusterContainsServicesException"
_ClusterContainsContainerInstancesException :: AsError a => Getting (First ServiceError) a ServiceError
_ClusterContainsContainerInstancesException =
_ServiceError . hasCode "ClusterContainsContainerInstancesException"
_ServiceNotActiveException :: AsError a => Getting (First ServiceError) a ServiceError
_ServiceNotActiveException =
_ServiceError . hasCode "ServiceNotActiveException"
_ClusterNotFoundException :: AsError a => Getting (First ServiceError) a ServiceError
_ClusterNotFoundException = _ServiceError . hasCode "ClusterNotFoundException"
_NoUpdateAvailableException :: AsError a => Getting (First ServiceError) a ServiceError
_NoUpdateAvailableException =
_ServiceError . hasCode "NoUpdateAvailableException"
_ServiceNotFoundException :: AsError a => Getting (First ServiceError) a ServiceError
_ServiceNotFoundException = _ServiceError . hasCode "ServiceNotFoundException"
_MissingVersionException :: AsError a => Getting (First ServiceError) a ServiceError
_MissingVersionException = _ServiceError . hasCode "MissingVersionException"
_UpdateInProgressException :: AsError a => Getting (First ServiceError) a ServiceError
_UpdateInProgressException =
_ServiceError . hasCode "UpdateInProgressException"
_ClientException :: AsError a => Getting (First ServiceError) a ServiceError
_ClientException = _ServiceError . hasCode "ClientException"