{-# LANGUAGE OverloadedStrings #-}
module Network.AWS.AutoScaling.Types
(
autoScaling
, _AlreadyExistsFault
, _LimitExceededFault
, _ResourceInUseFault
, _InvalidNextToken
, _ScalingActivityInProgressFault
, _ResourceContentionFault
, LifecycleState (..)
, ScalingActivityStatusCode (..)
, Activity
, activity
, aProgress
, aStatusMessage
, aEndTime
, aDetails
, aDescription
, aActivityId
, aAutoScalingGroupName
, aCause
, aStartTime
, aStatusCode
, AdjustmentType
, adjustmentType
, atAdjustmentType
, Alarm
, alarm
, aAlarmName
, aAlarmARN
, AutoScalingGroup
, autoScalingGroup
, asgStatus
, asgTerminationPolicies
, asgHealthCheckGracePeriod
, asgNewInstancesProtectedFromScaleIn
, asgVPCZoneIdentifier
, asgTargetGroupARNs
, asgEnabledMetrics
, asgLaunchConfigurationName
, asgInstances
, asgAutoScalingGroupARN
, asgPlacementGroup
, asgSuspendedProcesses
, asgLoadBalancerNames
, asgTags
, asgAutoScalingGroupName
, asgMinSize
, asgMaxSize
, asgDesiredCapacity
, asgDefaultCooldown
, asgAvailabilityZones
, asgHealthCheckType
, asgCreatedTime
, AutoScalingInstanceDetails
, autoScalingInstanceDetails
, asidLaunchConfigurationName
, asidInstanceId
, asidAutoScalingGroupName
, asidAvailabilityZone
, asidLifecycleState
, asidHealthStatus
, asidProtectedFromScaleIn
, BlockDeviceMapping
, blockDeviceMapping
, bdmVirtualName
, bdmNoDevice
, bdmEBS
, bdmDeviceName
, EBS
, ebs
, ebsDeleteOnTermination
, ebsVolumeSize
, ebsIOPS
, ebsEncrypted
, ebsVolumeType
, ebsSnapshotId
, EnabledMetric
, enabledMetric
, emGranularity
, emMetric
, Filter
, filter'
, fValues
, fName
, Instance
, instance'
, iLaunchConfigurationName
, iInstanceId
, iAvailabilityZone
, iLifecycleState
, iHealthStatus
, iProtectedFromScaleIn
, InstanceMonitoring
, instanceMonitoring
, imEnabled
, LaunchConfiguration
, launchConfiguration
, lcAssociatePublicIPAddress
, lcSecurityGroups
, lcSpotPrice
, lcInstanceMonitoring
, lcKeyName
, lcClassicLinkVPCSecurityGroups
, lcRAMDiskId
, lcKernelId
, lcEBSOptimized
, lcUserData
, lcClassicLinkVPCId
, lcIAMInstanceProfile
, lcLaunchConfigurationARN
, lcPlacementTenancy
, lcBlockDeviceMappings
, lcLaunchConfigurationName
, lcImageId
, lcInstanceType
, lcCreatedTime
, LifecycleHook
, lifecycleHook
, lhDefaultResult
, lhLifecycleHookName
, lhHeartbeatTimeout
, lhAutoScalingGroupName
, lhNotificationMetadata
, lhGlobalTimeout
, lhNotificationTargetARN
, lhLifecycleTransition
, lhRoleARN
, LoadBalancerState
, loadBalancerState
, lbsState
, lbsLoadBalancerName
, LoadBalancerTargetGroupState
, loadBalancerTargetGroupState
, lbtgsState
, lbtgsLoadBalancerTargetGroupARN
, MetricCollectionType
, metricCollectionType
, mctMetric
, MetricGranularityType
, metricGranularityType
, mgtGranularity
, NotificationConfiguration
, notificationConfiguration
, ncTopicARN
, ncAutoScalingGroupName
, ncNotificationType
, ProcessType
, processType
, ptProcessName
, ScalingPolicy
, scalingPolicy
, sMinAdjustmentStep
, sEstimatedInstanceWarmup
, sPolicyName
, sPolicyType
, sStepAdjustments
, sAdjustmentType
, sAutoScalingGroupName
, sScalingAdjustment
, sCooldown
, sPolicyARN
, sAlarms
, sMetricAggregationType
, sMinAdjustmentMagnitude
, ScalingProcessQuery
, scalingProcessQuery
, spqScalingProcesses
, spqAutoScalingGroupName
, ScheduledUpdateGroupAction
, scheduledUpdateGroupAction
, sugaScheduledActionARN
, sugaStartTime
, sugaTime
, sugaScheduledActionName
, sugaMaxSize
, sugaRecurrence
, sugaDesiredCapacity
, sugaMinSize
, sugaAutoScalingGroupName
, sugaEndTime
, StepAdjustment
, stepAdjustment
, saMetricIntervalLowerBound
, saMetricIntervalUpperBound
, saScalingAdjustment
, SuspendedProcess
, suspendedProcess
, spProcessName
, spSuspensionReason
, Tag
, tag
, tagKey
, tagResourceId
, tagResourceType
, tagPropagateAtLaunch
, tagValue
, TagDescription
, tagDescription
, tdResourceId
, tdResourceType
, tdKey
, tdPropagateAtLaunch
, tdValue
) where
import Network.AWS.AutoScaling.Types.Product
import Network.AWS.AutoScaling.Types.Sum
import Network.AWS.Lens
import Network.AWS.Prelude
import Network.AWS.Sign.V4
autoScaling :: Service
autoScaling =
Service
{ _svcAbbrev = "AutoScaling"
, _svcSigner = v4
, _svcPrefix = "autoscaling"
, _svcVersion = "2011-01-01"
, _svcEndpoint = defaultEndpoint autoScaling
, _svcTimeout = Just 70
, _svcCheck = statusSuccess
, _svcError = parseXMLError "AutoScaling"
, _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
_AlreadyExistsFault :: AsError a => Getting (First ServiceError) a ServiceError
_AlreadyExistsFault = _ServiceError . hasStatus 400 . hasCode "AlreadyExists"
_LimitExceededFault :: AsError a => Getting (First ServiceError) a ServiceError
_LimitExceededFault = _ServiceError . hasStatus 400 . hasCode "LimitExceeded"
_ResourceInUseFault :: AsError a => Getting (First ServiceError) a ServiceError
_ResourceInUseFault = _ServiceError . hasStatus 400 . hasCode "ResourceInUse"
_InvalidNextToken :: AsError a => Getting (First ServiceError) a ServiceError
_InvalidNextToken = _ServiceError . hasStatus 400 . hasCode "InvalidNextToken"
_ScalingActivityInProgressFault :: AsError a => Getting (First ServiceError) a ServiceError
_ScalingActivityInProgressFault =
_ServiceError . hasStatus 400 . hasCode "ScalingActivityInProgress"
_ResourceContentionFault :: AsError a => Getting (First ServiceError) a ServiceError
_ResourceContentionFault =
_ServiceError . hasStatus 500 . hasCode "ResourceContention"